public void VerifyChar8() { var x1 = "Hello, W"; Char8 x2 = x1; string x3 = x1; Claim.eq(x1, x3); Span <char> x4 = x2; Claim.eq(Char8.CharCount, x4.Length); ReadOnlySpan <char> x5 = x1; Claim.eq(Char8.CharCount, x5.Length); }
public static void OperatorGreaterThan(Char8 a, Char8 b, bool expected) { Assert.Equal(expected, (Char8)a > (Char8)b); Assert.NotEqual(expected, (Char8)a <= (Char8)b); }
public static void OperatorLessThan(Char8 a, Char8 b, bool expected) { Assert.Equal(expected, (Char8)a < (Char8)b); Assert.NotEqual(expected, (Char8)a >= (Char8)b); }
public static void OperatorEquals(Char8 a, Char8 b, bool expected) { Assert.Equal(expected, (Char8)a == (Char8)b); Assert.NotEqual(expected, (Char8)a != (Char8)b); }
public static void CompareTo(Char8 a, Char8 b, int expectedSign) { Assert.Equal(expectedSign, Math.Sign(a.CompareTo(b))); }