From 7c3e924194af4a396f4768fdc37490d46145b8d4 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sat, 20 Nov 2021 00:03:05 -0800 Subject: [PATCH] WIP last tests --- schala-lang/src/parsing/test.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/schala-lang/src/parsing/test.rs b/schala-lang/src/parsing/test.rs index f7c5b91..ac30a0a 100644 --- a/schala-lang/src/parsing/test.rs +++ b/schala-lang/src/parsing/test.rs @@ -162,6 +162,7 @@ macro_rules! assert_expr { }; } +/* macro_rules! assert_fail_expr { ($input:expr, $failure:expr) => { let mut parser = Parser::new(); @@ -170,6 +171,17 @@ macro_rules! assert_fail_expr { //assert_eq!(err.to_string(), $failure); }; } +*/ + +macro_rules! assert_fail_expr { + ($input:expr, $failure:expr) => { + let mut parser = Parser::new(); + let _err = parser.expression_comb($input).unwrap_err(); + //TODO make real tests for failures + //assert_eq!(err.to_string(), $failure); + }; +} + #[test] fn basic_literals() { use ExpressionKind::*;