diff options
-rw-r--r-- | tests/unit/style/parsing/basic_shape.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/style/parsing/basic_shape.rs b/tests/unit/style/parsing/basic_shape.rs index 09caba23942..da829e7c29d 100644 --- a/tests/unit/style/parsing/basic_shape.rs +++ b/tests/unit/style/parsing/basic_shape.rs @@ -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()); } |