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

Function ConstTest

library/cpp/containers/flat_hash/ut/iterator_ut.cpp:47–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46 template <class Container>
47 void ConstTest(Container& cont) {
48 using value_type = typename Container::value_type;
49 using iterator = TIterator<Container, value_type>;
50 using const_iterator = TIterator<const Container, const value_type>;
51
52 iterator it{ &cont, INIT_SIZE / 2 };
53 const_iterator cit1{ it };
54 const_iterator cit2{ &cont, INIT_SIZE / 2 };
55
56 UNIT_ASSERT_EQUAL(cit1, cit2);
57
58 static_assert(std::is_same<decltype(*it), value_type&>::value);
59 static_assert(std::is_same<decltype(*cit1), const value_type&>::value);
60 }
61}
62
63Y_UNIT_TEST_SUITE(TIteratorTest) {

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected