diff options
| -rw-r--r-- | tests/test_fixed_point.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_fixed_point.cpp b/tests/test_fixed_point.cpp index 87a6ef2..e783f5f 100644 --- a/tests/test_fixed_point.cpp +++ b/tests/test_fixed_point.cpp @@ -115,6 +115,13 @@ TEST_CASE("fp_t addition is commutative for any bit pattern (fuzzed)") { }); } +TEST_CASE("fp_t multiplication is commutative for any bit pattern (fuzzed)") { + rc::prop("a * b == b * a", + [](const fp_t&a, const fp_t& b) { + RC_ASSERT(a * b == b * a); + }); +} + TEST_CASE("fp_t division by itself is identity for any nonzero value (fuzzed)") { rc::prop("a / a == from_int(1) when a.raw != 0", [](const fp_t& a) { |
