X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=tests%2Fmath%2FFixedTest.cpp;fp=tests%2Fmath%2FFixedTest.cpp;h=a86c40c98057cc4179595652dbfeb346a2c95322;hb=c49d46cbfbd7720627af2414e94963850fe8eed6;hp=a81534b1d20c5c68aaae6b056efa376031bca83d;hpb=5d1a76ae7725af998c6ee46adfe492c68ee1d34f;p=l2e.git diff --git a/tests/math/FixedTest.cpp b/tests/math/FixedTest.cpp index a81534b..a86c40c 100644 --- a/tests/math/FixedTest.cpp +++ b/tests/math/FixedTest.cpp @@ -88,15 +88,27 @@ void FixedTest::testProduct() { CPPUNIT_ASSERT_EQUAL( Fixed(5), Fixed(2) * Fixed(2.5)); + CPPUNIT_ASSERT_EQUAL( + Fixed(8), + Fixed(2) * 4); CPPUNIT_ASSERT_EQUAL( Fixed(-1.7499999999), Fixed(3, 4) * Fixed(-7, 3)); + CPPUNIT_ASSERT_EQUAL( + Fixed(-1.7499999999), + Fixed(3, 4) * Fixed(-2.33333333)); CPPUNIT_ASSERT_EQUAL( Fixed(4), Fixed(2) / Fixed(0.5)); + CPPUNIT_ASSERT_EQUAL( + Fixed(4), + Fixed(2) / 0.5); CPPUNIT_ASSERT_EQUAL( Fixed(3), Fixed(15) / Fixed(5)); + CPPUNIT_ASSERT_EQUAL( + Fixed(3), + Fixed(15) / 5); } void FixedTest::testModulo() {