aboutsummaryrefslogtreecommitdiff
path: root/test/README
blob: 4ef67e0fa3019353365d758322be3b5be152e47e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Test Files

---

Testing:

Each test is a function wrapped in a macro

KPL_TEST(my_test) {
    // code here
}

Each test passes by default

---

Testing Macros:

The testing framework provides two macros KPL_ASSERT and KPL_FAIL

Both macros can only be used inside a KPL_TEST function

Asserting:

KPL_ASSSERT(condition, "Fail Message");

---

Failing:

KPL_FAIL("The test failed");