Import types for breivty

and rename function to be explicit
This commit is contained in:
greg 2016-01-16 16:23:26 -08:00
parent 087402ece6
commit 9b54256521

View File

@ -289,11 +289,14 @@ mod tests {
} }
#[test] #[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", [ASTNode::ExprNode(Expression::Variable(ref s))], s == "a");
parsetest!("a + b", 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"); plus == "+" && a == "a" && b == "b");
} }
} }