From 9b542565217caeced2337011c770c375aff16378 Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 16 Jan 2016 16:23:26 -0800 Subject: [PATCH] Import types for breivty and rename function to be explicit --- src/parser.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 6927d15..b399bce 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -289,11 +289,14 @@ mod tests { } #[test] - fn parse_test() { + fn expression_parse_test() { + use super::ASTNode::*; + use super::Expression::*; parsetest!("a", [ASTNode::ExprNode(Expression::Variable(ref s))], s == "a"); parsetest!("a + b", - [ASTNode::ExprNode(Expression::BinExp(ref plus, box Expression::Variable(ref a), box Expression::Variable(ref b)))], + [ExprNode(BinExp(ref plus, box Variable(ref a), box Variable(ref b)))], plus == "+" && a == "a" && b == "b"); + } }