diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/documentation/lux/test/unit.lux | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/stdlib/source/documentation/lux/test/unit.lux b/stdlib/source/documentation/lux/test/unit.lux new file mode 100644 index 000000000..2b5e9441a --- /dev/null +++ b/stdlib/source/documentation/lux/test/unit.lux @@ -0,0 +1,51 @@ +(.require + [library + [lux (.except) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]]) + +(def .public documentation + (List $.Documentation) + (list ($.module /._ + "Unit testing.") + + ($.definition /.Test + "An asynchronous operation that yields test results.") + + ($.definition /.and + "Sequencing combinator." + [(and left right)]) + + ($.definition /.test + "Check that a condition is #1, and fail with the given message otherwise." + [(test message condition)]) + + ($.definition /.coverage + (format "Specifies a test as covering one or more definitions." + \n "Adds to the test tally information to track which definitions have been tested.") + [(coverage [definition/0 definition/1 ,,, definition/N] + (is Bit + (some "computation")))]) + + ($.definition /.for + (format "Specifies a context for tests as covering one or more definitions." + \n "Adds to the test tally information to track which definitions have been tested.") + [(for [definition/0 definition/1 ,,, definition/N] + (is Test + some_test))]) + + ($.definition /.covering + (format "Specifies the module being covered by a test." + \n "Adds tracking information to the tally to know which exported definitions in the module need to be covered.") + [(covering .._ + (is Test + some_test))]) + + ($.definition /.context) + ($.definition /.success) + ($.definition /.failure) + )) |