... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\injection]]]]]
 [\\library
  ["[0]" /]])

(the .public documentation
  (List $.Documentation)
  (list ($.module /._
                  "Unit testing.")

        ($.definition /.Test
          "An asynchronous operation that yields test results.")

        ($.definition /.and
          "Sequencing combinator."
          ($.example (' (and left right))))

        ($.definition /.test
          "Check that a condition is #1, and fail with the given message otherwise."
          ($.example (' (test message condition))))

        ($.definition /.coverage
          (%.message "Specifies a test as covering one or more definitions."
                     \n "Adds to the test tally information to track which definitions have been tested.")
          ($.example (' (coverage [definition/0 definition/1 ,,, definition/N]
                          (is Bit
                              (some "computation"))))))
        
        ($.definition /.for
          (%.message "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.")
          ($.example (' (for [definition/0 definition/1 ,,, definition/N]
                             (is Test
                                 some_test)))))

        ($.definition /.covering
          (%.message "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.")
          ($.example (' (covering .._
                                  (is Test
                                      some_test)))))
        
        ($.definition /.context)
        ($.definition /.success)
        ($.definition /.failure)
        ))
