Mercurial > hg > svcore
comparison data/model/test/Compares.h @ 1450:a12fd0456f0c streaming-csv-writer
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 17 Apr 2018 10:35:42 +0100 |
parents | 48e9f538e6e9 |
children |
comparison
equal
deleted
inserted
replaced
1449:deabf9fd3d28 | 1450:a12fd0456f0c |
---|---|
22 #define COMPARE_ALL_TO(a, n) \ | 22 #define COMPARE_ALL_TO(a, n) \ |
23 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ | 23 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ |
24 COMPARE_FUZZIER(a[cmp_i], n); \ | 24 COMPARE_FUZZIER(a[cmp_i], n); \ |
25 } | 25 } |
26 | 26 |
27 #define COMPARE_ALL(a, b) \ | 27 #define COMPARE_ALL(a, b) \ |
28 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ | 28 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ |
29 COMPARE_FUZZIER(a[cmp_i], b[cmp_i]); \ | 29 COMPARE_FUZZIER(a[cmp_i], b[cmp_i]); \ |
30 } | 30 } |
31 | 31 |
32 #define COMPARE_SCALED(a, b, s) \ | 32 #define COMPARE_SCALED(a, b, s) \ |
33 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ | 33 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ |
34 COMPARE_FUZZIER(a[cmp_i] / s, b[cmp_i]); \ | 34 COMPARE_FUZZIER(a[cmp_i] / s, b[cmp_i]); \ |
35 } | 35 } |
36 | 36 |
37 #define COMPARE_ALL_TO_F(a, n) \ | 37 #define COMPARE_ALL_TO_F(a, n) \ |
38 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ | 38 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ |
39 COMPARE_FUZZIER_F(a[cmp_i], n); \ | 39 COMPARE_FUZZIER_F(a[cmp_i], n); \ |
40 } | 40 } |
41 | 41 |
42 #define COMPARE_ALL_F(a, b) \ | 42 #define COMPARE_ALL_F(a, b) \ |
43 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ | 43 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ |
44 COMPARE_FUZZIER_F(a[cmp_i], b[cmp_i]); \ | 44 COMPARE_FUZZIER_F(a[cmp_i], b[cmp_i]); \ |
45 } | 45 } |
46 | 46 |
47 #define COMPARE_SCALED_F(a, b, s) \ | 47 #define COMPARE_SCALED_F(a, b, s) \ |
48 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ | 48 for (int cmp_i = 0; cmp_i < (int)(sizeof(a)/sizeof(a[0])); ++cmp_i) { \ |
49 COMPARE_FUZZIER_F(a[cmp_i] / s, b[cmp_i]); \ | 49 COMPARE_FUZZIER_F(a[cmp_i] / s, b[cmp_i]); \ |
50 } | 50 } |
51 | 51 |
52 #endif | 52 #endif |