public void CompareMutableArrays() { var comparer = default(ByteArrayComparer); ComparerTestUtils.TestComparison( comparer, new List <byte[]>() { new byte[] { }, new byte[] { 0x00 }, new byte[] { 0x00, 0x00 }, new byte[] { 0x00, 0x80 }, new byte[] { 0x00, 0xff }, new byte[] { 0x01 }, new byte[] { 0x01, 0x01 }, new byte[] { 0x01, 0x80 }, new byte[] { 0x01, 0xff }, } ); }
public void CompareImmutableArrays() { var comparer = default(ByteArrayComparer); ComparerTestUtils.TestComparison( comparer, new List <ImmutableArray <byte> >() { ImmutableArray <byte> .Empty, new byte[] { 0x00 }.ToImmutableArray(), new byte[] { 0x00, 0x00 }.ToImmutableArray(), new byte[] { 0x00, 0x80 }.ToImmutableArray(), new byte[] { 0x00, 0xff }.ToImmutableArray(), new byte[] { 0x01 }.ToImmutableArray(), new byte[] { 0x01, 0x01 }.ToImmutableArray(), new byte[] { 0x01, 0x80 }.ToImmutableArray(), new byte[] { 0x01, 0xff }.ToImmutableArray(), } ); }
public void TestComparison() { var comparer = new CompositeComparer <string, string>( StringComparer.Create(CultureInfo.InvariantCulture, true), StringComparer.Create(CultureInfo.InvariantCulture, false) ); ComparerTestUtils.TestComparison( comparer, new List <(string, string)>() { (string.Empty, string.Empty), (string.Empty, "world"), (string.Empty, "world1"), ("hello", string.Empty), ("hello", "world"), ("hello", "world1"), ("hello1", string.Empty), ("hello1", "world"), ("hello1", "world1"), } ); }