diff options
author | CNugteren <web@cedricnugteren.nl> | 2016-05-08 21:11:37 +0200 |
---|---|---|
committer | CNugteren <web@cedricnugteren.nl> | 2016-05-08 21:11:37 +0200 |
commit | 942912daeb4e1d84820d813c1d3c03eae5361449 (patch) | |
tree | 97eec06468cf252830a3817f18ac04536b137dfa /test/correctness | |
parent | c5730c8b438c2c2a03f3f93c14b111877b98a03f (diff) |
Fixes for compilation of the tests under Visual Studio 2015
Diffstat (limited to 'test/correctness')
-rw-r--r-- | test/correctness/testblas.cc | 4 | ||||
-rw-r--r-- | test/correctness/tester.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/correctness/testblas.cc b/test/correctness/testblas.cc index 1f83c59b..e70c0361 100644 --- a/test/correctness/testblas.cc +++ b/test/correctness/testblas.cc @@ -145,8 +145,8 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st if (!TestSimilarity(result1[index], result2[index])) { errors++; if (verbose_) { - if (get_id2_(args) == 1) { fprintf(stdout, "\n Error at index %lu: ", id1); } - else { fprintf(stdout, "\n Error at %lu,%lu: ", id1, id2); } + if (get_id2_(args) == 1) { fprintf(stdout, "\n Error at index %zu: ", id1); } + else { fprintf(stdout, "\n Error at %zu,%zu: ", id1, id2); } std::cout << result1[index]; fprintf(stdout, " (reference) versus "); std::cout << result2[index]; diff --git a/test/correctness/tester.cc b/test/correctness/tester.cc index 82926c3c..26c4ba59 100644 --- a/test/correctness/tester.cc +++ b/test/correctness/tester.cc @@ -333,8 +333,8 @@ bool TestSimilarity(const T val1, const T val2) { const auto difference = std::fabs(val1 - val2); // Set the allowed error margin for floating-point comparisons - constexpr auto kErrorMarginRelative = T{0.025}; - constexpr auto kErrorMarginAbsolute = T{1.0e-4}; + constexpr auto kErrorMarginRelative = T(0.025); + constexpr auto kErrorMarginAbsolute = T(1.0e-4); // Shortcut, handles infinities if (val1 == val2) { |