update tests to include new API changes
This commit is contained in:
parent
a3a218f950
commit
47b7ece6c5
@ -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")
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user