From 8955042359125d08942e8165ba8f30e4b15aed60 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sat, 18 Apr 2020 18:46:17 -0400 Subject: [PATCH] Remove SCSS unit tests The behavior tested by them is redundantly tested in the integration tests. In addition, the behavior inside format.rs is redundant and will eventually be removed. --- src/format.rs | 70 --------------------------------------------------- 1 file changed, 70 deletions(-) diff --git a/src/format.rs b/src/format.rs index 2165f13..89a60e1 100644 --- a/src/format.rs +++ b/src/format.rs @@ -53,73 +53,3 @@ impl PrettyPrinter { Ok(()) } } - -#[cfg(test)] -mod test_scss { - use super::StyleSheet; - macro_rules! test { - ($func:ident, $input:literal) => { - #[test] - fn $func() { - assert_eq!( - String::from($input), - StyleSheet::new($input.to_string()) - .expect(concat!("failed to parse on ", $input)) - .to_string() - ); - } - }; - ($func:ident, $input:literal, $output:literal) => { - #[test] - fn $func() { - assert_eq!( - String::from($output), - StyleSheet::new($input.to_string()) - .expect(concat!("failed to parse on ", $input)) - .to_string() - ); - } - }; - } - - test!(empty, ""); - test!(basic_nesting, "a {\n b {\n }\n}\n"); - test!(mul_nesting, "a, b {\n a, b {\n }\n}\n"); - test!(basic_style, "a {\n color: red;\n}\n"); - test!(two_styles, "a {\n color: red;\n color: blue;\n}\n"); - test!( - nested_style_in_parent, - "a {\n color: red;\n b {\n }\n}\n" - ); - test!( - nested_style_in_child, - "a {\n b {\n color: red;\n }\n}\n" - ); - test!( - nested_style_in_both, - "a {\n color: red;\n b {\n color: red;\n }\n}\n" - ); - test!( - deeply_nested_selector, - "\ -a { - b { - c { - d { - e { - f { - g { - h { - i { - } - } - } - } - } - } - } - } -} -" - ); -}