@@ -920,33 +920,6 @@ fn css_scroll_snap_align() {
920920 assert!(output.contains("scroll-snap-align:center"));
921921}
922922
923−// ---------------------------------------------------------------------------
924−// Feature tests: @warn / @debug
925−// ---------------------------------------------------------------------------
926−
927−#[test]
928−fn warn_produces_diagnostic() {
929− let diags = parse_diagnostics("@warn Something is wrong");
930− assert!(
931− diags.iter().any(|d| d.message == "Something is wrong"
932− && d.severity == htmlang::parser::Severity::Warning),
933− "expected @warn diagnostic, got: {:?}",
934− diags
935− );
936−}
937−
938−#[test]
939−fn warn_substitutes_variables() {
940− let diags = parse_diagnostics("@let name test\n@warn Missing $name value");
941− assert!(
942− diags
943− .iter()
944− .any(|d| d.message.contains("Missing test value")),
945− "expected substituted @warn, got: {:?}",
946− diags
947− );
948−}
949−
950923// ---------------------------------------------------------------------------
951924// Feature tests: image optimization hints
952925// ---------------------------------------------------------------------------
@@ -3694,64 +3667,6 @@ fn no_warning_used_mixin() {
36943667 );
36953668}
36963669
3697−// ---------------------------------------------------------------------------
3698−// @assert directive
3699−// ---------------------------------------------------------------------------
3700−
3701−#[test]
3702−fn snapshot_assert_directive() {
3703− snapshot_test("assert_directive");
3704−}
3705−
3706−#[test]
3707−fn assert_passes_no_error() {
3708− let diags = parse_diagnostics("@let x hello\n@assert $x == hello\n@el [padding 10]");
3709− assert!(
3710− !diags
3711− .iter()
3712− .any(|d| d.severity == htmlang::parser::Severity::Error),
3713− "passing assertion should produce no error, got: {:?}",
3714− diags
3715− );
3716−}
3717−
3718−#[test]
3719−fn assert_fails_produces_error() {
3720− let diags = parse_diagnostics("@let x hello\n@assert $x == world");
3721− assert!(
3722− diags
3723− .iter()
3724− .any(|d| d.severity == htmlang::parser::Severity::Error
3725− && d.message.contains("assertion failed")),
3726− "failing assertion should produce error, got: {:?}",
3727− diags
3728− );
3729−}
3730−
3731−#[test]
3732−fn assert_not_equal() {
3733− let diags = parse_diagnostics("@let x hello\n@assert $x != world\n@el");
3734− assert!(
3735− !diags
3736− .iter()
3737− .any(|d| d.severity == htmlang::parser::Severity::Error),
3738− "!= assertion should pass when values differ, got: {:?}",
3739− diags
3740− );
3741−}
3742−
3743−#[test]
3744−fn assert_truthy() {
3745− let diags = parse_diagnostics("@let x true\n@assert $x\n@el");
3746− assert!(
3747− !diags
3748− .iter()
3749− .any(|d| d.severity == htmlang::parser::Severity::Error),
3750− "truthy assertion should pass, got: {:?}",
3751− diags
3752− );
3753−}
3754−
37553670// ---------------------------------------------------------------------------
37563671// clamp() / min() / max() CSS functions
37573672// ---------------------------------------------------------------------------
@@ -4173,16 +4088,6 @@ fn test_error_circular_include() {
41734088 );
41744089}
41754090
4176−#[test]
4177−fn test_error_assert_failure() {
4178− let diags = parse_diagnostics("@let x 5\n@assert $x == 10");
4179− assert!(
4180− diags.iter().any(|d| d.message.contains("assertion failed")
4181− && d.severity == htmlang::parser::Severity::Error),
4182− "should report assertion failure as error"
4183− );
4184−}
4185−
41864091#[test]
41874092fn test_error_duplicate_attribute() {
41884093 let diags = parse_diagnostics("@el [padding 10, padding 20]\n Hello");
@@ -4250,21 +4155,6 @@ fn test_spread_define() {
42504155 );
42514156}
42524157
4253−#[test]
4254−fn test_log_directive() {
4255− // @log should not produce errors and should be consumed without output nodes
4256− let result = htmlang::parser::parse("@let x hello\n@warn x = $x\n@text $x");
4257− assert!(
4258− result
4259− .diagnostics
4260− .iter()
4261− .all(|d| d.severity != htmlang::parser::Severity::Error),
4262− "@warn should = $should, not = $not, produce = $produce, errors = $errors"
4263− );
4264− let html = htmlang::codegen::generate(&result.document);
4265− assert!(!html.contains("@log"), "@warn should = $should, not = $not, appear = $appear, in = $in, output = $output");
4266−}
4267−
42684158#[test]
42694159fn test_short_class_names() {
42704160 let html = compile("@el [padding 10]\n @el [padding 20]\n Hello");