aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux.lux')
-rw-r--r--stdlib/source/test/lux.lux102
1 files changed, 51 insertions, 51 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index aa18015e5..71f03201e 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -75,7 +75,7 @@
(.~~ (.these))))]
])))
-(def: for_bit
+(def for_bit
Test
(do random.monad
[expected random.nat
@@ -138,7 +138,7 @@
dummy))))
))))
-(def: for_try
+(def for_try
Test
(do random.monad
[expected_error (random.lower_case 5)
@@ -167,7 +167,7 @@
false))
)))
-(def: for_list
+(def for_list
Test
(do random.monad
[e/0 random.nat
@@ -190,23 +190,23 @@
(is (-> Any a)
return)))
-(def: (global_returner value)
+(def (global_returner value)
(All (_ a) (-> a (Returner a)))
(/.implementation
- (def: (return _)
+ (def (return _)
value)))
-(def: static_return 123)
+(def static_return 123)
(/.open: "global#[0]" (..global_returner ..static_return))
-(def: for_interface
+(def for_interface
Test
(do random.monad
[expected random.nat
.let [local_returner (is (Returner Nat)
(/.implementation
- (def: (return _)
+ (def (return _)
expected)))]]
(_.for [/.Interface]
(all _.and
@@ -221,7 +221,7 @@
(n.= expected (/.at local_returner return [])))
))))
-(def: for_module
+(def for_module
Test
(all _.and
(let [[module short] (/.symbol .example)]
@@ -234,7 +234,7 @@
(not (text.contains? /.module_separator short)))))
))
-(def: for_pipe
+(def for_pipe
Test
(do random.monad
[start random.nat
@@ -255,15 +255,15 @@
((/.<<| (n.* factor) ++) start)))
)))
-(def: example_symbol "YOLO")
-(def: i8 8)
+(def example_symbol "YOLO")
+(def i8 8)
-(def: current_module
+(def current_module
Text
(let [[module _] (symbol .._)]
module))
-(def: for_code/'
+(def for_code/'
Test
(do random.monad
[example_nat random.nat]
@@ -293,7 +293,7 @@
(/.' (~ (code.nat example_nat)))))
))))
-(def: for_code/`
+(def for_code/`
Test
(do random.monad
[example_nat random.nat]
@@ -322,7 +322,7 @@
(code#= (code.nat example_nat)
(/.` (~ (code.nat example_nat))))))))
-(def: for_code/`'
+(def for_code/`'
Test
(do random.monad
[example_nat random.nat]
@@ -351,7 +351,7 @@
(code#= (code.nat example_nat)
(/.`' (~ (code.nat example_nat))))))))
-(def: for_code
+(def for_code
Test
(do [! random.monad]
[example (at ! each code.nat random.nat)]
@@ -368,19 +368,19 @@
(location#= location.dummy)))
)))
-(def: identity_macro
+(def identity_macro
(/.macro (_ tokens)
(at meta.monad in tokens)))
-(def: crosshair
+(def crosshair
"This is an arbitrary text whose only purpose is to be found, somewhere, in the source-code.")
-(def: found_crosshair?
+(def found_crosshair?
(macro (_ tokens lux)
(let [[_ _ source_code] (the .#source lux)]
{.#Right [lux (list (code.bit (text.contains? ..crosshair source_code)))]})))
-(def: for_macro
+(def for_macro
Test
(let [macro (is /.Macro'
(function (_ tokens lux)
@@ -522,7 +522,7 @@
(/.type: (for_type/all parameter)
[parameter parameter])
-(def: for_type
+(def for_type
Test
(do [! random.monad]
[expected random.nat
@@ -608,7 +608,7 @@
true))
))))
-(def: for_i64
+(def for_i64
Test
(do random.monad
[expected random.i64]
@@ -633,7 +633,7 @@
expected)))
)))
-(def: for_function
+(def for_function
Test
(do random.monad
[expected_left random.nat
@@ -650,11 +650,11 @@
(n.= (n.* (++ expected_left) (-- expected_right))
(actual [expected_left expected_right])))))))
-(def: !n/+
+(def !n/+
(/.template (_ <left> <right>)
[(n.+ <left> <right>)]))
-(def: for_template
+(def for_template
Test
(`` (all _.and
(_.coverage [/.with_template]
@@ -673,11 +673,11 @@
(!n/+ left right))))
)))
-(def: option/0 "0")
-(def: option/1 "1")
-(def: static_char "@")
+(def option/0 "0")
+(def option/1 "1")
+(def static_char "@")
-(def: for_static
+(def for_static
Test
(do random.monad
[sample (random.either (in option/0)
@@ -704,7 +704,7 @@
[#big_left Nat
#big_right Small]))
-(def: for_slot
+(def for_slot
Test
(do random.monad
[start/s random.nat
@@ -788,7 +788,7 @@
(n.= expected/s)))))
)))
-(def: for_associative
+(def for_associative
Test
(do random.monad
[left (random.lower_case 1)
@@ -809,7 +809,7 @@
(not (code#= (' <left_association>)
(' <right_association>))))))))
-(def: for_expansion
+(def for_expansion
Test
(do random.monad
[left random.nat
@@ -850,7 +850,7 @@
dummy))))
)))
-(def: for_value
+(def for_value
Test
(do random.monad
[left random.nat
@@ -937,12 +937,12 @@
[#left l
#right r]))
-(def: !pair
+(def !pair
(template (_ <left> <right>)
[[..#left <left>
..#right <right>]]))
-(def: for_case
+(def for_case
Test
(do [! random.monad]
[expected_nat (at ! each (n.% 1) random.nat)
@@ -998,7 +998,7 @@
(/.same? expected_int actual_right)))))
)))
-(def: for_control_flow
+(def for_control_flow
Test
(all _.and
(do random.monad
@@ -1023,24 +1023,24 @@
(same? post (io.run! (atom.read! box)))))))
))
-(def: identity/constant
+(def identity/constant
(All (_ a) (-> a a))
(function (_ value)
value))
-(def: (identity/function value)
+(def (identity/function value)
(All (_ a) (-> a a))
value)
-(def: for_def:
+(def for_def
Test
(do random.monad
[expected random.nat]
- (_.coverage [/.def:]
+ (_.coverage [/.def]
(and (same? expected (identity/constant expected))
(same? expected (identity/function expected))))))
-(def: possible_targets
+(def possible_targets
(Set @.Target)
(<| (set.of_list text.hash)
(list @.old
@@ -1050,7 +1050,7 @@
@.python
@.ruby)))
-(def: for_meta|Info
+(def for_meta|Info
(syntax (_ [])
(function (_ lux)
(let [info (the .#info lux)
@@ -1065,7 +1065,7 @@
{.#Right [lux (list (code.bit (and conforming_target!
compiling!)))]}))))
-(def: for_meta|Module_State
+(def for_meta|Module_State
(syntax (_ [])
(do meta.monad
[prelude (meta.module .prelude)]
@@ -1073,7 +1073,7 @@
{.#Active} false
_ true)))))))
-(def: for_meta
+(def for_meta
Test
(all _.and
(_.coverage [/.Mode /.Info]
@@ -1082,7 +1082,7 @@
(for_meta|Module_State))
))
-(def: for_export
+(def for_export
Test
(all _.and
(_.coverage [/.public /.private]
@@ -1093,7 +1093,7 @@
))
(for @.old (these)
- (these (def: for_bindings|test
+ (these (def for_bindings|test
(syntax (_ lux_state
[fn/0 <code>.local
var/0 <code>.local
@@ -1154,7 +1154,7 @@
_
false))))))
- (def: for_bindings
+ (def for_bindings
Test
((<| (template.with_locals [fn/0 var/0 let/0
fn/1 var/1 let/1
@@ -1174,7 +1174,7 @@
verdict)))
0 1 2))))
-(def: test|lux
+(def test|lux
Test
(`` (`` (all _.and
..for_bit
@@ -1196,14 +1196,14 @@
..for_value
..for_case
..for_control_flow
- ..for_def:
+ ..for_def
..for_meta
..for_export
(~~ (for @.old (~~ (these))
(~~ (these ..for_bindings))))
))))
-(def: test
+(def test
Test
(<| (_.covering /._)
(`` (`` (_.in_parallel