summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-22 16:34:39 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-22 16:34:39 +0100
commitb943080e91d0e353d3bf857eab1fb7016179c1f8 (patch)
treefdceb7e479a586560da55fd3588000f379d8ced0
parent4c85fde68f0819aaf2663f23c8a6d5496ae389c6 (diff)
b
-rw-r--r--compat/assert.hpp4
-rw-r--r--test/coords.cpp14
2 files changed, 9 insertions, 9 deletions
diff --git a/compat/assert.hpp b/compat/assert.hpp
index b7fb2fe9..cce97d8e 100644
--- a/compat/assert.hpp
+++ b/compat/assert.hpp
@@ -97,8 +97,8 @@
<< "fatal:" \
<< Debug::resetColor \
<< " assertion failed: " << #__VA_ARGS__; \
- DBG_nospace << " expected: " << b; \
- DBG_nospace << " actual: " << a; \
+ DBG_nospace << " expected: " << a; \
+ DBG_nospace << " actual: " << b; \
fm_EMIT_ABORT(); \
} \
})(__VA_ARGS__)
diff --git a/test/coords.cpp b/test/coords.cpp
index 7fbf8c34..23d701c1 100644
--- a/test/coords.cpp
+++ b/test/coords.cpp
@@ -18,13 +18,13 @@ void test_normalize_point()
c = { {{ -1, 1, 1}, { 7, 9}}, { 1, 31} },
d = { {{16384,-16384,2}, {15, 0}}, { 1, 2} };
- fm_assert_equal(norm(a, {}), point{{{ 0, 0, 0}, { 0, 0}}, { 0, 0} });
- fm_assert_equal(norm(b, {}), point{{{ -1, 1, 2}, { 0, 15}}, { 0, 0} });
- fm_assert_equal(norm(b, { 1, -1} ), point{{{ -1, 1 , 2}, { 0, 15}}, { 1, -1} });
- fm_assert_equal(norm(b, { -65, 65 }), point{{{ -2, 2, 2}, {15, 0}}, { -1, 1} });
- fm_assert_equal(norm(c, { 30, -62 }), point{{{ -1, 1, 1}, { 7, 9}}, { 31, -31} });
- fm_assert_equal(norm(c, {1024, 1024}), point{{{ 0, 2, 1}, { 7, 9}}, { 1, 31} });
- fm_assert_equal(norm(d, {2048, 1087}), point{{{16386,-16383,2}, {15, 1}}, { 1, 1} });
+ fm_assert_equal(point{{{ 0, 0, 0}, { 0, 0}}, { 0, 0} }, norm(a, {} ));
+ fm_assert_equal(point{{{ -1, 1, 2}, { 0, 15}}, { 0, 0} }, norm(b, { }));
+ fm_assert_equal(point{{{ -1, 1 , 2}, { 0, 15}}, { 1, -1} }, norm(b, { 1, -1 }));
+ fm_assert_equal(point{{{ -2, 2, 2}, {15, 0}}, { -1, 1} }, norm(b, { -65, 65 }));
+ fm_assert_equal(point{{{ -1, 1, 1}, { 7, 9}}, { 31, -31} }, norm(c, { 30, -62 }));
+ fm_assert_equal(point{{{ 0, 2, 1}, { 7, 9}}, { 1, 31} }, norm(c, {1024, 1024}));
+ fm_assert_equal(point{{{16386,-16383,2}, {15, 1}}, { 1, 1} }, norm(d, {2048, 1087}));
}
} // namespace