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

Method TestOps

util/memory/tempbuf_ut.cpp:50–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void TTempBufTest::TestOps() {
51 TTempBuf tmp(201);
52
53 tmp.Proceed(100);
54
55 UNIT_ASSERT_EQUAL(tmp.Current() - tmp.Data(), 100);
56 UNIT_ASSERT(tmp.Left() >= 101);
57 UNIT_ASSERT(tmp.Size() >= 201);
58 UNIT_ASSERT_EQUAL(tmp.Filled(), 100);
59
60 tmp.Reset();
61
62 UNIT_ASSERT_EQUAL(tmp.Current(), tmp.Data());
63 UNIT_ASSERT(tmp.Left() >= 201);
64 UNIT_ASSERT(tmp.Size() >= 201);
65 UNIT_ASSERT_EQUAL(tmp.Filled(), 0);
66}
67
68void TTempBufTest::TestMoveCtor() {
69 TTempBuf src;

Callers

nothing calls this directly

Calls 7

ProceedMethod · 0.45
CurrentMethod · 0.45
DataMethod · 0.45
LeftMethod · 0.45
SizeMethod · 0.45
FilledMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected