aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2018-03-21 01:39:17 -0700
committerkatherine <shmibs@shmibbles.me>2018-03-21 01:39:17 -0700
commit61247132f5c2740795a06749b5c8c4228370c24b (patch)
treef8804ef2eb0db2e0bc1f9c46ac9a1bc6c86704b2
parent7ac2d53870a981d9f3fb563d774bd5ca6d83233b (diff)
downloadsimple-test-61247132f5c2740795a06749b5c8c4228370c24b.tar.gz
proofread
-rw-r--r--README.md27
1 files changed, 14 insertions, 13 deletions
diff --git a/README.md b/README.md
index 9f23143..d9e7d61 100644
--- a/README.md
+++ b/README.md
@@ -175,24 +175,25 @@ simple-test's interface consists of a series of preprocessor macros:
|---------:|:----------------|
| **BEGIN_TEST** | must be included once, after includes and global declarations and before the first `TEST` statement |
| **END_TEST** | must be included once, after the final `TEST` statement |
-| **TEST(<description>)**{} | declare a test, described by `description`, which consists of statements between the {} |
-| **REGISTER_TEARDOWN(<func>)** | optionally included after `BEGIN_TEST` and before the first `TEST` statement. registers function `func`, which must be of type `void func(void)`, as a teardown function to be called after subscribing tests exit |
+| **TEST(description)**{} | declare a test, described by `description`, which consists of statements between the {} |
+| **REGISTER_TEARDOWN(func)** | optionally included after `BEGIN_TEST` and before the first `TEST` statement. registers function `func`, which must be of type `void func(void)`, as a teardown function to be called after subscribing tests exit |
| **USE_TEARDOWN;** | if included within a `TEST` body (before any `ASSERT` statements), the designated `TEST` will call the function registered with `REGISTER_TEARDOWN` on terminating |
-| **ECHO(<...>)** | print a formatted description of the state within the current test |
-| **ASSERT<_condition>(<args>)** | assert, on either one or two `args`, that `_condition` is true |
+| **ECHO(...)** | print a formatted description of the state within the current test |
-valid assertions are:
+assertions are used to check that the behaviour of code executed inside the
+body of a `TEST` statement is correct. values are passed and the assertion
+fails if those values do not reflect expectations. valid assertions are:
| **NAME** | **DESCRIPTION** |
|---------:|:----------------|
-| **ASSERT(<a>)** | assert that the value of `a` is not a "not" value, i.e. NULL, 0, or '\0' |
-| **ASSERT_NOT(<a>)** | assert that the value of `a` is a "not" value |
-| **ASSERT_EQ(<a>, <b>)** | fail if the values of `a` and `b` are not equal |
-| **ASSERT_NEQ(<a>, <b>)** | fail if the values of `a` and `b` are equal |
-| **ASSERT_GT(<a>, <b>)** | fail if the value of `a` is not greater the value of `b` |
-| **ASSERT_GEQ(<a>, <b>)** | fail if the value of `a` is not greater than or equal to the value of `b` |
-| **ASSERT_LT(<a>, <b>)** | fail if the value of `a` is not less than the value of `b` |
-| **ASSERT_LEQ(<a>, <b>)** | fail if the value of `a` is not less than or equal to the value of `b` |
+| **ASSERT(a)** | assert that the value of `a` is not a "not" value, i.e. NULL, 0, or '\0' |
+| **ASSERT_NOT(a)** | assert that the value of `a` is a "not" value |
+| **ASSERT_EQ(a, b)** | fail if the values of `a` and `b` are not equal |
+| **ASSERT_NEQ(a, b)** | fail if the values of `a` and `b` are equal |
+| **ASSERT_GT(a, b)** | fail if the value of `a` is not greater the value of `b` |
+| **ASSERT_GEQ(a, b)** | fail if the value of `a` is not greater than or equal to the value of `b` |
+| **ASSERT_LT(a, b)** | fail if the value of `a` is not less than the value of `b` |
+| **ASSERT_LEQ(a, b)** | fail if the value of `a` is not less than or equal to the value of `b` |
note