-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
249 additions
and
67 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_GeometryData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#if __WASM__ | ||
|
||
using System; | ||
using Microsoft.UI.Xaml.Media; | ||
using Uno.Xaml; | ||
|
||
namespace Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml_Media; | ||
|
||
[TestClass] | ||
[RunsOnUIThread] | ||
public class Given_GeometryData | ||
{ | ||
[DataTestMethod] | ||
[DataRow("", FillRule.EvenOdd, "")] | ||
[DataRow("F0", FillRule.EvenOdd, "")] | ||
[DataRow("F1", FillRule.Nonzero, "")] | ||
[DataRow(" F1", FillRule.Nonzero, "")] | ||
[DataRow(" F 1", FillRule.Nonzero, "")] | ||
[DataRow("F1 M0 0", FillRule.Nonzero, "M0 0")] | ||
[DataRow(" F1 M0 0", FillRule.Nonzero, " M0 0")] | ||
[DataRow(" F 1 M0 0", FillRule.Nonzero, " M0 0")] | ||
public void When_GeometryData_ParseData_Valid(string rawdata, FillRule rule, string data) | ||
{ | ||
var result = GeometryData.ParseData(rawdata); | ||
|
||
Assert.AreEqual(rule, result.FillRule); | ||
Assert.AreEqual(data, result.Data); | ||
} | ||
|
||
[DataTestMethod] | ||
[DataRow("F")] | ||
[DataRow("F2")] | ||
[DataRow("FF")] | ||
[DataRow("F 2")] | ||
[DataRow("F M0 0")] | ||
public void When_GeometryData_ParseData_Invalid(string rawdata) | ||
{ | ||
Assert.ThrowsException<XamlParseException>(() => | ||
GeometryData.ParseData(rawdata) | ||
); | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.