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

Function TestSteppedXRangeImpl

util/generic/xrange_ut.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 void TestSteppedXRangeImpl(int begin, int end, int step, const TVector<int>& expected) {
34 size_t expInd = 0;
35 for (auto i : xrange(begin, end, step)) {
36 UNIT_ASSERT(expInd < expected.size());
37 UNIT_ASSERT_VALUES_EQUAL(i, expected[expInd]);
38 ++expInd;
39 }
40 UNIT_ASSERT_VALUES_EQUAL(expInd, expected.size());
41 }
42
43 Y_UNIT_TEST(IncrementWorks) {
44 TestXRangeImpl(0, 10);

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 2

xrangeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected