| 9 | Y_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) { |
no test coverage detected