mirror of
https://github.com/servo/servo.git
synced 2025-07-25 16:20:36 +01:00
Move parse_longhand macro to parse tests module
This commit is contained in:
parent
80447a79c4
commit
6ca2c7ba77
2 changed files with 8 additions and 8 deletions
|
@ -11,14 +11,6 @@ use style::properties::shorthands::mask;
|
||||||
use style::stylesheets::Origin;
|
use style::stylesheets::Origin;
|
||||||
use url::Url;
|
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]
|
#[test]
|
||||||
fn mask_shorthand_should_parse_all_available_properties_when_specified() {
|
fn mask_shorthand_should_parse_all_available_properties_when_specified() {
|
||||||
let url = Url::parse("http://localhost").unwrap();
|
let url = Url::parse("http://localhost").unwrap();
|
||||||
|
|
|
@ -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 basic_shape;
|
||||||
mod mask;
|
mod mask;
|
||||||
mod position;
|
mod position;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue