Expand test coverage
This commit is contained in:
parent
3837af387a
commit
5958f1551b
27 changed files with 593 additions and 109 deletions
|
|
@ -40,6 +40,8 @@ impl std::fmt::Display for Code {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::syntax::content::parser::token::Token;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
|
|
@ -58,4 +60,16 @@ mod tests {
|
|||
fn lex() {
|
||||
Code::lex(&Lexeme::default());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn token_display() {
|
||||
let mut code = Code::new(true);
|
||||
assert_eq!(format!("{}", Token::Code(code.clone())), "Tk:Code [open]");
|
||||
|
||||
code.open = false;
|
||||
assert_eq!(
|
||||
format!("{}", Token::Code(code.clone())),
|
||||
"Tk:Code [closed]"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue