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

Function TestRange

util/random/shuffle_ut.cpp:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9Y_UNIT_TEST_SUITE(TRandUtilsTest) {
10 template <typename... A>
11 static void TestRange(A&&... args) {
12 TString s0, s1;
13 ShuffleRange(s1, args...);
14 s1 = "0";
15 ShuffleRange(s1, args...);
16 s1 = "01";
17 ShuffleRange(s1, args...);
18 s1 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
19 s0 = s1.copy();
20 ShuffleRange(s1, args...);
21 UNIT_ASSERT(s0 != s1); // if shuffle does work, chances it will fail are 1 to 64!.
22 }
23
24 template <typename... A>
25 static void TestIter(A&&... args) {

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 2

ShuffleRangeFunction · 0.70
copyMethod · 0.45

Tested by

no test coverage detected