Starting tests
This commit is contained in:
parent
205cd340b5
commit
08173b4eb9
|
@ -1,18 +1,20 @@
|
|||
?(?-) (This example tests various aspects of the implementation.)
|
||||
|
||||
<> (explode ?*) (str (?*))
|
||||
<> (reverse (str (?h ?t))) (reverse/l ?t (?h))
|
||||
<> (reverse (str (?h))) (?h)
|
||||
<> (reverse/l (?h ?t) ?l) (reverse/l ?t (?h ?l))
|
||||
<> (reverse/l (?h) ?l) (str (?h ?l))
|
||||
<> (implode str ?*) (?*)
|
||||
<> (empty-register) (?x)
|
||||
<> (explode ?*) (str (?*))
|
||||
<> (eq ?x ?x) (#t)
|
||||
<> (eq ?x ?y) (#f)
|
||||
<> (?x dup) (?x ?x)
|
||||
<> (?x ?y swap) (?y ?x)
|
||||
<> (?x pop) ()
|
||||
<> (print ?:) (?:)
|
||||
<> (?: print) (?:)
|
||||
<> (?x = ?x test) (#ok)
|
||||
<> (?x = ?y test) (#fail)
|
||||
|
||||
?(?-) (Basic register setups)
|
||||
|
||||
<> (dup (?x)) ((?x ?x) =)
|
||||
<> (swap (?x ?y)) ((?y ?x) =)
|
||||
<> (compare (?x ?x ?x)) ((#t) =)
|
||||
|
||||
dup (abc) (abc abc) test
|
||||
swap (abc def) (def abc) test
|
||||
compare (abc abc abc) (#t) test
|
||||
|
||||
?(?-) (Lambdas)
|
||||
|
||||
?((?x) ((?x ?x) =)) abc (abc abc) test
|
||||
|
||||
(implode reverse (explode hello)) (explode hello) empty-register (eq abc abc) (eq abc def) (1 2 3) (4 5 6) swap pop dup (hey 1234 pop) (print Done.)
|
||||
|
|
Loading…
Reference in New Issue