diff --git a/tests/imports.rs b/tests/imports.rs index 9294019..f2b1d53 100644 --- a/tests/imports.rs +++ b/tests/imports.rs @@ -12,10 +12,8 @@ macro_rules! test_import { write!(f, $content).unwrap(); )* let mut buf = Vec::new(); - StyleSheet::new($input.to_string()) - .expect(concat!("failed to parse in ")) - .print_as_css(&mut buf) - .expect(concat!("failed to pretty print on ", $input)); + StyleSheet::new($input.to_string(), &mut buf) + .expect(concat!("failed to parse on ", $input)); assert_eq!( String::from($output), String::from_utf8(buf).expect("produced invalid utf8") diff --git a/tests/macros.rs b/tests/macros.rs index a9b3269..25b6d04 100644 --- a/tests/macros.rs +++ b/tests/macros.rs @@ -8,10 +8,10 @@ macro_rules! test { #[allow(non_snake_case)] fn $func() { let mut buf = Vec::new(); - grass::StyleSheet::new($input.to_string()) - .expect(concat!("failed to parse on ", $input)) - .print_as_css(&mut buf) - .expect(concat!("failed to pretty print on ", $input)); + grass::StyleSheet::new($input.to_string(), &mut buf) + .expect(concat!("failed to parse on ", $input)); + // .print_as_css() + // .expect(concat!("failed to pretty print on ", $input)); assert_eq!( String::from($input), String::from_utf8(buf).expect("produced invalid utf8") @@ -24,10 +24,8 @@ macro_rules! test { #[allow(non_snake_case)] fn $func() { let mut buf = Vec::new(); - grass::StyleSheet::new($input.to_string()) - .expect(concat!("failed to parse on ", $input)) - .print_as_css(&mut buf) - .expect(concat!("failed to pretty print on ", $input)); + grass::StyleSheet::new($input.to_string(), &mut buf) + .expect(concat!("failed to parse on ", $input)); assert_eq!( String::from($output), String::from_utf8(buf).expect("produced invalid utf8") @@ -45,7 +43,8 @@ macro_rules! error { #[test] #[allow(non_snake_case)] fn $func() { - match grass::StyleSheet::new($input.to_string()) { + let mut buf = Vec::new(); + match grass::StyleSheet::new($input.to_string(), &mut buf) { Ok(..) => panic!("did not fail"), Err(e) => assert_eq!($err, e.to_string() .chars()