MCPcopy Create free account
hub / github.com/catboost/catboost / TestOffsetOrder

Method TestOffsetOrder

library/cpp/archive/yarchive_ut.cpp:66–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void TArchiveTest::TestOffsetOrder() {
67 CreateArchive();
68 TTempFile tmpFile(ARCHIVE);
69 TBlob blob1 = TBlob::FromFileSingleThreaded(ARCHIVE);
70 TArchiveReader r(blob1);
71
72 const void* prevOffset = nullptr;
73
74 for (size_t i = 0; i < r.Count(); ++i) {
75 const TString key = r.KeyByIndex(i);
76 TBlob blob2 = r.BlobByKey(key);
77 const void* offset = blob2.Data();
78
79 if (i) {
80 UNIT_ASSERT(prevOffset < offset);
81 }
82 prevOffset = offset;
83 }
84}

Callers

nothing calls this directly

Calls 4

CountMethod · 0.45
KeyByIndexMethod · 0.45
BlobByKeyMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected