tests: added more complex test case to silly_conversion

This commit is contained in:
2017-07-31 13:21:06 -04:00
parent 65f6c7fd31
commit 6bcacabc3b

View File

@@ -110,6 +110,8 @@ TEST silly_conversion() {
ASSERT_EQ_FMT(0.0, silly_to_double(x), "%f"); ASSERT_EQ_FMT(0.0, silly_to_double(x), "%f");
x = silly_from_double((double) -1.1); x = silly_from_double((double) -1.1);
ASSERT(-1.1 - silly_to_double(x) <= 0.01); ASSERT(-1.1 - silly_to_double(x) <= 0.01);
x = silly_from_double((double) -413.25);
ASSERT(-413.25 - silly_to_double(x) <= 0.01);
PASS(); PASS();
} }