diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux/macro/syntax.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/test/test/lux/macro/syntax.lux b/stdlib/test/test/lux/macro/syntax.lux index aaa042fb3..1fabb09ad 100644 --- a/stdlib/test/test/lux/macro/syntax.lux +++ b/stdlib/test/test/lux/macro/syntax.lux @@ -70,21 +70,21 @@ ## [Tests] (test: "Simple value syntax." - (let% [<simple-tests> (do-template [<assertion> <value> <ctor> <Eq> <get> <ask> <demand>] + (let% [<simple-tests> (do-template [<assertion> <value> <ctor> <Eq> <get>] [(assert <assertion> (and (is? <Eq> <value> <get> (list (<ctor> <value>))) - (found? (<ask> <value>) (list (<ctor> <value>))) - (enforced? (<demand> <value>) (list (<ctor> <value>)))))] + (found? (s;sample? (<ctor> <value>)) (list (<ctor> <value>))) + (enforced? (s;sample! (<ctor> <value>)) (list (<ctor> <value>)))))] - ["Can parse Bool syntax." true ast;bool bool;Eq<Bool> s;bool s;bool? s;bool!] - ["Can parse Nat syntax." +123 ast;nat number;Eq<Nat> s;nat s;nat? s;nat!] - ["Can parse Int syntax." 123 ast;int number;Eq<Int> s;int s;int? s;int!] - ## ["Can parse Frac syntax." .123 ast;frac number;Eq<Frac> s;frac s;frac? s;frac!] - ["Can parse Real syntax." 123.0 ast;real number;Eq<Real> s;real s;real? s;real!] - ["Can parse Char syntax." #"\n" ast;char char;Eq<Char> s;char s;char? s;char!] - ["Can parse Text syntax." "\n" ast;text text;Eq<Text> s;text s;text? s;text!] - ["Can parse Symbol syntax." ["yolo" "lol"] ast;symbol ident;Eq<Ident> s;symbol s;symbol? s;symbol!] - ["Can parse Tag syntax." ["yolo" "lol"] ast;tag ident;Eq<Ident> s;tag s;tag? s;tag!] + ["Can parse Bool syntax." true ast;bool bool;Eq<Bool> s;bool] + ["Can parse Nat syntax." +123 ast;nat number;Eq<Nat> s;nat] + ["Can parse Int syntax." 123 ast;int number;Eq<Int> s;int] + ["Can parse Frac syntax." .123 ast;frac number;Eq<Frac> s;frac] + ["Can parse Real syntax." 123.0 ast;real number;Eq<Real> s;real] + ["Can parse Char syntax." #"\n" ast;char char;Eq<Char> s;char] + ["Can parse Text syntax." "\n" ast;text text;Eq<Text> s;text] + ["Can parse Symbol syntax." ["yolo" "lol"] ast;symbol ident;Eq<Ident> s;symbol] + ["Can parse Tag syntax." ["yolo" "lol"] ast;tag ident;Eq<Ident> s;tag] )] ($_ seq <simple-tests> @@ -252,8 +252,8 @@ (assert "Can parse while taking separators into account." (and (match (list 123 456 789) (s;run (list (ast;int 123) (ast;text "YOLO") (ast;int 456) (ast;text "YOLO") (ast;int 789)) - (s;sep-by (s;text! "YOLO") s;int))) + (s;sep-by (s;sample! (' "YOLO")) s;int))) (match (list 123 456) (s;run (list (ast;int 123) (ast;text "YOLO") (ast;int 456) (ast;int 789)) - (s;sep-by (s;text! "YOLO") s;int))))) + (s;sep-by (s;sample! (' "YOLO")) s;int))))) )) |