Skip to content

Commit f3e8e0f

Browse files
authored
Merge pull request #17 from tomcombriat/fix/ESP32
Fix autotests for ESP32
2 parents 9366aac + 300bd5c commit f3e8e0f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/FixMath_Autotests.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace FixMathPrivate {
4444
static_assert(sizeof(decltype((large+large).asRaw())) > 4, "test fail");
4545

4646
// subtraction
47-
static_assert(b - a == c - b);
47+
static_assert(b - a == c - b, "test fail");
4848
static_assert(c - UFix<17,8>(1) == a, "test fail");
4949
static_assert(c - SFix<13,9>(1) == a, "test fail");
5050
static_assert(b + a - b == a, "test fail");
@@ -53,8 +53,8 @@ namespace FixMathPrivate {
5353
#if __cplusplus >= 202002L
5454
// These here involve shifts of negative numbers, which used to be "implementation defined" before C++-20.
5555
// It doesn't cause a real-world problem, but the compiler won't accept it in a constexpr
56-
static_assert(UFix<43,9>(0) - b - a == -(a+b));
57-
static_assert(SFix<4, 3>(-1) == SFix<4, 5>(-1)); // NOTE This is a simpler test case for the above problem. Note the difference in NF, which prompts shifting
56+
static_assert(UFix<43,9>(0) - b - a == -(a+b), "test fail");
57+
static_assert(SFix<4, 3>(-1) == SFix<4, 5>(-1), "test fail"); // NOTE This is a simpler test case for the above problem. Note the difference in NF, which prompts shifting
5858
#endif
5959
// here's a variant that avoids the problem by using only positive numbers
6060
static_assert(UFix<12,1>(999) - UFix<43,9>(0) - b - a == UFix<19,2>(999) + (-(a+b)), "test fail");

0 commit comments

Comments
 (0)