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

Function TestEmptyRanges

util/generic/xrange_ut.cpp:117–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116 template <class XRangeContainer>
117 void TestEmptyRanges(const XRangeContainer& c) {
118 for (const auto& emptyRange : c) {
119 UNIT_ASSERT_VALUES_EQUAL(emptyRange.size(), 0);
120
121 for (auto i : emptyRange) {
122 Y_UNUSED(i);
123 UNIT_ASSERT(false);
124 }
125
126 using TValueType = decltype(*emptyRange.begin());
127 const TVector<TValueType> asVector = emptyRange;
128 UNIT_ASSERT(asVector.empty());
129 }
130 }
131
132 Y_UNIT_TEST(EmptySimpleRange) {
133 using TSimpleRange = decltype(xrange(1));

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 4

Y_UNUSEDFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected