MCPcopy Create free account
hub / github.com/codr7/hacktical-c / test_mul

Function test_mul

fix/tests.c:25–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25static 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
36static void test_new() {
37 hc_fix_t x = hc_fix(2, -125);

Callers 1

fix_testsFunction · 0.85

Calls 2

hc_fix_mulFunction · 0.85
hc_fixFunction · 0.85

Tested by

no test coverage detected