Browse Source

Minor additions

Luiserebii 1 year ago
parent
commit
2eb705e7fe
Signed by: Luiserebii <luis@serebii.io> GPG Key ID: 525A84BC981B7D3E
1 changed files with 14 additions and 14 deletions
  1. 14
    14
      docs/README.md

+ 14
- 14
docs/README.md View File

@@ -2,21 +2,21 @@
2 2
 
3 3
 This section contains documentation on using the Mint test framework. Each function is documented with its prototype and a brief description. Similar functions will be grouped together and described for brevity.
4 4
 
5
-Running an assertion function causes a line to print to the standard output stream describing the success or failure of the assertion.
5
+Running an assertion function causes a line to print to the standard output stream describing the success or failure of the assertion. Each assertion function takes a `title` argument, which is printed as the name of the assertion which succeeded or failed.
6 6
 
7 7
 ## Booleans
8 8
 
9 9
 The functions below assert a particular boolean value, which parallels the way expressions are evaluated and determine the behavior of control structures in C (i.e. `true` as non-zero and `false` otherwise).
10 10
 
11
-#### test\_assert(int32\_t cond, char\* title)
11
+### test\_assert(int32\_t cond, char\* title)
12 12
 
13 13
 Asserts `cond` as true. Alias of `test_assert_true()`.
14 14
 
15
-#### test\_assert\_true(int32\_t cond, char\* title)
15
+### test\_assert\_true(int32\_t cond, char\* title)
16 16
 
17 17
 Asserts `cond` as true.
18 18
 
19
-#### test\_assert\_false(int32\_t cond, char\* title)
19
+### test\_assert\_false(int32\_t cond, char\* title)
20 20
 
21 21
 Asserts `cond` as false.
22 22
 
@@ -24,23 +24,23 @@ Asserts `cond` as false.
24 24
 
25 25
 The functions below assert integer values, testing the equality of a value (`val`) against an expected value (`exp`). All of these functions perform the same logic in equality, but differ in terms of the formatting of the values when printing them on failure.
26 26
 
27
-#### test\_assert\_equal(int32\_t val, int32\_t exp, char\* title)
27
+### test\_assert\_equal(int32\_t val, int32\_t exp, char\* title)
28 28
 
29 29
 Alias of `test_assert_equal_uint`.
30 30
 
31
-#### test\_assert\_equal\_uint(int32\_t val, int32\_t exp, char\* title)
31
+### test\_assert\_equal\_uint(int32\_t val, int32\_t exp, char\* title)
32 32
 
33 33
 Asserts the equality of `val` to `exp`. On failure, prints integers as unsigned integers in decimal.
34 34
 
35
-#### test\_assert\_equal\_bin(int32\_t val, int32\_t exp, char\* title)
35
+### test\_assert\_equal\_bin(int32\_t val, int32\_t exp, char\* title)
36 36
 
37 37
 Asserts the equality of `val` to `exp`. On failure, prints integers in binary.
38 38
 
39
-#### test\_assert\_equal\_oct(int32\_t val, int32\_t exp, char\* title)
39
+### test\_assert\_equal\_oct(int32\_t val, int32\_t exp, char\* title)
40 40
 
41 41
 Asserts the equality of `val` to `exp`. On failure, prints integers in octal.
42 42
 
43
-#### test\_assert\_equal\_hex(int32\_t val, int32\_t exp, char\* title)
43
+### test\_assert\_equal\_hex(int32\_t val, int32\_t exp, char\* title)
44 44
 
45 45
 Asserts the equality of `val` to `exp`. On failure, prints integers in hexadecimal.
46 46
 
@@ -48,18 +48,18 @@ Asserts the equality of `val` to `exp`. On failure, prints integers in hexadecim
48 48
 
49 49
 The functions below assert string values, or `char` arrays, testing the equality of the values in a string (`s`) against an expected string (`exp`).
50 50
 
51
-#### test\_assert\_equal\_string(char\* s, char\* exp, char\* title)
51
+### test\_assert\_equal\_string(char\* s, char\* exp, char\* title)
52 52
 
53 53
 Assert the equality of `s` to `exp`.
54 54
 
55
-#### test\_assert\_equal\_string\_len(char\* s, char\* exp, int32\_t n, char\* title)
55
+### test\_assert\_equal\_string\_len(char\* s, char\* exp, int32\_t n, char\* title)
56 56
 
57
-Assert the equality of the first `n` chars from both `s` and `exp`. In other words, the equality of the values in the range [a, a + n) and [b, b + n) is asserted.
57
+Assert the equality of the first `n` chars from both `s` and `exp`. In other words, the equality of the values in the range `[a, a + n)` and `[b, b + n)` is asserted.
58 58
 
59 59
 ## Memory
60 60
 
61 61
 This function asserts the equality of values along two regions of memory, comparing them byte-by-byte. If an unexpected byte is found, the index of the byte is printed alongside the byte expected, and the byte found.
62 62
 
63
-#### test\_assert\_equal\_memory(void\* ptr, void\* exp, int32\_t n, char\* title)
63
+### test\_assert\_equal\_memory(void\* ptr, void\* exp, int32\_t n, char\* title)
64 64
 
65
-Assert the equality of the first `n` bytes from both `ptr` and `exp`. In other words, the equality of the values in the range [a, a + n) and [b, b + n) is asserted.
65
+Assert the equality of the first `n` bytes from both `ptr` and `exp`. In other words, the equality of the values in the range `[a, a + n)` and `[b, b + n)` is asserted.

Loading…
Cancel
Save