| 41 | using namespace lt::literals; |
| 42 | |
| 43 | TORRENT_TEST(copy_string) |
| 44 | { |
| 45 | stack_allocator a; |
| 46 | allocation_slot const idx1 = a.copy_string("testing"); |
| 47 | |
| 48 | // attempt to trigger a reallocation |
| 49 | a.allocate(100000); |
| 50 | |
| 51 | allocation_slot const idx2 = a.copy_string(std::string("foobar")); |
| 52 | |
| 53 | TEST_CHECK(a.ptr(idx1) == "testing"_sv); |
| 54 | TEST_CHECK(a.ptr(idx2) == "foobar"_sv); |
| 55 | } |
| 56 | |
| 57 | TORRENT_TEST(copy_buffer) |
| 58 | { |
nothing calls this directly
no test coverage detected