| 23 | } |
| 24 | |
| 25 | static void test_mul() { |
| 26 | assert(hc_fix_mul(hc_fix(2, 150), hc_fix(1, 5)) == |
| 27 | hc_fix(2, 75)); |
| 28 | |
| 29 | assert(hc_fix_mul(hc_fix(2, 150), hc_fix(1, -5)) == |
| 30 | hc_fix(2, -75)); |
| 31 | |
| 32 | assert(hc_fix_mul(hc_fix(2, -150), hc_fix(1, -5)) == |
| 33 | hc_fix(2, 75)); |
| 34 | } |
| 35 | |
| 36 | static void test_new() { |
| 37 | hc_fix_t x = hc_fix(2, -125); |
no test coverage detected