Expand test coverage

This commit is contained in:
Juno Takano 2026-01-10 05:42:36 -03:00
commit 5958f1551b
27 changed files with 593 additions and 109 deletions

View file

@ -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);
}
}