| 11 | |
| 12 | Y_UNIT_TEST_SUITE(TBlobTest) { |
| 13 | Y_UNIT_TEST(TestSubBlob) { |
| 14 | TBlob child; |
| 15 | const char* p = nullptr; |
| 16 | |
| 17 | { |
| 18 | TBlob parent = TBlob::CopySingleThreaded("0123456789", 10); |
| 19 | UNIT_ASSERT_EQUAL(parent.Length(), 10); |
| 20 | p = parent.AsCharPtr(); |
| 21 | UNIT_ASSERT_EQUAL(memcmp(p, "0123456789", 10), 0); |
| 22 | child = parent.SubBlob(2, 5); |
| 23 | } // Don't worry about parent |
| 24 | |
| 25 | UNIT_ASSERT_EQUAL(child.Length(), 3); |
| 26 | UNIT_ASSERT_EQUAL(memcmp(child.AsCharPtr(), "234", 3), 0); |
| 27 | UNIT_ASSERT_EQUAL(p + 2, child.AsCharPtr()); |
| 28 | } |
| 29 | |
| 30 | Y_UNIT_TEST(TestFromStream) { |
| 31 | TString s("sjklfgsdyutfuyas54fa78s5f89a6df790asdf7"); |
nothing calls this directly
no test coverage detected