Added tests

This commit is contained in:
Devine Lu Linvega 2024-04-21 09:43:00 -07:00
parent 05e620bac5
commit 111e143d2f
1 changed files with 15 additions and 9 deletions

View File

@ -9,12 +9,16 @@ nap tap test
?(?-) (Empty replacements)
<> (?x pop-plain)
<> (?x rightless/pop)
<> (?x pop) ()
<> (ghost) ()
<> (prefix/pop ?x) (ok)
<> (?x suffix/pop) (ok)
abc def pop-plain = abc test
abc def pop = abc test
(abc rightless/pop) = () test
(prefix/pop foo) = (ok) test
(foo suffix/pop) = (ok) test
(abc def pop) = (abc) test
(ghost) = () test
?(?-) (Basic replacements)
@ -25,13 +29,15 @@ replace-name (foo) (bar) test
?(?-) (Basic register setups)
<> (dup (?x)) ((?x ?x) =)
<> (swap (?x ?y)) ((?y ?x) =)
<> (compare (?x ?x ?x)) ((#t) =)
<> (dup (?x)) (?x ?x)
<> (swap (?x ?y)) (?y ?x)
<> (compare (?x ?x ?x)) (#t)
<> (rotate (?x (?y (?z)))) (?y (?z (?x)))
dup (abc) (abc abc) test
swap (abc def) (def abc) test
compare (abc abc abc) (#t) test
(dup (abc)) = (abc abc) test
(swap (abc def)) = (def abc) test
compare (abc abc abc) = #t test
(rotate (abc (def (ghi)))) = (def (ghi (abc))) test
?(?-) (Empty register replacement)