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

Method TestQuickSort

util/generic/intrlist_ut.cpp:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102};
103
104void TListTest::TestQuickSort() {
105 TMyList l(1000);
106 size_t c = 0;
107
108 l.QuickSort(TIntGreater());
109
110 UNIT_ASSERT_EQUAL(l.Size(), 1000);
111
112 for (TMyList::TIterator it = l.Begin(); it != l.End(); ++it) {
113 UNIT_ASSERT_EQUAL(*it, int(1000 - c++));
114 }
115}
116
117void TListTest::TestSize() {
118 TMyList l(1024);

Callers

nothing calls this directly

Calls 5

TIntGreaterClass · 0.85
QuickSortMethod · 0.80
SizeMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected