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

@ -26,3 +26,27 @@ impl std::fmt::Display for Literal {
write!(f, "Literal {}", crate::dev::wrap(&self.text))
}
}
#[cfg(test)]
mod tests {
use crate::syntax::content::parser::token::Token;
use super::*;
#[test]
fn token_display() {
let mut literal = Literal {
text: String::from("MYpDT"),
};
assert_eq!(
format!("{}", Token::Literal(literal.clone())),
"Tk:Literal MYpDT"
);
literal.text = String::from("TjY02");
assert_eq!(
format!("{}", Token::Literal(literal.clone())),
"Tk:Literal TjY02"
);
}
}