]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.test: add silent-tests? that hides unit-tests.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 7 Nov 2019 21:13:05 +0000 (13:13 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 7 Nov 2019 21:13:05 +0000 (13:13 -0800)
basis/tools/test/test.factor

index dcbb99b219d2512d8c12fb445eae1d6f19c851d3..1b10c21bf0a9e4df3efb080eb94ec0d8fd501255 100644 (file)
@@ -29,6 +29,9 @@ T{ error-type-holder
    { quot [ test-failures get ] }
 } define-error-type
 
+SYMBOL: silent-tests?
+f silent-tests? set-global
+
 SYMBOL: verbose-tests?
 t verbose-tests? set-global
 
@@ -112,7 +115,7 @@ MACRO: <experiment> ( word -- quot )
 
 :: experiment ( word: ( -- error/f failed? tested? ) line# -- )
     word <experiment> :> e
-    e experiment.
+    silent-tests? get [ e experiment. ] unless
     word execute [
         [
             current-test-file get [