From 61247132f5c2740795a06749b5c8c4228370c24b Mon Sep 17 00:00:00 2001 From: katherine Date: Wed, 21 Mar 2018 01:39:17 -0700 Subject: proofread --- README.md | 27 ++++++++++++++------------- 1 file 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()**{} | declare a test, described by `description`, which consists of statements between the {} | -| **REGISTER_TEARDOWN()** | 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>()** | 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()** | assert that the value of `a` is not a "not" value, i.e. NULL, 0, or '\0' | -| **ASSERT_NOT()** | assert that the value of `a` is a "not" value | -| **ASSERT_EQ(, )** | fail if the values of `a` and `b` are not equal | -| **ASSERT_NEQ(, )** | fail if the values of `a` and `b` are equal | -| **ASSERT_GT(, )** | fail if the value of `a` is not greater the value of `b` | -| **ASSERT_GEQ(, )** | fail if the value of `a` is not greater than or equal to the value of `b` | -| **ASSERT_LT(, )** | fail if the value of `a` is not less than the value of `b` | -| **ASSERT_LEQ(, )** | 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 -- cgit v1.2.3