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

Function test_div

fix/tests.c:14–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14static 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
25static void test_mul() {
26 assert(hc_fix_mul(hc_fix(2, 150), hc_fix(1, 5)) ==

Callers 1

fix_testsFunction · 0.85

Calls 2

hc_fix_divFunction · 0.85
hc_fixFunction · 0.85

Tested by

no test coverage detected