diff options
Diffstat (limited to '')
54 files changed, 440 insertions, 371 deletions
diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux index 212aa01dd..c67ade3ec 100644 --- a/stdlib/source/test/aedifex/artifact/time/date.lux +++ b/stdlib/source/test/aedifex/artifact/time/date.lux @@ -60,7 +60,7 @@ (_.cover [/.year_is_out_of_range] (case (/.date candidate) (#try.Success date) - (is? candidate (/.value date)) + (same? candidate (/.value date)) (#try.Failure error) (exception.match? /.year_is_out_of_range error))) diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux index 934810e0c..41d0f080f 100644 --- a/stdlib/source/test/aedifex/command/auto.lux +++ b/stdlib/source/test/aedifex/command/auto.lux @@ -111,7 +111,7 @@ (shell.async ($build.good_shell [])) resolution) (\ ! map (|>> (case> (#try.Failure error) - (is? end_signal error) + (same? end_signal error) (#try.Success _) false)))) diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux index 0400cbc58..2bdf72078 100644 --- a/stdlib/source/test/aedifex/command/version.lux +++ b/stdlib/source/test/aedifex/command/version.lux @@ -45,7 +45,7 @@ (if open? (try.of_maybe (do maybe.monad - [[output state] (text.split_with text.new_line state)] + [[output state] (text.split_by text.new_line state)] (in [[open? state] output]))) (exception.except ..console_is_closed! []))) (def: (on_write input [open? state]) diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux index ccccc47cd..9ddabee88 100644 --- a/stdlib/source/test/aedifex/dependency/deployment.lux +++ b/stdlib/source/test/aedifex/dependency/deployment.lux @@ -105,7 +105,7 @@ correct_library_upload! (and (|> cache - (dictionary.get library_url) + (dictionary.value library_url) (maybe\map (binary\= expected_library)) (maybe.else false)) (dictionary.key? cache (format library_url artifact/extension.sha-1)) @@ -113,7 +113,7 @@ correct_pom_upload! (and (|> cache - (dictionary.get pom_url) + (dictionary.value pom_url) (maybe\map (binary\= expected_pom)) (maybe.else false)) (dictionary.key? cache (format pom_url artifact/extension.sha-1)) diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux index e05dc712f..e05c1d753 100644 --- a/stdlib/source/test/aedifex/package.lux +++ b/stdlib/source/test/aedifex/package.lux @@ -80,7 +80,7 @@ _ false) (let [expected_sha1 (//hash.sha-1 expected_library) expected_md5 (//hash.md5 expected_library)] - (and (is? expected_library actual_library) + (and (same? expected_library actual_library) (case library_status (#//status.Verified actual_sha1 expected_md5) (and (//hash\= expected_sha1 actual_sha1) @@ -90,7 +90,7 @@ false))) (let [expected_sha1 (//hash.sha-1 binary_pom) expected_md5 (//hash.md5 binary_pom)] - (and (is? expected_pom actual_pom) + (and (same? expected_pom actual_pom) (|> (do try.monad [xml_pom (\ utf8.codec decode binary_pom) decoded_pom (\ xml.codec decode xml_pom)] diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux index 857aaf6e1..b1ec22e6c 100644 --- a/stdlib/source/test/aedifex/profile.lux +++ b/stdlib/source/test/aedifex/profile.lux @@ -155,9 +155,9 @@ (_.cover [/.default_compiler] (|> (\ /.monoid identity) (get@ #/.compiler) - (is? /.default_compiler))) + (same? /.default_compiler))) (_.cover [/.default_target] (|> (\ /.monoid identity) (get@ #/.target) - (is? /.default_target))) + (same? /.default_target))) ))))) diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux index ce7647c9e..8e8b4c945 100644 --- a/stdlib/source/test/aedifex/repository.lux +++ b/stdlib/source/test/aedifex/repository.lux @@ -71,7 +71,7 @@ (def: the_description "@") (def: (on_download uri state) - (case (dictionary.get uri state) + (case (dictionary.value uri state) (#.Some content) (case (binary.size content) 0 (exception.except ..not_found [uri]) diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux index 8cca4aee8..44f913863 100644 --- a/stdlib/source/test/aedifex/repository/remote.lux +++ b/stdlib/source/test/aedifex/repository/remote.lux @@ -47,8 +47,8 @@ (<| io.io #try.Success (if (|> headers - (dictionary.get "User-Agent") - (maybe\map (is? /.user_agent)) + (dictionary.value "User-Agent") + (maybe\map (same? /.user_agent)) (maybe.else false)) (case [method input] [#@http.Get #.None] @@ -58,7 +58,7 @@ [#@http.Put (#.Some input)] (if (|> headers - (dictionary.get "Authorization") + (dictionary.value "Authorization") (maybe\map (text\= (//identity.basic_auth user password))) (maybe.else false)) [http/status.created diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 34d3b4cc1..cf45f0ca5 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -12,18 +12,25 @@ [monad (#+ do)]] [control ["." io] + ["." maybe ("#\." functor)] [concurrency - ["." atom (#+ Atom)]]] + ["." atom (#+ Atom)]] + [parser + ["<.>" code]]] [data + ["." product] ["." bit ("#\." equivalence)] ["." text ("#\." equivalence) ["%" format (#+ format)]] [collection - ["." list] - ["." set (#+ Set)]]] + ["." list ("#\." functor)] + ["." set (#+ Set) ("#\." equivalence)] + [dictionary + ["." plist]]]] ["." macro [syntax (#+ syntax:)] - ["." code ("#\." equivalence)]] + ["." code ("#\." equivalence)] + ["." template]] ["." math ["." random ("#\." functor)] [number @@ -440,15 +447,15 @@ (_.cover [/.Macro'] (|> macro (: /.Macro') - (is? macro))) + (same? macro))) (_.cover [/.Macro] (|> macro "lux macro" (: /.Macro) (: Any) - (is? (: Any macro)))) + (same? (: Any macro)))) (_.cover [/.macro:] - (is? expected (..identity_macro expected))) + (same? expected (..identity_macro expected))) <found_crosshair?> )))))) @@ -480,61 +487,61 @@ (_.cover [/.:] (|> expected (/.: Any) - (is? (/.: Any expected)))) + (same? (/.: Any expected)))) (_.cover [/.:as] (|> expected (/.: Any) (/.:as /.Nat) - (is? expected))) - (_.cover [/.:assume] + (same? expected))) + (_.cover [/.:expected] (|> expected (/.: Any) - /.:assume + /.:expected (/.: /.Nat) - (is? expected))) + (same? expected))) (_.cover [/.:let] (let [[actual_left actual_right] (: (/.:let [side /.Nat] [side side]) [expected_left expected_right])] - (and (is? expected_left actual_left) - (is? expected_right actual_right)))) + (and (same? expected_left actual_left) + (same? expected_right actual_right)))) (_.cover [/.:of] - (is? /.Nat (/.:of expected))) + (same? /.Nat (/.:of expected))) (_.cover [/.primitive] (case (/.primitive "foo" [expected/0 expected/1]) (^ (#.Primitive "foo" (list actual/0 actual/1))) - (and (is? expected/0 actual/0) - (is? expected/1 actual/1)) + (and (same? expected/0 actual/0) + (same? expected/1 actual/1)) _ false)) (_.cover [/.type] (and (case (/.type [expected/0 expected/1]) (#.Product actual/0 actual/1) - (and (is? expected/0 actual/0) - (is? expected/1 actual/1)) + (and (same? expected/0 actual/0) + (same? expected/1 actual/1)) _ false) (case (/.type (/.Or expected/0 expected/1)) (#.Sum actual/0 actual/1) - (and (is? expected/0 actual/0) - (is? expected/1 actual/1)) + (and (same? expected/0 actual/0) + (same? expected/1 actual/1)) _ false) (case (/.type (-> expected/0 expected/1)) (#.Function actual/0 actual/1) - (and (is? expected/0 actual/0) - (is? expected/1 actual/1)) + (and (same? expected/0 actual/0) + (same? expected/1 actual/1)) _ false) (case (/.type (expected/0 expected/1)) (#.Apply actual/1 actual/0) - (and (is? expected/0 actual/0) - (is? expected/1 actual/1)) + (and (same? expected/0 actual/0) + (same? expected/1 actual/1)) _ false))) @@ -552,17 +559,17 @@ [expected random.i64] ($_ _.and (_.cover [/.i64] - (is? (: Any expected) - (: Any (/.i64 expected)))) + (same? (: Any expected) + (: Any (/.i64 expected)))) (_.cover [/.nat] - (is? (: Any expected) - (: Any (/.nat expected)))) + (same? (: Any expected) + (: Any (/.nat expected)))) (_.cover [/.int] - (is? (: Any expected) - (: Any (/.int expected)))) + (same? (: Any expected) + (: Any (/.int expected)))) (_.cover [/.rev] - (is? (: Any expected) - (: Any (/.rev expected)))) + (same? (: Any expected) + (: Any (/.rev expected)))) (_.cover [/.inc] (n.= 1 (n.- expected (/.inc expected)))) @@ -667,41 +674,41 @@ (_.cover [/.get@] (and (and (|> sample (/.get@ #big_left) - (is? start/b)) + (same? start/b)) (|> sample ((/.get@ #big_left)) - (is? start/b))) + (same? start/b))) (and (|> sample (/.get@ [#big_right #small_left]) - (is? start/s)) + (same? start/s)) (|> sample ((/.get@ [#big_right #small_left])) - (is? start/s))))) + (same? start/s))))) (_.cover [/.set@] (and (and (|> sample (/.set@ #big_left shift/b) (/.get@ #big_left) - (is? shift/b)) + (same? shift/b)) (|> sample ((/.set@ #big_left shift/b)) (/.get@ #big_left) - (is? shift/b)) + (same? shift/b)) (|> sample ((/.set@ #big_left) shift/b) (/.get@ #big_left) - (is? shift/b))) + (same? shift/b))) (and (|> sample (/.set@ [#big_right #small_left] shift/s) (/.get@ [#big_right #small_left]) - (is? shift/s)) + (same? shift/s)) (|> sample ((/.set@ [#big_right #small_left] shift/s)) (/.get@ [#big_right #small_left]) - (is? shift/s)) + (same? shift/s)) (|> sample ((/.set@ [#big_right #small_left]) shift/s) (/.get@ [#big_right #small_left]) - (is? shift/s))))) + (same? shift/s))))) (_.cover [/.update@] (and (and (|> sample (/.update@ #big_left (n.+ shift/b)) @@ -852,11 +859,11 @@ (: /.Any (hide left)) true))) - (_.cover [/.is?] + (_.cover [/.same?] (let [not_left (|> left inc dec)] - (and (/.is? left left) + (and (/.same? left left) (and (n.= not_left left) - (not (/.is? not_left left)))))) + (not (/.same? not_left left)))))) (_.cover [/.Rec] (let [list (: (/.Rec NList (Maybe [Nat NList])) @@ -866,9 +873,9 @@ #.None])])]))] (case list (#.Some [actual/0 (#.Some [actual/1 (#.Some [actual/2 #.None])])]) - (and (is? item/0 actual/0) - (is? item/1 actual/1) - (is? item/2 actual/2)) + (and (same? item/0 actual/0) + (same? item/1 actual/1) + (same? item/2 actual/2)) _ false))) @@ -939,8 +946,8 @@ (_.cover [/.^slots] (/.case {#left expected_nat #right expected_int} (/.^slots [#left #right]) - (and (/.is? expected_nat left) - (/.is? expected_int right)))) + (and (/.same? expected_nat left) + (/.same? expected_int right)))) (_.cover [/.^] (/.case {#left expected_nat #right expected_int} (/.^ (!pair 0 +0)) true @@ -950,9 +957,9 @@ {#left expected_nat #right expected_int})] (/.case expected_pair (/.^@ actual_pair (/.^ (!pair actual_left actual_right))) - (and (/.is? expected_pair actual_pair) - (/.is? expected_nat actual_left) - (/.is? expected_int actual_right))))) + (and (/.same? expected_pair actual_pair) + (/.same? expected_nat actual_left) + (/.same? expected_int actual_right))))) (_.cover [/.^multi] (let [expected_pair (: (Pair Nat Int) {#left expected_nat #right expected_int})] @@ -982,10 +989,10 @@ _ false)) (_.cover [/.let] (and (/.let [actual_nat expected_nat] - (/.is? expected_nat actual_nat)) + (/.same? expected_nat actual_nat)) (/.let [[actual_left actual_right] {#left expected_nat #right expected_int}] - (and (/.is? expected_nat actual_left) - (/.is? expected_int actual_right))))) + (and (/.same? expected_nat actual_left) + (/.same? expected_int actual_right))))) ))) (def: for_control_flow @@ -1007,10 +1014,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 (same? pre (io.run! (atom.read! box))) (/.exec (io.run! (atom.write! post box)) - (is? post (io.run! (atom.read! box))))))) + (same? post (io.run! (atom.read! box))))))) )) (def: identity/constant @@ -1027,38 +1034,8 @@ (do random.monad [expected random.nat] (_.cover [/.def:] - (and (is? expected (identity/constant expected)) - (is? expected (identity/function expected)))))) - -(.refer "library/lux/target" #*) -(.refer "library/lux/macro" #all) -(.refer "library/lux/math/number/nat" #_) -(.refer "library/lux/math/number/int" #nothing) -(.refer "library/lux/math/number/rev" (#+ /4096)) -(.refer "library/lux/math/number/frac" (#only positive_infinity)) -(.refer "library/lux/math/number/i8" (#- equivalence width i8 i64)) -(.refer "library/lux/math/number/i16" (#exclude equivalence width i16 i64)) - -(def: for_import - Test - (let [can_access? (: (All [a] (-> a a Bit)) - (function (_ global local) - (is? global local)))] - ($_ _.and - (_.cover [/.refer] - (and (can_access? library/lux/target.jvm - jvm) - (can_access? library/lux/macro.single_expansion - single_expansion) - (can_access? library/lux/math/number/rev./4096 - /4096) - (can_access? library/lux/math/number/frac.positive_infinity - positive_infinity) - (can_access? library/lux/math/number/i8.I8 - I8) - (can_access? library/lux/math/number/i16.I16 - I16))) - ))) + (and (same? expected (identity/constant expected)) + (same? expected (identity/function expected)))))) (def: possible_targets (Set @.Target) @@ -1110,36 +1087,119 @@ (bit\= /.private /.local))) )) +(for {@.old (as_is)} + (as_is (syntax: (for_bindings|test [fn/0 <code>.local_identifier + var/0 <code>.local_identifier + let/0 <code>.local_identifier + + fn/1 <code>.local_identifier + var/1 <code>.local_identifier + let/1 <code>.local_identifier + + fn/2 <code>.local_identifier + var/2 <code>.local_identifier + let/2 <code>.local_identifier + + let/3 <code>.local_identifier]) + (in (list (code.bit (case (get@ #.scopes *lux*) + (^ (list& scope/2 _)) + (let [locals/2 (get@ #.locals scope/2) + expected_locals/2 (set.of_list text.hash (list fn/2 var/2 let/2 + let/3)) + actual_locals/2 (|> locals/2 + (get@ #.mappings) + (list\map product.left) + (set.of_list text.hash)) + + correct_locals! + (and (n.= 4 (get@ #.counter locals/2)) + (set\= expected_locals/2 + actual_locals/2)) + + captured/2 (get@ #.captured scope/2) + + local? (: (-> Ref Bit) + (function (_ ref) + (case ref + (#.Local _) true + (#.Captured _) false))) + captured? (: (-> Ref Bit) + (|>> local? not)) + binding? (: (-> (-> Ref Bit) Text Bit) + (function (_ is? name) + (|> captured/2 + (get@ #.mappings) + (plist.value name) + (maybe\map (|>> product.right is?)) + (maybe.else false)))) + + correct_closure! + (and (n.= 6 (get@ #.counter captured/2)) + (binding? local? fn/1) + (binding? local? var/1) + (binding? local? let/1) + (binding? captured? fn/0) + (binding? captured? var/0) + (binding? captured? let/0))] + (and correct_locals! + correct_closure!)) + + _ + false))))) + + (def: for_bindings + Test + ((<| (template.with_locals [fn/0 var/0 let/0 + fn/1 var/1 let/1 + fn/2 var/2 let/2 + let/3]) + (function (fn/0 var/0)) (let [let/0 123]) + (function (fn/1 var/1)) (let [let/1 456]) + (function (fn/2 var/2)) (let [let/2 789]) + (let [let/3 [fn/0 var/0 let/0 + fn/1 var/1 let/1 + fn/2 var/2 let/2] + verdict (for_bindings|test fn/0 var/0 let/0 + fn/1 var/1 let/1 + fn/2 var/2 let/2 + let/3)] + (_.cover [/.Bindings /.Ref] + verdict))) + 0 1 2)))) + (def: test Test (<| (_.covering /._) - ($_ _.and - ..for_bit - ..for_try - ..for_list - ..for_interface - ..for_module - ..for_pipe - ..for_code - ..for_macro - ..for_type - ..for_i64 - ..for_function - ..for_template - ..for_static - ..for_slot - ..for_associative - ..for_expansion - ..for_value - ..for_case - ..for_control_flow - ..for_def: - ..for_import - ..for_meta - ..for_export - - ..sub_tests - ))) + (with_expansions + [<for_bindings> (for {@.old (~~ (as_is))} + (~~ (as_is ..for_bindings)))] + (`` ($_ _.and + ..for_bit + ..for_try + ..for_list + ..for_interface + ..for_module + ..for_pipe + ..for_code + ..for_macro + ..for_type + ..for_i64 + ..for_function + ..for_template + ..for_static + ..for_slot + ..for_associative + ..for_expansion + ..for_value + ..for_case + ..for_control_flow + ..for_def: + ..for_meta + ..for_export + <for_bindings> + + ..sub_tests + ))))) (program: args (let [times (for {@.old 100 diff --git a/stdlib/source/test/lux/abstract/codec.lux b/stdlib/source/test/lux/abstract/codec.lux index debc5c17c..fe3a58e71 100644 --- a/stdlib/source/test/lux/abstract/codec.lux +++ b/stdlib/source/test/lux/abstract/codec.lux @@ -27,7 +27,7 @@ list json.object)) (def: decode - (json.get_boolean field))))) + (json.boolean_field field))))) (def: codec (Codec Text Bit) diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux index 2da826ebb..c6b381829 100644 --- a/stdlib/source/test/lux/control/concurrency/actor.lux +++ b/stdlib/source/test/lux/control/concurrency/actor.lux @@ -152,7 +152,7 @@ (not alive?) (exception.match? ..got_wrecked error) (n.= initial_state state) - (is? die! single_pending_message)) + (same? die! single_pending_message)) _ false))))) diff --git a/stdlib/source/test/lux/control/concurrency/atom.lux b/stdlib/source/test/lux/control/concurrency/atom.lux index 939fe7d9f..1b0510c45 100644 --- a/stdlib/source/test/lux/control/concurrency/atom.lux +++ b/stdlib/source/test/lux/control/concurrency/atom.lux @@ -24,10 +24,10 @@ (io.run! (do io.monad [actual (/.read! box)] - (in (is? expected actual)))))) + (in (same? expected actual)))))) (do random.monad [target random.nat - unknown (random.only (|>> (is? target) not) random.nat) + unknown (random.only (|>> (same? target) not) random.nat) expected random.nat .let [box (/.atom target)]] (_.cover [/.compare_and_swap!] @@ -38,7 +38,7 @@ actual (/.read! box)] (in (and (not swapped_unknown?) swapped_target? - (is? expected actual))))))) + (same? expected actual))))))) (do random.monad [init random.nat shift random.nat @@ -47,7 +47,7 @@ (io.run! (do io.monad [[pre post] (/.update! (n.+ shift) box)] - (in (and (is? init pre) + (in (and (same? init pre) (n.= (n.+ shift init) post))))))) (do random.monad @@ -59,6 +59,6 @@ (do io.monad [old (/.write! post box) new (/.read! box)] - (in (and (is? pre old) - (is? post new))))))) + (in (and (same? pre old) + (same? post new))))))) ))) diff --git a/stdlib/source/test/lux/control/continuation.lux b/stdlib/source/test/lux/control/continuation.lux index 357c87d61..03f3ae2c3 100644 --- a/stdlib/source/test/lux/control/continuation.lux +++ b/stdlib/source/test/lux/control/continuation.lux @@ -85,12 +85,12 @@ (list\= elems (/.result (/.reset (visit elems)))))) (_.cover [/.continue] - (/.continue (is? sample) + (/.continue (same? sample) (: (/.Cont Nat Bit) (function (_ next) (next sample))))) (_.cover [/.pending] - (/.continue (is? sample) + (/.continue (same? sample) (: (/.Cont Nat Bit) (/.pending sample)))) ))) diff --git a/stdlib/source/test/lux/control/function.lux b/stdlib/source/test/lux/control/function.lux index b65995923..01da979e6 100644 --- a/stdlib/source/test/lux/control/function.lux +++ b/stdlib/source/test/lux/control/function.lux @@ -50,8 +50,8 @@ (_.cover [/.constant] (n.= expected ((/.constant expected) dummy))) - (_.cover [/.flip] - (let [outcome ((/.flip n.-) expected extra)] + (_.cover [/.flipped] + (let [outcome ((/.flipped n.-) expected extra)] (and (n.= (n.- extra expected) outcome) (not (n.= (n.- expected extra) diff --git a/stdlib/source/test/lux/control/function/contract.lux b/stdlib/source/test/lux/control/function/contract.lux index 436ba2282..48246a7c2 100644 --- a/stdlib/source/test/lux/control/function/contract.lux +++ b/stdlib/source/test/lux/control/function/contract.lux @@ -31,7 +31,7 @@ (case (try (/.post n.odd? expected)) (#try.Success actual) - (is? expected actual) + (same? expected actual) (#try.Failure error) (not (n.odd? expected)))) diff --git a/stdlib/source/test/lux/control/lazy.lux b/stdlib/source/test/lux/control/lazy.lux index c9de9cb25..ea1b1f787 100644 --- a/stdlib/source/test/lux/control/lazy.lux +++ b/stdlib/source/test/lux/control/lazy.lux @@ -60,8 +60,8 @@ (_.cover [/.value] (let [lazy (/.lazy <eager>)] - (and (not (is? expected - (/.value lazy))) - (is? (/.value lazy) - (/.value lazy))))) + (and (not (same? expected + (/.value lazy))) + (same? (/.value lazy) + (/.value lazy))))) )))))) diff --git a/stdlib/source/test/lux/control/maybe.lux b/stdlib/source/test/lux/control/maybe.lux index a2a85eae1..5d9a04a0b 100644 --- a/stdlib/source/test/lux/control/maybe.lux +++ b/stdlib/source/test/lux/control/maybe.lux @@ -64,15 +64,15 @@ [default random.nat value random.nat] (_.cover [/.else] - (and (is? default (/.else default - #.None)) + (and (same? default (/.else default + #.None)) - (is? value (/.else default - (#.Some value)))))) + (same? value (/.else default + (#.Some value)))))) (do random.monad [value random.nat] (_.cover [/.assume] - (is? value (/.assume (#.Some value))))) + (same? value (/.assume (#.Some value))))) (do random.monad [value random.nat] (_.cover [/.list] diff --git a/stdlib/source/test/lux/control/parser/type.lux b/stdlib/source/test/lux/control/parser/type.lux index 55398c22e..b348c1da2 100644 --- a/stdlib/source/test/lux/control/parser/type.lux +++ b/stdlib/source/test/lux/control/parser/type.lux @@ -140,7 +140,7 @@ /.any) not_parameter) (!expect (^multi (#try.Success [quantification\\binding argument\\binding actual]) - (is? not_parameter actual))))) + (same? not_parameter actual))))) (_.cover [/.parameter] (|> (/.result (<| (/.with_extension quantification) (/.with_extension argument) @@ -182,7 +182,7 @@ (type.univ_q expected_inputs not_polymorphic)) (!expect (^multi (#try.Success [g!poly actual_inputs bodyT]) (and (n.= expected_inputs (list.size actual_inputs)) - (is? not_polymorphic bodyT)))))) + (same? not_polymorphic bodyT)))))) ))) (def: .public test @@ -232,7 +232,7 @@ (in env)) expected) (!expect (^multi (#try.Success environment) - (is? /.fresh environment)))))) + (same? /.fresh environment)))))) (do {! random.monad} [expected ..primitive dummy (random.only (|>> (type\= expected) not) diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux index 4fbb71916..ceda7b3a9 100644 --- a/stdlib/source/test/lux/control/region.lux +++ b/stdlib/source/test/lux/control/region.lux @@ -63,13 +63,13 @@ == (Try a) - (thread.result (:assume (/.run! thread.monad left)))) + (thread.result (:expected (/.run! thread.monad left)))) (:sharing [a] (Equivalence a) == (Try a) - (thread.result (:assume (/.run! thread.monad right))))] + (thread.result (:expected (/.run! thread.monad right))))] [(#try.Success left) (#try.Success right)] (== left right) diff --git a/stdlib/source/test/lux/control/remember.lux b/stdlib/source/test/lux/control/remember.lux index ea3750151..045e2d0df 100644 --- a/stdlib/source/test/lux/control/remember.lux +++ b/stdlib/source/test/lux/control/remember.lux @@ -99,7 +99,7 @@ false) (case should_succeed1 (^ (#try.Success (list actual))) - (is? expected actual) + (same? expected actual) _ false) diff --git a/stdlib/source/test/lux/control/security/capability.lux b/stdlib/source/test/lux/control/security/capability.lux index 8c0a42952..801dc3014 100644 --- a/stdlib/source/test/lux/control/security/capability.lux +++ b/stdlib/source/test/lux/control/security/capability.lux @@ -35,7 +35,7 @@ (let [capability (..can_shift (function (_ [no_op raw]) [no_op (n.+ shift raw)])) [untouched actual] (/.use capability [pass_through base])] - (and (is? pass_through untouched) + (and (same? pass_through untouched) (n.= expected actual)))) (in (let [capability (..can_io (function (_ _) (io.io expected)))] (do async.monad diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux index 3270e17a7..d45cc6554 100644 --- a/stdlib/source/test/lux/data/binary.lux +++ b/stdlib/source/test/lux/data/binary.lux @@ -147,7 +147,7 @@ (_.cover [/.copy] (and (case (/.copy size 0 sample 0 (/.empty size)) (#try.Success output) - (and (not (is? sample output)) + (and (not (same? sample output)) (\ /.equivalence = sample output)) (#try.Failure _) diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux index 64e0f4268..c7433632e 100644 --- a/stdlib/source/test/lux/data/collection/array.lux +++ b/stdlib/source/test/lux/data/collection/array.lux @@ -56,15 +56,15 @@ .let [expected (n.+ base shift)] the_array (random.array size random.nat)] ($_ _.and - (_.cover [/.find] + (_.cover [/.example] (\ (maybe.equivalence n.equivalence) = - (/.find n.even? the_array) - (list.find n.even? (/.list the_array)))) - (_.cover [/.find+] - (case [(/.find n.even? the_array) - (/.find+ (function (_ idx member) - (n.even? member)) - the_array)] + (/.example n.even? the_array) + (list.example n.even? (/.list the_array)))) + (_.cover [/.example+] + (case [(/.example n.even? the_array) + (/.example+ (function (_ idx member) + (n.even? member)) + the_array)] [(#.Some expected) (#.Some [idx actual])] (case (/.read idx the_array) (#.Some again) @@ -110,7 +110,7 @@ (_.cover [/.type_name] (case /.Array (^ (#.Named _ (#.UnivQ _ (#.Primitive nominal_type (list (#.Parameter 1)))))) - (is? /.type_name nominal_type) + (same? /.type_name nominal_type) _ false)) @@ -199,7 +199,7 @@ (/.list copy)))))) (_.cover [/.clone] (let [clone (/.clone the_array)] - (and (not (is? the_array clone)) + (and (not (same? the_array clone)) (\ (/.equivalence n.equivalence) = the_array clone)))) (let [the_array (/.clone the_array) evens (|> the_array /.list (list.only n.even?)) @@ -220,6 +220,6 @@ (exec (/.filter! n.even? the_array) (list.every? (function (_ value) (or (n.even? value) - (is? default value))) + (same? default value))) (/.list' default the_array))))) )))) diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux index da4a759e5..6710ef7c6 100644 --- a/stdlib/source/test/lux/data/collection/bits.lux +++ b/stdlib/source/test/lux/data/collection/bits.lux @@ -27,7 +27,7 @@ 0 (in /.empty) _ (do {! random.monad} [idx (|> random.nat (\ ! map (n.% size)))] - (in (/.set idx /.empty)))))) + (in (/.one idx /.empty)))))) (def: .public test Test @@ -51,38 +51,38 @@ idx (\ ! map (n.% size) random.nat) sample ..random] ($_ _.and - (_.cover [/.get /.set] - (and (|> /.empty (/.get idx) not) - (|> /.empty (/.set idx) (/.get idx)))) - (_.cover [/.clear] - (|> /.empty (/.set idx) (/.clear idx) (/.get idx) not)) - (_.cover [/.flip] - (and (|> /.empty (/.flip idx) (/.get idx)) - (|> /.empty (/.flip idx) (/.flip idx) (/.get idx) not))) + (_.cover [/.bit /.one] + (and (|> /.empty (/.bit idx) not) + (|> /.empty (/.one idx) (/.bit idx)))) + (_.cover [/.zero] + (|> /.empty (/.one idx) (/.zero idx) (/.bit idx) not)) + (_.cover [/.flipped] + (and (|> /.empty (/.flipped idx) (/.bit idx)) + (|> /.empty (/.flipped idx) (/.flipped idx) (/.bit idx) not))) (_.cover [/.Chunk /.capacity /.chunk_size] (and (n.= 0 (/.capacity /.empty)) - (|> /.empty (/.set idx) /.capacity + (|> /.empty (/.one idx) /.capacity (n.- idx) (predicate.or (n.>= 0) (n.< /.chunk_size))) - (let [grown (/.flip idx /.empty)] + (let [grown (/.flipped idx /.empty)] (and (n.> 0 (/.capacity grown)) - (is? /.empty (/.flip idx grown)))))) + (same? /.empty (/.flipped idx grown)))))) (_.cover [/.intersects?] (and (not (/.intersects? /.empty /.empty)) - (/.intersects? (/.set idx /.empty) - (/.set idx /.empty)) - (not (/.intersects? (/.set (inc idx) /.empty) - (/.set idx /.empty))) + (/.intersects? (/.one idx /.empty) + (/.one idx /.empty)) + (not (/.intersects? (/.one (inc idx) /.empty) + (/.one idx /.empty))) (not (/.intersects? sample (/.not sample))))) (_.cover [/.not] - (and (is? /.empty (/.not /.empty)) - (or (is? /.empty sample) + (and (same? /.empty (/.not /.empty)) + (or (same? /.empty sample) (and (not (\ /.equivalence = sample (/.not sample))) (\ /.equivalence = sample (/.not (/.not sample))))))) (_.cover [/.xor] - (and (is? /.empty (/.xor sample sample)) + (and (same? /.empty (/.xor sample sample)) (n.= (/.size (/.xor sample (/.not sample))) (/.capacity sample)))) (_.cover [/.or] @@ -91,5 +91,5 @@ (/.capacity sample)))) (_.cover [/.and] (and (\ /.equivalence = sample (/.and sample sample)) - (is? /.empty (/.and sample (/.not sample))))) + (same? /.empty (/.and sample (/.not sample))))) ))))) diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux index 8667b7054..7114a2eed 100644 --- a/stdlib/source/test/lux/data/collection/dictionary.lux +++ b/stdlib/source/test/lux/data/collection/dictionary.lux @@ -60,7 +60,7 @@ (def: (hash _) constant)))]] (_.cover [/.key_hash] - (is? hash (/.key_hash (/.empty hash))))) + (same? hash (/.key_hash (/.empty hash))))) (_.cover [/.entries] (let [entries (/.entries dict) @@ -79,7 +79,7 @@ correct_pairing! (list.every? (function (_ [key value]) (|> dict - (/.get key) + (/.value key) (maybe\map (n.= value)) (maybe.else false))) entries)] @@ -145,19 +145,19 @@ (list.every? (/.key? dict) (/.keys dict))) - (_.cover [/.get] - (and (list.every? (function (_ key) (case (/.get key dict) + (_.cover [/.value] + (and (list.every? (function (_ key) (case (/.value key dict) (#.Some _) true _ false)) (/.keys dict)) - (case (/.get non_key dict) + (case (/.value non_key dict) (#.Some _) false _ true))) (_.cover [/.has] (and (n.= (inc (/.size dict)) (/.size (/.has non_key test_val dict))) - (case (/.get non_key (/.has non_key test_val dict)) + (case (/.value non_key (/.has non_key test_val dict)) (#.Some v) (n.= test_val v) _ true))) @@ -165,7 +165,7 @@ (let [can_put_new_keys! (case (/.try_put non_key test_val dict) (#try.Success dict) - (case (/.get non_key dict) + (case (/.value non_key dict) (#.Some v) (n.= test_val v) _ true) @@ -199,7 +199,7 @@ (_.cover [/.revised] (let [base (/.has non_key test_val dict) updt (/.revised non_key inc base)] - (case [(/.get non_key base) (/.get non_key updt)] + (case [(/.value non_key base) (/.value non_key updt)] [(#.Some x) (#.Some y)] (n.= (inc x) y) @@ -208,7 +208,7 @@ (_.cover [/.upsert] (let [can_upsert_new_key! - (case (/.get non_key (/.upsert non_key test_val inc dict)) + (case (/.value non_key (/.upsert non_key test_val inc dict)) (#.Some inserted) (n.= (inc test_val) inserted) @@ -221,7 +221,7 @@ true (#.Some [known_key known_value]) - (case (/.get known_key (/.upsert known_key test_val inc dict)) + (case (/.value known_key (/.upsert known_key test_val inc dict)) (#.Some updated) (n.= (inc known_value) updated) @@ -244,8 +244,8 @@ (and (n.= (/.size dict) (/.size rebound)) (/.key? rebound non_key) (not (/.key? rebound first_key)) - (n.= (maybe.assume (/.get first_key dict)) - (maybe.assume (/.get non_key rebound))))))) + (n.= (maybe.assume (/.value first_key dict)) + (maybe.assume (/.value non_key rebound))))))) ))) (def: .public test diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux index b2bed04f9..838d2cf5d 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux @@ -113,10 +113,10 @@ (and (/.key? sample+ extra_key) (n.= (inc (/.size sample)) (/.size sample+)))))) - (_.cover [/.get] + (_.cover [/.value] (let [sample+ (/.has extra_key extra_value sample)] - (case [(/.get extra_key sample) - (/.get extra_key sample+)] + (case [(/.value extra_key sample) + (/.value extra_key sample+)] [#.None (#.Some actual)] (n.= extra_value actual) @@ -131,7 +131,7 @@ (|> sample (/.has extra_key extra_value) (/.revised extra_key (n.+ shift)) - (/.get extra_key) + (/.value extra_key) (maybe\map (n.= (n.+ shift extra_value))) (maybe.else false))) )))) diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux index b36d5d9d2..c76892185 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux @@ -71,17 +71,17 @@ (/.contains? extra_key sample+) (n.= (inc (/.size sample)) (/.size sample+))))) - (_.cover [/.get] + (_.cover [/.value] (|> sample (/.has extra_key extra_value) - (/.get extra_key) + (/.value extra_key) (maybe\map (n.= extra_value)) (maybe.else false))) (_.cover [/.revised] (|> sample (/.has extra_key extra_value) (/.revised extra_key (n.+ shift)) - (/.get extra_key) + (/.value extra_key) (maybe\map (n.= (n.+ shift extra_value))) (maybe.else false))) (_.cover [/.lacks] diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index e9be412e2..7fb1e8704 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -122,7 +122,7 @@ symmetry! (/\= (/.sorted <<< sample) - (/.reversed (/.sorted (function.flip <<<) sample)))] + (/.reversed (/.sorted (function.flipped <<<) sample)))] (and size_preservation! symmetry!))) ))) @@ -206,18 +206,18 @@ (let [[left right] (/.split idx sample)] (/\= sample (/\compose left right)))) - (_.cover [/.split_with] - (let [[left right] (/.split_with n.even? sample)] + (_.cover [/.split_when] + (let [[left right] (/.split_when n.even? sample)] (/\= sample (/\compose left right)))) (_.cover [/.take /.drop] (/\= sample (/\compose (/.take idx sample) (/.drop idx sample)))) - (_.cover [/.take_while /.drop_while] + (_.cover [/.while /.until] (/\= sample - (/\compose (/.take_while n.even? sample) - (/.drop_while n.even? sample)))) + (/\compose (/.while n.even? sample) + (/.until n.even? sample)))) (_.cover [/.sub] (let [subs (/.sub sub_size sample)] (and (/.every? (|>> /.size (n.<= sub_size)) subs) @@ -380,8 +380,8 @@ (/.only n.even?) (/\map (\ n.decimal encode))) (/.all choose sample))) - (_.cover [/.find] - (case (/.find n.even? sample) + (_.cover [/.example] + (case (/.example n.even? sample) (#.Some found) (n.even? found) diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux index a6e4679fb..3ae89efba 100644 --- a/stdlib/source/test/lux/data/collection/row.lux +++ b/stdlib/source/test/lux/data/collection/row.lux @@ -103,7 +103,7 @@ (do try.monad [sample (/.put good_index non_member sample) actual (/.item good_index sample)] - (in (is? non_member actual))))) + (in (same? non_member actual))))) (_.cover [/.revised] (<| (try.else false) (do try.monad diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index 61c301f94..9a2c78afb 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -65,19 +65,19 @@ drops) (list\= (enum.range n.enum size (dec (n.* 2 size))) (/.take size takes))))) - (_.cover [/.take_while] + (_.cover [/.while] (list\= (enum.range n.enum 0 (dec size)) - (/.take_while (n.< size) (/.iterations inc 0)))) - (_.cover [/.drop_while] + (/.while (n.< size) (/.iterations inc 0)))) + (_.cover [/.until] (list\= (enum.range n.enum offset (dec (n.+ size offset))) - (/.take_while (n.< (n.+ size offset)) - (/.drop_while (n.< offset) (/.iterations inc 0))))) - (_.cover [/.split_while] - (let [[drops takes] (/.split_while (n.< size) (/.iterations inc 0))] + (/.while (n.< (n.+ size offset)) + (/.until (n.< offset) (/.iterations inc 0))))) + (_.cover [/.split_when] + (let [[drops takes] (/.split_when (n.= size) (/.iterations inc 0))] (and (list\= (enum.range n.enum 0 (dec size)) drops) (list\= (enum.range n.enum size (dec (n.* 2 size))) - (/.take_while (n.< (n.* 2 size)) takes))))) + (/.while (n.< (n.* 2 size)) takes))))) (_.cover [/.head] (n.= offset (/.head (/.iterations inc offset)))) diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux index bd76d5bf3..e6dbd5c3d 100644 --- a/stdlib/source/test/lux/data/collection/set.lux +++ b/stdlib/source/test/lux/data/collection/set.lux @@ -61,7 +61,7 @@ constant)))) random.nat)] (_.cover [/.member_hash] - (is? hash (/.member_hash (/.empty hash))))) + (same? hash (/.member_hash (/.empty hash))))) (_.cover [/.size] (n.= sizeL (/.size setL))) (_.cover [/.empty?] diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux index 1cb75755f..591308f56 100644 --- a/stdlib/source/test/lux/data/collection/stack.lux +++ b/stdlib/source/test/lux/data/collection/stack.lux @@ -62,8 +62,8 @@ (_.cover [/.push] (case (/.pop (/.push expected_top sample)) (#.Some [actual_top actual_sample]) - (and (is? expected_top actual_top) - (is? sample actual_sample)) + (and (same? expected_top actual_top) + (same? sample actual_sample)) #.None false)) diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux index 51bc3ac0e..33b2622f4 100644 --- a/stdlib/source/test/lux/data/format/json.lux +++ b/stdlib/source/test/lux/data/format/json.lux @@ -103,9 +103,9 @@ (#try.Failure error) false)) - (_.cover [/.get] + (_.cover [/.field] (list.every? (function (_ [key expected]) - (|> (/.get key object) + (|> (/.field key object) (try\map (\= expected)) (try.else false))) expected)) @@ -115,18 +115,18 @@ unknown (random.only (|>> (\ text.equivalence = key) not) (random.ascii/alpha 1)) expected random.safe_frac] - (_.cover [/.set] + (_.cover [/.has] (<| (try.else false) (do try.monad - [object (/.set key (#/.Number expected) (/.object (list))) + [object (/.has key (#/.Number expected) (/.object (list))) .let [can_find_known_key! (|> object - (/.get key) + (/.field key) (try\map (\= (#/.Number expected))) (try.else false)) cannot_find_unknown_key! - (case (/.get unknown object) + (case (/.field unknown object) (#try.Success _) false @@ -134,21 +134,21 @@ true)]] (in (and can_find_known_key! cannot_find_unknown_key!)))))) - (~~ (template [<type> <get> <tag> <random> <equivalence>] + (~~ (template [<type> <field> <tag> <random> <equivalence>] [(do random.monad [key (random.ascii/alpha 1) value <random>] - (_.cover [<type> <get>] + (_.cover [<type> <field>] (|> (/.object (list [key (<tag> value)])) - (<get> key) + (<field> key) (try\map (\ <equivalence> = value)) (try.else false))))] - [/.Boolean /.get_boolean #/.Boolean random.bit bit.equivalence] - [/.Number /.get_number #/.Number random.safe_frac frac.equivalence] - [/.String /.get_string #/.String (random.ascii/alpha 1) text.equivalence] - [/.Array /.get_array #/.Array (random.row 3 ..random) (row.equivalence /.equivalence)] - [/.Object /.get_object #/.Object (random.dictionary text.hash 3 (random.ascii/alpha 1) ..random) (dictionary.equivalence /.equivalence)] + [/.Boolean /.boolean_field #/.Boolean random.bit bit.equivalence] + [/.Number /.number_field #/.Number random.safe_frac frac.equivalence] + [/.String /.string_field #/.String (random.ascii/alpha 1) text.equivalence] + [/.Array /.array_field #/.Array (random.row 3 ..random) (row.equivalence /.equivalence)] + [/.Object /.object_field #/.Object (random.dictionary text.hash 3 (random.ascii/alpha 1) ..random) (dictionary.equivalence /.equivalence)] )) (with_expansions [<boolean> (boolean) <number> (number) @@ -182,13 +182,13 @@ <key5> {<key6> <number>}})] (<| (try.else false) (do try.monad - [value0 (/.get <key0> object) - value1 (/.get <key1> object) - value2 (/.get <key2> object) - value3 (/.get <key3> object) - value4 (/.get <key4> object) - value5 (/.get <key5> object) - value6 (/.get <key6> value5)] + [value0 (/.field <key0> object) + value1 (/.field <key1> object) + value2 (/.field <key2> object) + value3 (/.field <key3> object) + value4 (/.field <key4> object) + value5 (/.field <key5> object) + value6 (/.field <key6> value5)] (in (and (\= #/.Null value0) (\= (#/.Boolean <boolean>) value1) (\= (#/.Number <number>) value2) diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux index 2cde215a0..2856d3476 100644 --- a/stdlib/source/test/lux/data/name.lux +++ b/stdlib/source/test/lux/data/name.lux @@ -56,8 +56,8 @@ #1))))) (_.cover [/.module /.short] - (and (is? module1 (/.module name1)) - (is? short1 (/.short name1)))) + (and (same? module1 (/.module name1)) + (same? short1 (/.short name1)))) (_.for [.name_of] (let [(^open "/\.") /.equivalence] ($_ _.and diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index f2bcccfc6..f95757333 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -195,10 +195,10 @@ (_.cover [/.joined] (n.= (set.size characters) (/.size (/.joined (set.list characters))))) - (_.cover [/.join_with /.split_all_with] + (_.cover [/.join_with /.all_split_by] (and (|> (set.list characters) (/.join_with separator) - (/.split_all_with separator) + (/.all_split_by separator) (set.of_list /.hash) (\ set.equivalence = characters)) (\ /.equivalence = @@ -208,8 +208,8 @@ (\ /.equivalence = (\ /.monoid compose post static) (/.replaced/1 pre post (\ /.monoid compose pre static)))) - (_.cover [/.split_with] - (case (/.split_with static ($_ (\ /.monoid compose) pre static post)) + (_.cover [/.split_by] + (case (/.split_by static ($_ (\ /.monoid compose) pre static post)) (#.Some [left right]) (and (\ /.equivalence = pre left) (\ /.equivalence = post right)) diff --git a/stdlib/source/test/lux/data/text/format.lux b/stdlib/source/test/lux/data/text/format.lux index e612dc9b6..f2887f530 100644 --- a/stdlib/source/test/lux/data/text/format.lux +++ b/stdlib/source/test/lux/data/text/format.lux @@ -147,7 +147,7 @@ [/.text text.format (random.unicode 5)] [/.code code.format $///code.random] - [/.type type.format $///type.random] + [/.type type.format ($///type.random 0)] [/.location location.format ($_ random.and (random.unicode 5) diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux index 4415a3798..2f94947a5 100644 --- a/stdlib/source/test/lux/debug.lux +++ b/stdlib/source/test/lux/debug.lux @@ -109,7 +109,7 @@ [sample_ratio $//ratio.random sample_name ($//name.random 5 5) sample_location $//location.random - sample_type $//type.random + sample_type ($//type.random 0) sample_code $//code.random sample_xml $//xml.random sample_json $//json.random] diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux index 994430c85..6e41aef82 100644 --- a/stdlib/source/test/lux/ffi.js.lux +++ b/stdlib/source/test/lux/ffi.js.lux @@ -73,7 +73,7 @@ (exec (: (Ex [a] (/.Object a)) (: <type> - (:assume []))) + (:expected []))) true))] [/.Function] diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index 2a6e714af..24c4c6f11 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -203,7 +203,7 @@ (_.cover [/.:cast] (|> string (/.:cast java/lang/Object) - (is? (:as java/lang/Object string)))) + (same? (:as java/lang/Object string)))) (_.cover [/.type] (and (and (type\= /.Boolean (/.type java/lang/Boolean)) (type\= /.Boolean (/.type boolean))) @@ -272,8 +272,8 @@ (:as java/lang/Long expected))) example/0! - (is? (: Any expected) - (: Any (test/TestInterface0::actual0 object/0))) + (same? (: Any expected) + (: Any (test/TestInterface0::actual0 object/0))) object/1 (/.object [] [test/TestInterface1] [] @@ -288,8 +288,8 @@ example/1! (and (case (test/TestInterface1::actual1 false object/1) (#try.Success actual) - (is? (: Any expected) - (: Any actual)) + (same? (: Any expected) + (: Any actual)) (#try.Failure error) false) @@ -307,8 +307,8 @@ a input)) example/2! - (is? (: Any expected) - (: Any (test/TestInterface2::actual2 (:as java/lang/Long expected) object/2))) + (same? (: Any expected) + (: Any (test/TestInterface2::actual2 (:as java/lang/Long expected) object/2))) object/3 (/.object [] [(test/TestInterface3 java/lang/Long)] [] @@ -318,8 +318,8 @@ (:as java/lang/Long expected))) example/3! - (is? (: Any expected) - (: Any (test/TestInterface3::actual3 object/3))) + (same? (: Any expected) + (: Any (test/TestInterface3::actual3 object/3))) example/4! (let [expected (i.+ left right) @@ -560,7 +560,7 @@ (|> object/9 test/TestClass9::get_actual9 (:as java/lang/Long) - (is? dummy/2))]] + (same? dummy/2))]] ($_ _.and (_.cover [/.class: /.import:] (and example/0! diff --git a/stdlib/source/test/lux/ffi.rb.lux b/stdlib/source/test/lux/ffi.rb.lux index a6ba3d949..f39893779 100644 --- a/stdlib/source/test/lux/ffi.rb.lux +++ b/stdlib/source/test/lux/ffi.rb.lux @@ -47,6 +47,6 @@ [/.Function] )))) (_.cover [/.import:] - (is? (..File::SEPARATOR) - (..File::SEPARATOR))) + (same? (..File::SEPARATOR) + (..File::SEPARATOR))) ))))) diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux index 5eedd7f9d..d8e47745b 100644 --- a/stdlib/source/test/lux/math/number/i64.lux +++ b/stdlib/source/test/lux/math/number/i64.lux @@ -24,21 +24,21 @@ [pattern random.nat idx (\ ! map (n.% /.width) random.nat)] ($_ _.and - (_.cover [/.set? /.set] - (if (/.set? idx pattern) - (\= pattern (/.set idx pattern)) - (not (\= pattern (/.set idx pattern))))) - (_.cover [/.clear? /.clear] - (if (/.clear? idx pattern) - (\= pattern (/.clear idx pattern)) - (not (\= pattern (/.clear idx pattern))))) - (_.cover [/.flip] - (\= (/.flip idx pattern) - (if (/.set? idx pattern) - (/.clear idx pattern) - (/.set idx pattern)))) + (_.cover [/.one? /.one] + (if (/.one? idx pattern) + (\= pattern (/.one idx pattern)) + (not (\= pattern (/.one idx pattern))))) + (_.cover [/.zero? /.zero] + (if (/.zero? idx pattern) + (\= pattern (/.zero idx pattern)) + (not (\= pattern (/.zero idx pattern))))) + (_.cover [/.flipped] + (\= (/.flipped idx pattern) + (if (/.one? idx pattern) + (/.zero idx pattern) + (/.one idx pattern)))) (_.cover [/.bit] - (bit\= (/.clear? idx pattern) + (bit\= (/.zero? idx pattern) (\= /.false (/.and (/.bit idx) pattern)))) ))) @@ -197,16 +197,16 @@ (/.xor pattern pattern)))) (_.cover [/.ones] - (let [clear&set! - (if (/.set? idx pattern) - (n.= (dec (/.ones pattern)) (/.ones (/.clear idx pattern))) - (n.= (inc (/.ones pattern)) (/.ones (/.set idx pattern)))) + (let [zero&one! + (if (/.one? idx pattern) + (n.= (dec (/.ones pattern)) (/.ones (/.zero idx pattern))) + (n.= (inc (/.ones pattern)) (/.ones (/.one idx pattern)))) complementarity! (n.= /.width (n.+ (/.ones pattern) (/.ones (/.not pattern))))] - (and clear&set! + (and zero&one! complementarity!))) (_.cover [/.left_rotated /.right_rotated] (let [false! diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux index 2d7198c46..b8e3e1c76 100644 --- a/stdlib/source/test/lux/meta.lux +++ b/stdlib/source/test/lux/meta.lux @@ -76,13 +76,13 @@ (|> (\ /.monad in expected) (/.result' expected_lux) (!expect (^multi (#try.Success [actual_lux actual]) - (and (is? expected_lux actual_lux) + (and (same? expected_lux actual_lux) (n.= expected actual)))))) - (_.cover [/.get_compiler] - (|> /.get_compiler + (_.cover [/.compiler_state] + (|> /.compiler_state (/.result expected_lux) (!expect (^multi (#try.Success actual_lux) - (is? expected_lux actual_lux))))) + (same? expected_lux actual_lux))))) ))) (def: error_handling @@ -224,12 +224,12 @@ (|> /.current_module (/.result expected_lux) (!expect (^multi (#try.Success actual_module) - (is? expected_module actual_module))))) + (same? expected_module actual_module))))) (_.cover [/.module] (|> (/.module expected_current_module) (/.result expected_lux) (!expect (^multi (#try.Success actual_module) - (is? expected_module actual_module))))) + (same? expected_module actual_module))))) (_.cover [/.module_exists?] (and (|> (/.module_exists? expected_current_module) (/.result expected_lux) @@ -241,7 +241,7 @@ (|> /.modules (/.result expected_lux) (!expect (^multi (#try.Success actual_modules) - (is? expected_modules actual_modules))))) + (same? expected_modules actual_modules))))) (_.cover [/.imported_modules] (and (|> (/.imported_modules expected_current_module) (/.result expected_lux) @@ -266,12 +266,12 @@ (/.result expected_lux) (!expect (^multi (#try.Success [actual_module actual_short]) (and (text\= expected_current_module actual_module) - (is? expected_short actual_short))))) + (same? expected_short actual_short))))) (|> (/.normal [dummy_module expected_short]) (/.result expected_lux) (!expect (^multi (#try.Success [actual_module actual_short]) (and (text\= dummy_module actual_module) - (is? expected_short actual_short))))))) + (same? expected_short actual_short))))))) )))) (def: random_location @@ -325,16 +325,16 @@ (|> /.location (/.result expected_lux) (!expect (^multi (#try.Success actual_location) - (is? expected_location actual_location))))) + (same? expected_location actual_location))))) (_.cover [/.expected_type] (|> /.expected_type (/.result expected_lux) (!expect (^multi (#try.Success actual_type) - (is? expected_type actual_type))))) + (same? expected_type actual_type))))) (_.cover [.Type_Context /.type_context] (|> /.type_context (/.result expected_lux) - (try\map (is? type_context)) + (try\map (same? type_context)) (try.else false))) ))) @@ -411,13 +411,13 @@ (|> (/.globals expected_current_module) (/.result expected_lux) (!expect (^multi (#try.Success actual_globals) - (is? current_globals actual_globals)))) + (same? current_globals actual_globals)))) macro_globals! (|> (/.globals expected_macro_module) (/.result expected_lux) (!expect (^multi (#try.Success actual_globals) - (is? macro_globals actual_globals))))] + (same? macro_globals actual_globals))))] (and current_globals! macro_globals!))) (_.cover [.Definition /.definitions] @@ -542,7 +542,7 @@ (|> (/.macro [expected_macro_module expected_short]) (/.result expected_lux) (!expect (^multi (#try.Success (#.Some actual_value)) - (is? expected_value actual_value))))) + (same? expected_value actual_value))))) not_macro! (let [[current_globals macro_globals expected_lux] @@ -564,7 +564,7 @@ (|> (/.macro [expected_current_module expected_short]) (/.result expected_lux) (!expect (^multi (#try.Success (#.Some actual_value)) - (is? expected_value actual_value)))))] + (same? expected_value actual_value)))))] (and same_module! not_macro! not_found! @@ -589,16 +589,16 @@ (/.result expected_lux) (!expect (^multi (#try.Success (#.Definition [actual_exported? actual_type actual_annotations actual_value])) (and (bit\= expected_exported? actual_exported?) - (is? expected_type actual_type) - (is? expected_annotations actual_annotations) - (is? (:as Any expected_value) actual_value))))) + (same? expected_type actual_type) + (same? expected_annotations actual_annotations) + (same? (:as Any expected_value) actual_value))))) alias! (|> (/.definition [expected_current_module expected_short]) (/.result expected_lux) (!expect (^multi (#try.Success (#.Alias [actual_module actual_short])) - (and (is? expected_macro_module actual_module) - (is? expected_short actual_short)))))] + (and (same? expected_macro_module actual_module) + (same? expected_short actual_short)))))] (and definition! alias!))) (_.cover [/.definition_type] @@ -609,13 +609,13 @@ (|> (/.definition_type [expected_macro_module expected_short]) (/.result expected_lux) (!expect (^multi (#try.Success actual_type) - (is? expected_type actual_type)))) + (same? expected_type actual_type)))) alias! (|> (/.definition_type [expected_current_module expected_short]) (/.result expected_lux) (!expect (^multi (#try.Success actual_type) - (is? expected_type actual_type))))] + (same? expected_type actual_type))))] (and definition! alias!))) (_.cover [/.type_definition] @@ -626,13 +626,13 @@ (|> (/.type_definition [expected_macro_module expected_short]) (/.result expected_lux) (!expect (^multi (#try.Success actual_value) - (is? (:as .Type expected_value) actual_value)))) + (same? (:as .Type expected_value) actual_value)))) alias! (|> (/.type_definition [expected_current_module expected_short]) (/.result expected_lux) (!expect (^multi (#try.Success actual_value) - (is? (:as .Type expected_value) actual_value))))] + (same? (:as .Type expected_value) actual_value))))] (and definition! alias!))) ))) @@ -945,7 +945,7 @@ /.lift (/.result expected_lux) (!expect (^multi (#try.Success actual) - (is? expected_value actual))))))) + (same? expected_value actual))))))) ..compiler_related ..error_handling diff --git a/stdlib/source/test/lux/program.lux b/stdlib/source/test/lux/program.lux index c3df88e81..4062dd9b2 100644 --- a/stdlib/source/test/lux/program.lux +++ b/stdlib/source/test/lux/program.lux @@ -38,22 +38,30 @@ (let [outcome ((: (-> (List Text) (io.IO Any)) (..actual_program <program>)) inputs)] - (is? (: Any inputs) (io.run! outcome)))) - (with_expansions [<program> (/.program: [arg/0 arg/1 arg/2 arg/3 arg/4] + (same? (: Any inputs) + (io.run! outcome)))) + (with_expansions [<program> (/.program: [arg/0 <cli>.any + arg/1 <cli>.any + arg/2 <cli>.any + arg/3 <cli>.any + arg/4 <cli>.any] (io.io (list arg/4 arg/3 arg/2 arg/1 arg/0)))] (let [outcome ((: (-> (List Text) (io.IO Any)) (..actual_program <program>)) inputs)] (list\= (list.reversed inputs) (:as (List Text) (io.run! outcome))))) - (with_expansions [<program> (/.program: [{all_arguments (<>.many <cli>.any)}] + (with_expansions [<program> (/.program: [all_arguments (<>.many <cli>.any)] (io.io all_arguments))] (let [outcome ((: (-> (List Text) (io.IO Any)) (..actual_program <program>)) inputs)] (list\= inputs (:as (List Text) (io.run! outcome))))) - (with_expansions [<program> (/.program: [arg/0 arg/1 arg/2 arg/3] + (with_expansions [<program> (/.program: [arg/0 <cli>.any + arg/1 <cli>.any + arg/2 <cli>.any + arg/3 <cli>.any] (io.io []))] (case (try ((: (-> (List Text) (io.IO Any)) (..actual_program <program>)) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux index 738e080c4..3f975a006 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -155,7 +155,7 @@ record_tags+ (list\map code_tag record_tags) variantTC (list.zipped/2 variant_tags+ primitivesC)] inputC (input variant_tags+ record_tags+ primitivesC) - [outputT outputC] (r.only (|>> product.left (is? Any) not) + [outputT outputC] (r.only (|>> product.left (same? Any) not) _primitive.primitive) .let [analyse_pm (function (_ branches) (|> (/.case _primitive.phase branches archive.empty inputC) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux index 8df54a276..fcec6b95c 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/primitive.lux @@ -76,7 +76,7 @@ //type.with_inference (phase.result ..state) (case> (#try.Success [inferred_type output]) - (if (is? expected_type inferred_type) + (if (same? expected_type inferred_type) (#try.Success output) (exception.except wrong_inference [expected_type inferred_type])) @@ -89,7 +89,7 @@ (_.test (%.name (name_of #////analysis.Unit)) (|> (infer Any (..phase archive.empty (' []))) (case> (^ (#try.Success (#////analysis.Primitive (#////analysis.Unit output)))) - (is? [] output) + (same? [] output) _ false))) @@ -99,7 +99,7 @@ (_.test (%.name (name_of <tag>)) (|> (infer <type> (..phase archive.empty (<constructor> sample))) (case> (#try.Success (#////analysis.Primitive (<tag> output))) - (is? sample output) + (same? sample output) _ false))))] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux index 30ad64e34..47abe0165 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux @@ -51,7 +51,7 @@ (def: primitive (Random [Type Code]) - (r.only (|>> product.left (is? Any) not) _primitive.primitive)) + (r.only (|>> product.left (same? Any) not) _primitive.primitive)) (def: lux Test diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux index 529db21df..3a1101011 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/primitive.lux @@ -47,8 +47,8 @@ (~~ (template [<analysis> <post_analysis> <synthesis> <post_synthesis>] [[(#////analysis.Primitive (<analysis> expected)) (#////synthesis.Primitive (<synthesis> actual))] - (is? (|> expected <post_analysis>) - (|> actual <post_synthesis>))] + (same? (|> expected <post_analysis>) + (|> actual <post_synthesis>))] [#////analysis.Unit (:as Text) #////synthesis.Text (|>)] [#////analysis.Bit (|>) #////synthesis.Bit (|>)] @@ -82,7 +82,7 @@ (//.phase archive.empty) (phase.result [///bundle.empty ////synthesis.init]) (case> (#try.Success (#////synthesis.Primitive (<synthesis> actual))) - (is? expected actual) + (same? expected actual) _ false))))] diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux index 46adc6884..078aef4e2 100644 --- a/stdlib/source/test/lux/type.lux +++ b/stdlib/source/test/lux/type.lux @@ -44,38 +44,39 @@ (Random Name) (random.and ..short ..short)) -(def: .public random - (Random Type) +(def: .public (random parameters) + (-> Nat (Random Type)) (random.rec (function (_ recur) (let [pairG (random.and recur recur) - idG random.nat - quantifiedG (random.and (random\in (list)) recur)] - ($_ random.or - (random.and ..short (random\in (list))) - pairG - pairG - pairG - idG - idG - idG - quantifiedG - quantifiedG - pairG - (random.and ..name recur) - ))))) + quantifiedG (random.and (random\in (list)) recur) + un_parameterized (: (Random Type) + ($_ random.either + (random\map (|>> #.Primitive) (random.and ..short (random\in (list)))) + (random\map (|>> #.Sum) pairG) + (random\map (|>> #.Product) pairG) + (random\map (|>> #.Function) pairG) + (random\map (|>> #.UnivQ) quantifiedG) + (random\map (|>> #.ExQ) quantifiedG) + (random\map (|>> #.Apply) pairG) + (random\map (|>> #.Named) (random.and ..name recur)) + ))] + (case parameters + 0 un_parameterized + _ (random.either un_parameterized + (random\map (|>> (n.% parameters) #.Parameter) random.nat))))))) (def: .public test Test (<| (_.covering /._) ($_ _.and (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + ($equivalence.spec /.equivalence (..random 0))) (do {! random.monad} [anonymousT (random.only (|>> (case> (#.Named _ _) false _ true)) - ..random) + (..random 0)) name/0 ..name name/1 ..name .let [namedT (#.Named name/0 anonymousT) @@ -87,7 +88,7 @@ (\ /.equivalence = anonymousT (/.anonymous aliasedT))))) (do {! random.monad} [size (|> random.nat (\ ! map (n.% 3))) - members (|> ..random + members (|> (..random 0) (random.only (function (_ type) (case type (^or (#.Sum _) (#.Product _)) @@ -121,8 +122,8 @@ (case> #.None #1 _ #0)))) (do {! random.monad} [size (|> random.nat (\ ! map (n.% 3))) - members (monad.seq ! (list.repeated size ..random)) - extra (|> ..random + members (monad.seq ! (list.repeated size (..random 0))) + extra (|> (..random 0) (random.only (function (_ type) (case type (^or (#.Function _) (#.Apply _)) @@ -143,7 +144,7 @@ )) (do {! random.monad} [size (|> random.nat (\ ! map (|>> (n.% 3) inc))) - body_type (|> ..random + body_type (|> (..random 0) (random.only (function (_ type) (case type (^or (#.UnivQ _) (#.ExQ _)) @@ -169,7 +170,7 @@ ))) (do {! random.monad} [depth (|> random.nat (\ ! map (|>> (n.% 3) inc))) - element_type (|> ..random + element_type (|> (..random 0) (random.only (function (_ type) (case type (^ (#.Primitive name (list element_type))) @@ -210,7 +211,7 @@ (|> left,right (/.:cast [l r] (And l r) (Or l r)) (/.:cast [l r] (Or l r) (And l r)) - (is? left,right)))) + (same? left,right)))) (do random.monad [expected random.nat] (_.cover [/.:sharing] @@ -223,8 +224,8 @@ (.i64 expected))))) (do random.monad [.let [(^open "/\.") /.equivalence] - left ..random - right ..random] + left (..random 0) + right (..random 0)] ($_ _.and (_.cover [/.code] (bit\= (/\= left right) diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux index 39b336ba2..1875d4fc8 100644 --- a/stdlib/source/test/lux/type/check.lux +++ b/stdlib/source/test/lux/type/check.lux @@ -125,7 +125,7 @@ (: (/.Check Any) (/.failure expected))) (#try.Success _) false - (#try.Failure actual) (is? expected actual)))) + (#try.Failure actual) (same? expected actual)))) (do random.monad [expected (random.ascii/upper 10)] (_.cover [/.assertion] @@ -136,7 +136,7 @@ (#try.Failure actual) false) (case (/.result /.fresh_context (/.assertion expected false)) (#try.Success _) false - (#try.Failure actual) (is? expected actual))))) + (#try.Failure actual) (same? expected actual))))) (_.cover [/.except] (case (/.result /.fresh_context (: (/.Check Any) @@ -241,7 +241,7 @@ (/.read var_id)) (/.result /.fresh_context) (case> (#try.Success (#.Some actual)) - (is? expected actual) + (same? expected actual) _ false))))) @@ -255,7 +255,7 @@ _ (/.bind expected var_id)] (/.read! var_id))) (#try.Success actual) - (is? expected actual) + (same? expected actual) _ false))) @@ -284,7 +284,7 @@ (_.cover [/.context] (and (case (/.result /.fresh_context /.context) (#try.Success actual) - (is? /.fresh_context actual) + (same? /.fresh_context actual) (#try.Failure error) false) @@ -850,7 +850,7 @@ (_.cover [/.result] (case (/.result /.fresh_context (\ /.monad in expected)) - (#try.Success actual) (is? expected actual) + (#try.Success actual) (same? expected actual) (#try.Failure error) false))) ..error_handling ..var diff --git a/stdlib/source/test/lux/type/quotient.lux b/stdlib/source/test/lux/type/quotient.lux index ae137a428..3233777c4 100644 --- a/stdlib/source/test/lux/type/quotient.lux +++ b/stdlib/source/test/lux/type/quotient.lux @@ -41,14 +41,14 @@ (_.for [/.Class] (_.cover [/.class] - (is? (: Any class) - (: Any (/.class class))))) + (same? (: Any class) + (: Any (/.class class))))) (_.for [/.Quotient] ($_ _.and (_.cover [/.quotient /.value /.label] (let [quotient (/.quotient (/.class class) value)] - (and (is? value - (/.value quotient)) + (and (same? value + (/.value quotient)) (text\= (class value) (/.label quotient))))) (_.cover [/.type] diff --git a/stdlib/source/test/lux/type/refinement.lux b/stdlib/source/test/lux/type/refinement.lux index 369a2de9a..64a0b60bd 100644 --- a/stdlib/source/test/lux/type/refinement.lux +++ b/stdlib/source/test/lux/type/refinement.lux @@ -46,7 +46,7 @@ (not (predicate raw)))) (_.cover [/.predicate] (|> (/.refiner predicate modulus) - (maybe\map (|>> /.predicate (is? predicate))) + (maybe\map (|>> /.predicate (same? predicate))) (maybe.else false))) )) (_.cover [/.value] diff --git a/stdlib/source/test/lux/world/console.lux b/stdlib/source/test/lux/world/console.lux index 945dfc352..1198e56bb 100644 --- a/stdlib/source/test/lux/world/console.lux +++ b/stdlib/source/test/lux/world/console.lux @@ -33,7 +33,7 @@ (def: (on_read_line [dead? content]) (do try.monad - [[line content] (try.of_maybe (text.split_with text.new_line content))] + [[line content] (try.of_maybe (text.split_by text.new_line content))] (if dead? (exception.except ..dead []) (in [[dead? content] line])))) diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux index 98f589439..0bbff685f 100644 --- a/stdlib/source/test/lux/world/file/watch.lux +++ b/stdlib/source/test/lux/world/file/watch.lux @@ -51,7 +51,7 @@ (/.deletion? /.deletion))) (do random.monad [left ..concern - right (random.only (|>> (is? left) not) + right (random.only (|>> (same? left) not) ..concern) .let [[left left?] left [right right?] right]] diff --git a/stdlib/source/test/lux/world/program.lux b/stdlib/source/test/lux/world/program.lux index f2643a3b7..879d1f60f 100644 --- a/stdlib/source/test/lux/world/program.lux +++ b/stdlib/source/test/lux/world/program.lux @@ -62,7 +62,7 @@ dictionary.entries (list.every? (function (_ [key value]) (|> environment - (dictionary.get key) + (dictionary.value key) (maybe\map (text\= value)) (maybe.else false))))))))))) (_.cover [/.unknown_environment_variable] |