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

Function test_add

fix/tests.c:6–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "fix.h"
5
6static void test_add() {
7 assert(hc_fix_add(hc_fix(2, 175), hc_fix(2, 25)) ==
8 hc_fix(2, 200));
9
10 assert(hc_fix_add(hc_fix(2, 175), hc_fix(2, -25)) ==
11 hc_fix(2, 150));
12}
13
14static void test_div() {
15 assert(hc_fix_div(hc_fix(2, 150), hc_fix(0, 2)) ==

Callers 1

fix_testsFunction · 0.85

Calls 2

hc_fix_addFunction · 0.85
hc_fixFunction · 0.85

Tested by

no test coverage detected