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

Function TestIter

util/random/shuffle_ut.cpp:25–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24 template <typename... A>
25 static void TestIter(A&&... args) {
26 TString s0, s1;
27
28 auto f = [&]() {
29 auto b = s1.begin();
30 auto e = s1.end();
31
32 Shuffle(b, e, args...);
33 };
34
35 s1 = "0";
36 f();
37
38 s1 = "01";
39 f();
40
41 s1 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
42 s0 = s1.copy();
43 f();
44
45 UNIT_ASSERT(s0 != s1); // if shuffle does work, chances it will fail are 1 to 64!.
46 }
47
48 template <typename... A>
49 static void TestIterPartial(A&&... args) {

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 5

ShuffleFunction · 0.70
fFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected