Move parse_longhand macro to parse tests module

This commit is contained in:
Manish Goregaokar 2016-10-18 20:40:22 +05:30
parent 80447a79c4
commit 6ca2c7ba77
2 changed files with 8 additions and 8 deletions

View file

@ -11,14 +11,6 @@ use style::properties::shorthands::mask;
use style::stylesheets::Origin;
use url::Url;
macro_rules! parse_longhand {
($name:ident, $s:expr) => {{
let url = Url::parse("http://localhost").unwrap();
let context = ParserContext::new(Origin::Author, &url, Box::new(CSSErrorReporterTest));
$name::parse(&context, &mut Parser::new($s)).unwrap()
}};
}
#[test]
fn mask_shorthand_should_parse_all_available_properties_when_specified() {
let url = Url::parse("http://localhost").unwrap();

View file

@ -32,6 +32,14 @@ macro_rules! assert_roundtrip {
}
macro_rules! parse_longhand {
($name:ident, $s:expr) => {{
let url = Url::parse("http://localhost").unwrap();
let context = ParserContext::new(Origin::Author, &url, Box::new(CSSErrorReporterTest));
$name::parse(&context, &mut Parser::new($s)).unwrap()
}};
}
mod basic_shape;
mod mask;
mod position;