diff options
Diffstat (limited to 'stdlib/source/test/lux/target/ruby.lux')
-rw-r--r-- | stdlib/source/test/lux/target/ruby.lux | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/stdlib/source/test/lux/target/ruby.lux b/stdlib/source/test/lux/target/ruby.lux index 5e5588be7..3d0e61485 100644 --- a/stdlib/source/test/lux/target/ruby.lux +++ b/stdlib/source/test/lux/target/ruby.lux @@ -148,8 +148,8 @@ [left random.int right random.int - i16 (# ! each ..int_16 random.int) - shift (# ! each (n.% 16) random.nat)] + i16 (at ! each ..int_16 random.int) + shift (at ! each (n.% 16) random.nat)] (`` (all _.and (~~ (template [</> <lux>] [(_.coverage [</>] @@ -182,14 +182,14 @@ (def: test|array Test (do [! random.monad] - [size (# ! each (|>> (n.% 10) ++) random.nat) - index (# ! each (n.% size) random.nat) + [size (at ! each (|>> (n.% 10) ++) random.nat) + index (at ! each (n.% size) random.nat) items (random.list size random.safe_frac) .let [expected (|> items (list.item index) (maybe.else f.not_a_number))] - from (# ! each (n.% size) random.nat) - plus (# ! each (n.% (n.- from size)) random.nat) + from (at ! each (n.% size) random.nat) + plus (at ! each (n.% (n.- from size)) random.nat) .let [to (/.int (.int (n.+ plus from))) from (/.int (.int from))]] (all _.and @@ -230,22 +230,22 @@ (def: test|object Test (do [! random.monad] - [size (# ! each (|>> (n.% 10) ++) random.nat) - index (# ! each (n.% size) random.nat) + [size (at ! each (|>> (n.% 10) ++) random.nat) + index (at ! each (n.% size) random.nat) items (random.list size random.safe_frac) - $class (# ! each (|>> %.nat (format "class_") /.local) - random.nat) - $sub_class (# ! each (|>> %.nat (format "sub_class_") /.local) + $class (at ! each (|>> %.nat (format "class_") /.local) + random.nat) + $sub_class (at ! each (|>> %.nat (format "sub_class_") /.local) + random.nat) + $method/0 (at ! each (|>> %.nat (format "method_") /.local) random.nat) - $method/0 (# ! each (|>> %.nat (format "method_") /.local) - random.nat) $method/1 (|> random.nat - (# ! each (|>> %.nat (format "method_") /.local)) + (at ! each (|>> %.nat (format "method_") /.local)) (random.only (|>> (/#= $method/0) not))) - $arg/0 (# ! each (|>> %.nat (format "arg_") /.local) - random.nat) - $state (# ! each (|>> %.nat (format "instance_") /.instance) - random.nat) + $arg/0 (at ! each (|>> %.nat (format "arg_") /.local) + random.nat) + $state (at ! each (|>> %.nat (format "instance_") /.instance) + random.nat) single random.safe_frac .let [double (/.function $method/0 (list $arg/0) (/.return (/.+ $arg/0 $arg/0)))]] @@ -332,9 +332,9 @@ (<| (do [! random.monad] [left (random.upper_case 5) right (random.upper_case 5) - $old (# ! each /.local (random.upper_case 1)) - $new (# ! each /.local (random.upper_case 2)) - $it (# ! each /.local (random.upper_case 3)) + $old (at ! each /.local (random.upper_case 1)) + $new (at ! each /.local (random.upper_case 2)) + $it (at ! each /.local (random.upper_case 3)) .let [expected (format left right)]]) (all _.and (_.for [/.stdout] @@ -433,8 +433,8 @@ Test (do [! random.monad] [float/0 random.safe_frac - $global (# ! each /.global (random.lower_case 10)) - pattern (# ! each /.string (random.lower_case 11))] + $global (at ! each /.global (random.lower_case 10)) + pattern (at ! each /.string (random.lower_case 11))] (all _.and (_.coverage [/.global] (expression (|>> (as Text) (text#= "global-variable")) @@ -444,7 +444,7 @@ [(list)] (/.lambda {.#None}) (/.apply_lambda (list))))) (_.coverage [/.script_name] - (expression (let [file (format (# file.default separator) packager.main_file)] + (expression (let [file (format (at file.default separator) packager.main_file)] (|>> (as Text) (text.ends_with? file))) /.script_name)) @@ -487,7 +487,7 @@ Test (do [! random.monad] [float/0 random.safe_frac - $foreign (# ! each /.local (random.lower_case 10))] + $foreign (at ! each /.local (random.lower_case 10))] (all _.and (_.coverage [/.local] (expression (|>> (as Frac) (f.= (f.+ float/0 float/0))) @@ -507,15 +507,15 @@ Test (do [! random.monad] [float/0 random.safe_frac - instance (# ! each (|>> %.nat (format "instance_")) - random.nat) + instance (at ! each (|>> %.nat (format "instance_")) + random.nat) .let [$instance (/.instance instance)] - $method (# ! each (|>> %.nat (format "method_") /.local) + $method (at ! each (|>> %.nat (format "method_") /.local) + random.nat) + $class (at ! each (|>> %.nat (format "class_") /.local) random.nat) - $class (# ! each (|>> %.nat (format "class_") /.local) - random.nat) - $object (# ! each (|>> %.nat (format "object_") /.local) - random.nat)] + $object (at ! each (|>> %.nat (format "object_") /.local) + random.nat)] (all _.and (_.coverage [/.instance] (expression (|>> (as Frac) (f.= float/0)) @@ -578,16 +578,16 @@ (def: test|static_var Test (do [! random.monad] - [int/0 (# ! each (|>> (n.% 10) ++ .int) + [int/0 (at ! each (|>> (n.% 10) ++ .int) + random.nat) + $static (at ! each (|>> %.nat (format "static_") /.static) + random.nat) + $arg (at ! each (|>> %.nat /.local) random.nat) - $static (# ! each (|>> %.nat (format "static_") /.static) - random.nat) - $arg (# ! each (|>> %.nat /.local) - random.nat) - $method (# ! each (|>> %.nat (format "method_") /.local) - random.nat) - $class (# ! each (|>> %.nat (format "class_") /.local) - random.nat)] + $method (at ! each (|>> %.nat (format "method_") /.local) + random.nat) + $class (at ! each (|>> %.nat (format "class_") /.local) + random.nat)] (all _.and (_.coverage [/.static /.class_variable_set /.class_variable_get] (expression (|>> (as Int) (i.= int/0)) @@ -604,14 +604,14 @@ (def: test|variadic Test (do [! random.monad] - [$inputs (# ! each /.local (random.lower_case 10)) - arity (# ! each (n.% 10) random.nat) + [$inputs (at ! each /.local (random.lower_case 10)) + arity (at ! each (n.% 10) random.nat) vals (|> random.int - (# ! each /.int) + (at ! each /.int) (random.list arity)) keys (|> (random.lower_case 1) (random.set text.hash arity) - (# ! each (|>> set.list (list#each /.string))))] + (at ! each (|>> set.list (list#each /.string))))] (all _.and (<| (_.for [/.LVar*]) (all _.and @@ -637,9 +637,9 @@ Test (do [! random.monad] [float/0 random.safe_frac - $foreign (# ! each /.local (random.lower_case 10)) + $foreign (at ! each /.local (random.lower_case 10)) - $constant (# ! each /.constant (random.lower_case 10))] + $constant (at ! each /.constant (random.lower_case 10))] (all _.and (_.coverage [/.defined?/1] (and (expression (|>> (as Bit)) @@ -674,8 +674,8 @@ Test (do [! random.monad] [float/0 random.safe_frac - $foreign (# ! each /.local (random.lower_case 10)) - field (# ! each /.string (random.upper_case 10))] + $foreign (at ! each /.local (random.lower_case 10)) + field (at ! each /.string (random.upper_case 10))] (all _.and (<| (_.for [/.Var]) ..test|var) @@ -716,13 +716,13 @@ (def: test|label Test (do [! random.monad] - [input (# ! each ..int_16 random.int) + [input (at ! each ..int_16 random.int) - full_inner_iterations (# ! each (|>> (n.% 20) ++) random.nat) - expected_inner_iterations (# ! each (n.% full_inner_iterations) random.nat) + full_inner_iterations (at ! each (|>> (n.% 20) ++) random.nat) + expected_inner_iterations (at ! each (n.% full_inner_iterations) random.nat) - full_outer_iterations (# ! each (|>> (n.% 10) ++) random.nat) - expected_outer_iterations (# ! each (n.% full_outer_iterations) random.nat) + full_outer_iterations (at ! each (|>> (n.% 10) ++) random.nat) + expected_outer_iterations (at ! each (n.% full_outer_iterations) random.nat) .let [$input (/.local "input") $output (/.local "output") @@ -782,8 +782,8 @@ (def: test|loop Test (do [! random.monad] - [input (# ! each (i.right_shifted 32) random.int) - iterations (# ! each (n.% 10) random.nat) + [input (at ! each (i.right_shifted 32) random.int) + iterations (at ! each (n.% 10) random.nat) .let [$input (/.local "input") $output (/.local "output") $index (/.local "index") @@ -826,7 +826,7 @@ dummy (random.only (|>> (f.= expected) not) random.safe_frac) error (random.lower_case 10) - $ex (# ! each /.local (random.lower_case 10)) + $ex (at ! each /.local (random.lower_case 10)) expected_tag ..random_tag dummy_tag (random.only (|>> (i.= expected_tag) not) @@ -904,17 +904,17 @@ (def: test|function Test (do [! random.monad] - [iterations (# ! each (n.% 10) random.nat) - $self (# ! each /.local (random.lower_case 1)) + [iterations (at ! each (n.% 10) random.nat) + $self (at ! each /.local (random.lower_case 1)) field (random.lower_case 3) - $class (# ! each /.local (random.upper_case 4)) + $class (at ! each /.local (random.upper_case 4)) float/0 random.safe_frac float/1 random.safe_frac float/2 random.safe_frac - $arg/0 (# ! each /.local (random.lower_case 10)) - $arg/1 (# ! each /.local (random.lower_case 11)) - $arg/2 (# ! each /.local (random.lower_case 12))] + $arg/0 (at ! each /.local (random.lower_case 10)) + $arg/1 (at ! each /.local (random.lower_case 11)) + $arg/2 (at ! each /.local (random.lower_case 12))] (all _.and (_.coverage [/.lambda /.return] (and (expression (|>> (as Frac) (f.= float/0)) @@ -992,11 +992,11 @@ [float/0 random.safe_frac float/1 random.safe_frac float/2 random.safe_frac - $arg/0 (# ! each /.local (random.lower_case 10)) - $arg/1 (# ! each /.local (random.lower_case 11)) - $arg/2 (# ! each /.local (random.lower_case 12)) - expected (# ! each (|>> %.int (text.replaced "+" "")) - random.int)] + $arg/0 (at ! each /.local (random.lower_case 10)) + $arg/1 (at ! each /.local (random.lower_case 11)) + $arg/2 (at ! each /.local (random.lower_case 12)) + expected (at ! each (|>> %.int (text.replaced "+" "")) + random.int)] (all _.and (_.coverage [/.statement] (expression (|>> (as Frac) (f.= float/0)) |