diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux.lux | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 925894d7b..a659b6523 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -8,7 +8,6 @@ [program (#+ program:)] ["_" test (#+ Test)] ["@" target] - ["." meta] [abstract [monad (#+ do)]] [control @@ -34,22 +33,25 @@ ["i" int] ["r" rev] ["f" frac] - ["." i64]]]]] - ## TODO: Must have 100% coverage on tests. + ["." i64]]] + ["." meta + ["." location ("#\." equivalence)]]]] + ... TODO: Must have 100% coverage on tests. ["." / #_ ["#." abstract] ["#." control] ["#." data] ["#." debug] ["#." locale] - ["#." macro] + ["#." macro + ["#/." code]] ["#." math] ["#." meta] ["#." program] ["#." target] ["#." test] ["#." time] - ## ["#." tool] ## TODO: Update & expand tests for this + ... ["#." tool] ... TODO: Update & expand tests for this ["#." type] ["#." world] ["#." ffi] @@ -57,7 +59,7 @@ ["#." target #_ <target>]])) -## TODO: Get rid of this ASAP +... TODO: Get rid of this ASAP (template: (!bundle body) [(: Test (do random.monad @@ -66,7 +68,7 @@ (def: sub_tests Test - (with_expansions [## TODO: Update & expand tests for this + (with_expansions [... TODO: Update & expand tests for this <target> (for {@.jvm (~~ (as_is /target/jvm.test)) @.old (~~ (as_is /target/jvm.test))} (~~ (as_is))) @@ -86,7 +88,7 @@ /test.test /time.test - ## /tool.test + ... /tool.test /type.test /world.test /ffi.test @@ -129,13 +131,13 @@ (/.cond /.true expected - ## else + ... else dummy)) (n.= expected (/.cond /.false dummy - ## else + ... else expected)) (n.= expected (/.cond /.true @@ -144,7 +146,7 @@ /.false dummy - ## else + ... else dummy)) (n.= expected (/.cond /.false @@ -153,7 +155,7 @@ /.true expected - ## else + ... else dummy)))) )))) @@ -399,13 +401,20 @@ (def: for_code Test (do random.monad - [example_nat random.nat] - (_.for [/.Code /.Code'] - ($_ _.and - ..for_code/' - ..for_code/` - ..for_code/`' - )))) + [example_nat random.nat + example /macro/code.random] + ($_ _.and + (_.for [/.Code /.Code'] + ($_ _.and + ..for_code/' + ..for_code/` + ..for_code/`' + )) + (_.cover [/.Ann] + (|> example + (get@ #/.meta) + (location\= location.dummy))) + ))) (/.macro: (identity_macro tokens) (\ meta.monad in tokens)) @@ -998,10 +1007,10 @@ post (random.only (|>> (n.= pre) not) random.nat) .let [box (atom.atom pre)]] (_.cover [/.exec] - (and (is? pre (io.run (atom.read box))) + (and (is? pre (io.run (atom.read! box))) (/.exec - (io.run (atom.write post box)) - (is? post (io.run (atom.read box))))))) + (io.run (atom.write! post box)) + (is? post (io.run (atom.read! box))))))) )) (def: identity/constant |