Tests for 3+ value positions in basic shapes

This commit is contained in:
Manish Goregaokar 2016-08-30 13:59:40 +05:30
parent 7c9aff33c5
commit bf00733e02

View file

@ -96,6 +96,19 @@ fn test_circle() {
assert_roundtrip_basicshape!(Circle::parse, "circle(calc(1px + 50%) at center)",
"circle(calc(1px + 50%) at 50% 50%)");
assert_roundtrip_basicshape!(Circle::parse, "circle(at right 5px bottom 10px)",
"circle(at right 5px bottom 10px)");
assert_roundtrip_basicshape!(Circle::parse, "circle(at bottom 5px right 10px)",
"circle(at right 10px bottom 5px)");
assert_roundtrip_basicshape!(Circle::parse, "circle(at right 5% top 0px)",
"circle(at 95% 0%)");
assert_roundtrip_basicshape!(Circle::parse, "circle(at right 5% bottom 0px)",
"circle(at 95% 100%)");
assert_roundtrip_basicshape!(Circle::parse, "circle(at right 5% bottom 1px)",
"circle(at right 5% bottom 1px)");
assert_roundtrip_basicshape!(Circle::parse, "circle(at 5% bottom 1px)",
"circle(at left 5% bottom 1px)");
assert!(parse(Circle::parse, "circle(at top 40%)").is_err());
}