use crate::token::*; test!( comment_01, "", Token::Comment("comment", 0..14) ); test!(comment_02, "", Token::Comment("", 0..13)); test!(comment_03, "", Token::Comment("", Token::Comment("", Token::Comment("<", Token::Comment("<", Token::Comment("-->", Token::Comment("<>", 0..9)); test!(comment_09, "", Token::Comment("<", 0..8)); test!(comment_10, "", Token::Comment("", Token::Comment("", 0..7)); macro_rules! test_err { ($name:ident, $text:expr) => { #[test] fn $name() { let mut p = html::Tokenizer::from($text); assert!(p.next().unwrap().is_err()); } }; } test_err!(comment_err_01, ""); test_err!(comment_err_02, ""); test_err!(comment_err_05, ""); test_err!(comment_err_07, ""); test_err!(comment_err_15, ""); test_err!(comment_err_20, ""); test_err!(comment_err_27, ""); test_err!(comment_err_28, ""); test_err!(comment_err_29, ""); test_err!(comment_err_33, ""); test_err!(comment_err_34, ""); test_err!(comment_err_35, "");