Start working on tokenization tests
This commit is contained in:
parent
2f7a1850db
commit
4601a56867
@ -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]");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user