We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89b0b56 commit fadf06aCopy full SHA for fadf06a
exercises/concept/lasagna-master/lasagna_master_test.cpp
@@ -5,14 +5,16 @@
5
#include "test/catch.hpp"
6
#endif
7
8
+#include <cmath>
9
+
10
using namespace lasagna_master;
11
12
// As long as we have catch2 v2 and v3 in parallel, we can't use either
13
// of their comparison marcors for floating point comparisons.
14
#define REQUIRE_VECTOR_APROX_EQUAL(vec1, vec2, margin) \
15
REQUIRE(vec1.size() == vec2.size()); \
16
for (size_t i = 0; i < vec1.size(); i++) { \
- REQUIRE( vec1.at(i) - vec2.at(i) < margin); \
17
+ REQUIRE( std::abs(vec1.at(i) - vec2.at(i)) < margin); \
18
}
19
20
TEST_CASE("preparationTime: Preparation time for many layers with custom average time", "[task_1]") {
0 commit comments