A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
589 B

using Avalonia.Media;
using Xunit;
namespace Avalonia.Visuals.UnitTests.Media
{
public class UnicodeRangeSegmentTests
{
[InlineData("u+00-FF", 0, 255)]
[InlineData("U+00-FF", 0, 255)]
[InlineData("U+00-U+FF", 0, 255)]
[InlineData("U+AB??", 43776, 44031)]
[Theory]
public void Should_Parse(string s, int expectedStart, int expectedEnd)
{
var segment = UnicodeRangeSegment.Parse(s);
Assert.Equal(expectedStart, segment.Start);
Assert.Equal(expectedEnd, segment.End);
}
}
}