diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/test/test/luxc/lang/translation/common.lux | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux index 7fe49fae2..03e56fa18 100644 --- a/new-luxc/test/test/luxc/lang/translation/common.lux +++ b/new-luxc/test/test/luxc/lang/translation/common.lux @@ -274,59 +274,6 @@ #0))) ))) -(def: (array-spec run) - (-> Runner Test) - (do r.Monad<Random> - [size (|> r.nat (:: @ map (|>> (n/% 10) (n/max 1)))) - idx (|> r.nat (:: @ map (n/% size))) - value r.nat - #let [array0S (#synthesis.Extension "lux array new" - (list (synthesis.i64 size))) - array1S (#synthesis.Extension "lux array put" - (list array0S - (synthesis.i64 idx) - (synthesis.i64 value)))]] - ($_ seq - (test "Can get size of array." - (|> (run (#synthesis.Extension "lux array size" - (list array0S))) - (case> (#e.Success valueV) - (n/= size (:coerce Nat valueV)) - - (#e.Error error) - (exec (log! error) - #0)))) - (test "Can get element from array (if it exists)." - (and (|> (run (#synthesis.Extension "lux array get" - (list array0S (synthesis.i64 idx)))) - (case> (^multi (#e.Success valueV) - [(:coerce (Maybe Nat) valueV) #.None]) - #1 - - _ - #0)) - (|> (run (#synthesis.Extension "lux array get" - (list array1S (synthesis.i64 idx)))) - (case> (^multi (#e.Success valueV) - [(:coerce (Maybe Nat) valueV) (#.Some valueV)]) - (n/= value valueV) - - _ - #0)))) - (test "Can remove element from array." - (|> (run (#synthesis.Extension "lux array get" - (list (#synthesis.Extension "lux array remove" - (list array1S - (synthesis.i64 idx))) - (synthesis.i64 idx)))) - (case> (^multi (#e.Success valueV) - [(:coerce (Maybe Nat) valueV) #.None]) - #1 - - _ - #0))) - ))) - (def: (io-spec run) (-> Runner Test) (do r.Monad<Random> @@ -421,7 +368,6 @@ (i64-spec run) (f64-spec run) (text-spec run) - (array-spec run) (io-spec run) (box-spec run) )) |