diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aed886..f28d4cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,7 @@ if (ARBUTILS_TESTS) CPMAddPackage( NAME doctest GITHUB_REPOSITORY doctest/doctest - GIT_TAG 2.4.0 + GIT_TAG v2.4.8 DOWNLOAD_ONLY YES ) diff --git a/tests/RandomTests.cpp b/tests/RandomTests.cpp index 4f84f71..a0ac74f 100644 --- a/tests/RandomTests.cpp +++ b/tests/RandomTests.cpp @@ -65,7 +65,7 @@ TEST_CASE("Random distribution (max 0, min 1)") { } for (size_t i = 0; i < size; i++) { if (arr[i] != 0) - FAIL("We expected a value of 0 here, but got a " + std::to_string(arr[i])); + FAIL("We expected a value of 0 here, but got a " << std::to_string(arr[i])); } } @@ -80,7 +80,7 @@ TEST_CASE("Random distribution (max 0, min 2)") { auto numOnes = 0; for (size_t i = 0; i < size; i++) { if (arr[i] != 0 && arr[i] != 1) - FAIL("We expected a value of 0 or 1 here, but got a " + std::to_string(arr[i])); + FAIL("We expected a value of 0 or 1 here, but got a " << std::to_string(arr[i])); if (arr[i] == 0) numZeros++; else @@ -103,7 +103,7 @@ TEST_CASE("Random distribution (max 0, min 3)") { auto numTwos = 0; for (size_t i = 0; i < size; i++) { if (arr[i] != 0 && arr[i] != 1 && arr[i] != 2) - FAIL("We expected a value between 0 and 2 here, but got a " + std::to_string(arr[i])); + FAIL("We expected a value between 0 and 2 here, but got a " << std::to_string(arr[i])); if (arr[i] == 0) numZeros++; else if (arr[i] == 1)