diff options
Diffstat (limited to 'doc/api/libtestr/index.txt')
-rw-r--r-- | doc/api/libtestr/index.txt | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/doc/api/libtestr/index.txt b/doc/api/libtestr/index.txt deleted file mode 100644 index 774f364..0000000 --- a/doc/api/libtestr/index.txt +++ /dev/null @@ -1,64 +0,0 @@ -{ - title: libtestr - description: Myrddin Test Library -} - -Libtestr ---------- - - pkg testr = - type ctx - - type spec = struct - name : byte[:] - fn : (ctx : ctx# -> void) - ;; - - const run : (specs : spec[:] -> void) - const ok : (ctx : ctx# -> void) - const fail : (ctx : ctx#, msg : byte[:] -> void) - ;; - -Overview --------- - -The testr library provides a simple library for running -unit tests. It outputs subtest results in a format that mbld -will be able to understand, log, and report on. - -Types ------ - - type ctx - -The context for the current test. Used to record the state -of the set of tests currently running. - - type spec = struct - name : byte[:] - fn : (ctx : ctx# -> void) - ;; - -The specification for a single test. Contains the name -of the test being run, and the code used to execute it. - -Mutex. - -Functions: Mutexes ------------------- - - const run : (specs : spec[:] -> void) - -Runs a sequence of tests, recording the state of the test -and outputting an appropriate log for mtest to consume. - - const ok : (ctx : ctx# -> void) - -Records a test success. It does not leave the current -scope. - - const fail : (ctx : ctx#, msg : byte[:] -> void) - -Records a test failure. It does not leave the current -scope. - |