... 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/.

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

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

        ($.definition /.pre_condition_failed)
        ($.definition /.post_condition_failed)

        ($.definition /.pre
          (text "Pre-conditions."
                \n "Given a test and an expression to run, only runs the expression if the test passes."
                \n "Otherwise, an error is raised.")
          ($.example (' (pre (i.= +4 (i.+ +2 +2))
                             (foo +123 +456 +789)))))

        ($.definition /.post
          (text "Post-conditions."
                \n "Given a predicate and an expression to run, evaluates the expression and then tests the output with the predicate."
                \n "If the predicate returns 1b, returns the value of the expression."
                \n "Otherwise, an error is raised.")
          ($.example (' (post i.even?
                              (i.+ +2 +2)))))
        ))
