From 637dc39544f1b443bdceb880a37a865948440a38 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sat, 25 Apr 2020 12:16:10 -0400 Subject: [PATCH] prefer #[ignore] over commenting out tests --- tests/color.rs | 9 +++++---- tests/division.rs | 5 ----- tests/meta.rs | 36 ++++++++++++++++++++---------------- tests/selectors.rs | 22 ++++++++++++---------- tests/units.rs | 5 +++++ 5 files changed, 42 insertions(+), 35 deletions(-) diff --git a/tests/color.rs b/tests/color.rs index 8bb882a..afb5df8 100644 --- a/tests/color.rs +++ b/tests/color.rs @@ -278,10 +278,11 @@ test!( "a {\n color: black;\n}\n" ); test!(invert_number, "a {\n color: invert(10%);\n}\n"); -// test!( -// invert_number_casing, -// "a {\n color: iNveRt(10%);\n}\n" -// ); +test!( + #[ignore] + invert_number_casing, + "a {\n color: iNveRt(10%);\n}\n" +); test!( invert_weight_percent, "a {\n color: invert(white, 20%);\n}\n", diff --git a/tests/division.rs b/tests/division.rs index 5db0aae..a6f36b6 100644 --- a/tests/division.rs +++ b/tests/division.rs @@ -28,8 +28,3 @@ test!( "a {\n slash-after-comma: (1, / 2);\n}\n", "a {\n slash-after-comma: 1, /2;\n}\n" ); -// error!( -// none_div_unit, -// "a {\n color: (35 / 7%);\n}\n", -// "Error: 5%^-1 isn't a valid CSS value." -// ); diff --git a/tests/meta.rs b/tests/meta.rs index f1aa4cc..abb5b5d 100644 --- a/tests/meta.rs +++ b/tests/meta.rs @@ -43,27 +43,30 @@ test!( "a {\n color: feature-exists(at-error)\n}\n", "a {\n color: true;\n}\n" ); -// Uncomment as more features are added test!( feature_exists_global_variable_shadowing, "a {\n color: feature-exists(global-variable-shadowing)\n}\n", "a {\n color: true;\n}\n" ); -// test!( -// feature_exists_extend_selector_pseudoclass, -// "a {\n color: feature-exists(extend-selector-pseudoclass)\n}\n", -// "a {\n color: true;\n}\n" -// ); +// Unignore as more features are added +test!( + #[ignore] + feature_exists_extend_selector_pseudoclass, + "a {\n color: feature-exists(extend-selector-pseudoclass)\n}\n", + "a {\n color: true;\n}\n" +); test!( feature_exists_units_level_3, "a {\n color: feature-exists(units-level-3)\n}\n", "a {\n color: true;\n}\n" ); -// test!( -// feature_exists_custom_property, -// "a {\n color: feature-exists(custom-property)\n}\n", -// "a {\n color: true;\n}\n" -// ); +// Unignore as more features are added +test!( + #[ignore] + feature_exists_custom_property, + "a {\n color: feature-exists(custom-property)\n}\n", + "a {\n color: true;\n}\n" +); test!( feature_exists_nonsense, "a {\n color: feature-exists(foo)\n}\n", @@ -346,8 +349,9 @@ test!( "a {\n color: inspect(1 2 3)\n}\n", "a {\n color: 1 2 3;\n}\n" ); -// test!( -// inspect_comma_list, -// "a {\n color: inspect(1, 2, 3)\n}\n", -// "a {\n color: 1, 2, 3;\n}\n" -// ); +test!( + #[ignore] + inspect_comma_list, + "a {\n color: inspect(1, 2, 3)\n}\n", + "a {\n color: 1, 2, 3;\n}\n" +); diff --git a/tests/selectors.rs b/tests/selectors.rs index 291c3a1..363bcfc 100644 --- a/tests/selectors.rs +++ b/tests/selectors.rs @@ -64,16 +64,18 @@ test!( selector_attribute_equals, "[attr=val] {\n color: red;\n}\n" ); -// test!( -// selector_attribute_removes_single_quotes, -// "[attr='val'] {\n color: red;\n}\n", -// "[attr=val] {\n color: red;\n}\n" -// ); -// test!( -// selector_attribute_removes_double_quotes, -// "[attr=\"val\"] {\n color: red;\n}\n", -// "[attr=val] {\n color: red;\n}\n" -// ); +test!( + #[ignore] + selector_attribute_removes_single_quotes, + "[attr='val'] {\n color: red;\n}\n", + "[attr=val] {\n color: red;\n}\n" +); +test!( + #[ignore] + selector_attribute_removes_double_quotes, + "[attr=\"val\"] {\n color: red;\n}\n", + "[attr=val] {\n color: red;\n}\n" +); test!( selector_attribute_maintains_quotes_around_invalid_identifier, "[attr=\"val.\"] {\n color: red;\n}\n" diff --git a/tests/units.rs b/tests/units.rs index 3b7f339..5612fef 100644 --- a/tests/units.rs +++ b/tests/units.rs @@ -83,6 +83,11 @@ error!( "a {\n color: 1rem * 1px * 1rad * 1foo;\n}\n", "Error: 1rem*px*rad*foo isn't a valid CSS value." ); +error!( + #[ignore] + none_div_unit, + "a {\n color: (35 / 7%);\n}\n", "Error: 5%^-1 isn't a valid CSS value." +); macro_rules! test_unit_addition { ($u1:ident, $u2:ident, $out:literal) => {