From 21782ba7bacb559867e37e1e4caad6d5b7c068bd Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 17 Apr 2024 11:49:32 -0700 Subject: [PATCH] Added a test for self-erasing token --- examples/tests.modal | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/tests.modal b/examples/tests.modal index 30b66ba..f8e329e 100644 --- a/examples/tests.modal +++ b/examples/tests.modal @@ -1,9 +1,5 @@ ?(?-) (This example tests various aspects of the implementation.) -<> (?: print) (?:) -<> (?x = ?x test) (#ok) -<> (?x = ?y test) (#fail) - ?(?-) (Inline rules) <> ((?x -> ?y)) (<> ?x ?y) @@ -19,7 +15,7 @@ nap tap test abc def pop-plain = abc test abc def pop = abc test -(ghost) = () +(ghost) = () test ?(?-) (Basic replacements) @@ -68,6 +64,12 @@ explode (12 34 45) (12 (34 (45 ()))) test implode (b (a (t ()))) bat test implode (12 (34 (56 ()))) 123456 test +?(?-) (Test Primitives) + +<> (?: print) (?:) +<> (?x = ?x test) (#ok) +<> (?x = ?y test) (#fail) + ?(?-) (List reversal) <> (reverse List () ?^) (?^) @@ -75,3 +77,4 @@ implode (12 (34 (56 ()))) 123456 test <> (reverse List (?x ?y) ?z) (reverse List ?y (?x ?z)) reverse (modal) = ladom test +