Skip to content

Instantly share code, notes, and snippets.

@karan1276
Created March 5, 2017 09:49
Show Gist options
  • Save karan1276/61916a46b1d83a1963b0fec5dac58391 to your computer and use it in GitHub Desktop.
Save karan1276/61916a46b1d83a1963b0fec5dac58391 to your computer and use it in GitHub Desktop.
#[test]
fn blur_radius_should_not_accept_negavite_values() {
use style::properties::longhands::box_shadow;
let result = parse_longhand!(box_shadow, "1px 1px -1px");
assert_eq!(result, "");
}
@karan1276
Copy link
Author

karan1276 commented Mar 5, 2017

I get an error on line 5,

error[E0308]: mismatched types
  --> /home/karan1276/Desktop/git_projects/servo/tests/unit/style/parsing/effects.rs:41:5
   |
41 |     assert_eq!(result, "");
   |     ^^^^^^^^^^^^^^^^^^^^^^^ expected struct `style::properties::longhands::box_shadow::SpecifiedValue`, found &str
   |
   = note: expected type `style::properties::longhands::box_shadow::SpecifiedValue`
              found type `&str`
   = note: this error originates in a macro outside of the current crate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment