/home/liu/actions-runner/_work/ccv/ccv/test/unit/3rdparty.tests.c
Line | Count | Source |
1 | | #include "ccv.h" |
2 | | #include "case.h" |
3 | | #include "ccv_case.h" |
4 | | #include "3rdparty/sfmt/SFMT.h" |
5 | | |
6 | | TEST_CASE("SFMT shuffle") |
7 | 1 | { |
8 | 1 | sfmt_t sfmt; |
9 | 1 | sfmt_init_gen_rand(&sfmt, 11); |
10 | 1 | int r[10]; |
11 | 1 | int i; |
12 | 11 | for (i = 0; i < 10; i++10 ) |
13 | 10 | r[i] = i; |
14 | 1 | sfmt_genrand_shuffle(&sfmt, r, 10, sizeof(int)); |
15 | 1 | int t[] = {4, 9, 1, 3, 5, 0, 8, 6, 2, 7}; |
16 | 1 | REQUIRE_ARRAY_EQ(int, r, t, 10, "SFMT shuffle error for int of 10"); |
17 | 1 | } |
18 | | |
19 | | #include "case_main.h" |