Expand test coverage
This commit is contained in:
parent
3837af387a
commit
5958f1551b
27 changed files with 593 additions and 109 deletions
|
|
@ -90,6 +90,8 @@ impl std::fmt::Display for List {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::syntax::content::parser::token::Token;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
|
|
@ -164,4 +166,20 @@ mod tests {
|
|||
</ul>\n\n"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn token_display() {
|
||||
let list = List::new(false);
|
||||
assert_eq!(
|
||||
format!("{}", Token::List(list.clone())),
|
||||
"Tk:List [0 unordered items]"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(expected = "Attempt to lex a List directly from a lexeme")]
|
||||
fn lex() {
|
||||
let lexeme = Lexeme::new("SL6PX", "6xsNB", "oeAHa");
|
||||
List::lex(&lexeme);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue