Start working on tokenization tests

This commit is contained in:
greg 2016-01-08 23:55:58 -08:00
parent 2f7a1850db
commit 4601a56867

View File

@ -127,13 +127,5 @@ mod tests {
#[test] #[test]
fn tokeniziation_tests() { fn tokeniziation_tests() {
let t1 = "let a = 3\n"; let t1 = "let a = 3\n";
assert_eq!(format!("{:?}", tokenize(t1)),
"[Keyword(Let), Identifier(\"a\"), Keyword(Assign), NumLiteral(3), Newline, EOF]");
// this is intentional
let t2 = "a + b*c\n";
assert_eq!(format!("{:?}", tokenize(t2)),
"[Identifier(\"a\"), Identifier(\"+\"), Identifier(\"b*c\"), Newline, EOF]");
} }
} }