| 4 | #include "fix.h" |
| 5 | |
| 6 | static void test_add() { |
| 7 | assert(hc_fix_add(hc_fix(2, 175), hc_fix(2, 25)) == |
| 8 | hc_fix(2, 200)); |
| 9 | |
| 10 | assert(hc_fix_add(hc_fix(2, 175), hc_fix(2, -25)) == |
| 11 | hc_fix(2, 150)); |
| 12 | } |
| 13 | |
| 14 | static void test_div() { |
| 15 | assert(hc_fix_div(hc_fix(2, 150), hc_fix(0, 2)) == |
no test coverage detected