Skip to content

Commit

Permalink
add identifier test
Browse files Browse the repository at this point in the history
  • Loading branch information
katepavlu committed Oct 27, 2024
1 parent b6f22c0 commit e3b0d19
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/mylexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,10 @@ mod tests {
= l
{} else {panic!("String {string} not recognized as invalid. {:#?}",l);}
}
}

let valid_strings = ["add1", "addiu", "$t1"];
for string in valid_strings {
if let
Err(LexerError{location:_, kind: _})
= Lexer::new(string).next().unwrap()
{panic!("String {string} recognized as invalid.");}
}
#[test]
fn identifier() {

}

Expand Down

0 comments on commit e3b0d19

Please sign in to comment.