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

Function test_new

fix/tests.c:36–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36static void test_new() {
37 hc_fix_t x = hc_fix(2, -125);
38 assert(hc_fix_exp(x) == 2);
39 assert(hc_fix_val(x) == -125);
40 assert(hc_fix_int(x) == -1);
41 assert(hc_fix_frac(x) == -25);
42 assert(hc_fix_double(x) == -1.25);
43}
44
45static void test_sub() {
46 assert(hc_fix_sub(hc_fix(2, 175), hc_fix(2, 25)) ==

Callers 1

fix_testsFunction · 0.85

Calls 6

hc_fixFunction · 0.85
hc_fix_expFunction · 0.85
hc_fix_valFunction · 0.85
hc_fix_intFunction · 0.85
hc_fix_fracFunction · 0.85
hc_fix_doubleFunction · 0.85

Tested by

no test coverage detected