瀏覽代碼

Fixed tests

flabbet 7 月之前
父節點
當前提交
1d85a6ae48
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      tests/PixiEditor.Tests/SvgTests.cs

+ 6 - 6
tests/PixiEditor.Tests/SvgTests.cs

@@ -26,10 +26,10 @@ public class SvgTests
     public void TestThatSvgBoundsAreParsedCorrectly(string svg, double x, double y, double width, double height)
     public void TestThatSvgBoundsAreParsedCorrectly(string svg, double x, double y, double width, double height)
     {
     {
         SvgDocument document = SvgDocument.Parse(svg);
         SvgDocument document = SvgDocument.Parse(svg);
-        Assert.Equal(x, document.ViewBox.X);
-        Assert.Equal(y, document.ViewBox.Y);
-        Assert.Equal(width, document.ViewBox.Width);
-        Assert.Equal(height, document.ViewBox.Height);
+        Assert.Equal(x, document.ViewBox.Unit.Value.Value.X);
+        Assert.Equal(y, document.ViewBox.Unit.Value.Value.Y);
+        Assert.Equal(width, document.ViewBox.Unit.Value.Value.Width);
+        Assert.Equal(height, document.ViewBox.Unit.Value.Value.Height);
     }
     }
 
 
     [Theory]
     [Theory]
@@ -234,8 +234,8 @@ public class SvgTests
     [InlineData("#ff0000")]
     [InlineData("#ff0000")]
     [InlineData("rgb(255, 0, 0)")]
     [InlineData("rgb(255, 0, 0)")]
     [InlineData("hsl(0, 100%, 50%)")]
     [InlineData("hsl(0, 100%, 50%)")]
-    [InlineData("hsla(0, 100%, 50%, 1)")]
-    [InlineData("rgba(255, 0, 0, 1)")]
+    [InlineData("hsla(0, 100%, 50%, 255)")]
+    [InlineData("rgba(255, 0, 0, 255)")]
     public void TestThatDifferentColorFormatsGetsParsedToTheSameRedValue(string colorInput)
     public void TestThatDifferentColorFormatsGetsParsedToTheSameRedValue(string colorInput)
     {
     {
         if(SvgColorUtility.TryConvertStringToColor(colorInput, out Color color))
         if(SvgColorUtility.TryConvertStringToColor(colorInput, out Color color))