| 12 | } |
| 13 | |
| 14 | static void test_div() { |
| 15 | assert(hc_fix_div(hc_fix(2, 150), hc_fix(0, 2)) == |
| 16 | hc_fix(2, 75)); |
| 17 | |
| 18 | assert(hc_fix_div(hc_fix(2, 150), hc_fix(0, -2)) == |
| 19 | hc_fix(2, -75)); |
| 20 | |
| 21 | assert(hc_fix_div(hc_fix(2, -150), hc_fix(0, -2)) == |
| 22 | hc_fix(2, 75)); |
| 23 | } |
| 24 | |
| 25 | static void test_mul() { |
| 26 | assert(hc_fix_mul(hc_fix(2, 150), hc_fix(1, 5)) == |
no test coverage detected