You've already forked linux-packaging-mono
Imported Upstream version 5.8.0.22
Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
parent
5f4a27cc8a
commit
7d05485754
@@ -48,7 +48,7 @@ namespace System.Text.Tests
|
||||
bytes[i] = (byte)i;
|
||||
}
|
||||
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
AssertExtensions.Throws<ArgumentException>("chars", () =>
|
||||
{
|
||||
decoder.GetChars(bytes, 0, bytes.Length, chars, chars.Length - 1, false);
|
||||
});
|
||||
@@ -56,7 +56,7 @@ namespace System.Text.Tests
|
||||
|
||||
decoder.GetChars(bytes, 0, bytes.Length, chars, 0, false);
|
||||
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
AssertExtensions.Throws<ArgumentException>("chars", () =>
|
||||
{
|
||||
decoder.GetChars(bytes, 0, bytes.Length, chars, chars.Length - 1, true);
|
||||
});
|
||||
|
||||
@@ -46,7 +46,6 @@ namespace System.Text.Encodings.Tests
|
||||
|
||||
[Fact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework uses system ACP and not UTF8")]
|
||||
[ActiveIssue("https://github.com/dotnet/corefx/issues/20715 - Sync up Encoding code between CoreRT and CoreCLR", TargetFrameworkMonikers.UapAot)]
|
||||
public static void DefaultEncodingBOMTest()
|
||||
{
|
||||
UTF8Encoding defaultEncoding = Encoding.Default as UTF8Encoding;
|
||||
@@ -69,7 +68,6 @@ namespace System.Text.Encodings.Tests
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(Encoding_TestData))]
|
||||
[ActiveIssue("https://github.com/dotnet/corefx/issues/20715 - Sync up Encoding code between CoreRT and CoreCLR", TargetFrameworkMonikers.UapAot)]
|
||||
public static void NormalizationTest(int codepage, string name, string bodyName, string headerName, bool isBrowserDisplay,
|
||||
bool isBrowserSave, bool isMailNewsDisplay, bool isMailNewsSave, int windowsCodePage)
|
||||
{
|
||||
@@ -86,7 +84,6 @@ namespace System.Text.Encodings.Tests
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(Normalization_TestData))]
|
||||
[ActiveIssue("https://github.com/dotnet/corefx/issues/20715 - Sync up Encoding code between CoreRT and CoreCLR", TargetFrameworkMonikers.UapAot)]
|
||||
public static void NormalizationTest(int codepage, bool normalized, bool normalizedC, bool normalizedD, bool normalizedKC, bool normalizedKD)
|
||||
{
|
||||
Encoding encoding = Encoding.GetEncoding(codepage);
|
||||
|
||||
@@ -37,12 +37,12 @@ namespace System.Text.Tests
|
||||
AssertExtensions.Throws<ArgumentNullException>("replacement", () => new DecoderReplacementFallback(null));
|
||||
|
||||
// Invalid surrogate pair
|
||||
Assert.Throws<ArgumentException>(() => new DecoderReplacementFallback("\uD800"));
|
||||
Assert.Throws<ArgumentException>(() => new DecoderReplacementFallback("\uD800a"));
|
||||
Assert.Throws<ArgumentException>(() => new DecoderReplacementFallback("\uDC00"));
|
||||
Assert.Throws<ArgumentException>(() => new DecoderReplacementFallback("a\uDC00"));
|
||||
Assert.Throws<ArgumentException>(() => new DecoderReplacementFallback("\uDC00\uDC00"));
|
||||
Assert.Throws<ArgumentException>(() => new DecoderReplacementFallback("\uD800\uD800"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new DecoderReplacementFallback("\uD800"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new DecoderReplacementFallback("\uD800a"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new DecoderReplacementFallback("\uDC00"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new DecoderReplacementFallback("a\uDC00"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new DecoderReplacementFallback("\uDC00\uDC00"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new DecoderReplacementFallback("\uD800\uD800"));
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> Equals_TestData()
|
||||
|
||||
@@ -37,12 +37,12 @@ namespace System.Text.Tests
|
||||
AssertExtensions.Throws<ArgumentNullException>("replacement", () => new EncoderReplacementFallback(null));
|
||||
|
||||
// Invalid surrogate pair
|
||||
Assert.Throws<ArgumentException>(() => new EncoderReplacementFallback("\uD800"));
|
||||
Assert.Throws<ArgumentException>(() => new EncoderReplacementFallback("\uD800a"));
|
||||
Assert.Throws<ArgumentException>(() => new EncoderReplacementFallback("\uDC00"));
|
||||
Assert.Throws<ArgumentException>(() => new EncoderReplacementFallback("a\uDC00"));
|
||||
Assert.Throws<ArgumentException>(() => new EncoderReplacementFallback("\uDC00\uDC00"));
|
||||
Assert.Throws<ArgumentException>(() => new EncoderReplacementFallback("\uD800\uD800"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new EncoderReplacementFallback("\uD800"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new EncoderReplacementFallback("\uD800a"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new EncoderReplacementFallback("\uDC00"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new EncoderReplacementFallback("a\uDC00"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new EncoderReplacementFallback("\uDC00\uDC00"));
|
||||
AssertExtensions.Throws<ArgumentException>(null, () => new EncoderReplacementFallback("\uD800\uD800"));
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> Equals_TestData()
|
||||
|
||||
@@ -79,9 +79,6 @@
|
||||
<Compile Include="UnicodeEncoding\UnicodeEncoding.cs" />
|
||||
<Compile Include="Decoder\Decoder.cs" />
|
||||
<Compile Include="Encoder\Encoder.cs" />
|
||||
<Compile Include="$(CommonTestPath)\System\AssertExtensions.cs">
|
||||
<Link>Common\System\AssertExtensions.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
|
||||
@@ -85,7 +85,6 @@ namespace System.Text.Tests
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(Encodings_TestData))]
|
||||
[ActiveIssue("https://github.com/dotnet/corefx/issues/20715 - Sync up Encoding code between CoreRT and CoreCLR", TargetFrameworkMonikers.UapAot)]
|
||||
public void WebName(UTF32Encoding encoding, string webName)
|
||||
{
|
||||
Assert.Equal(webName, encoding.WebName);
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace System.Text.Tests
|
||||
yield return new object[] { new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 84, 0, 101, 0, 115, 0, 116, 0, 117, 221 }, 0, 18, "TestTest\uFFFD" };
|
||||
yield return new object[] { new byte[] { 84, 0, 101, 0, 115, 0, 116, 0, 84, 0, 101, 0, 115, 0, 116, 0, 3, 216 }, 0, 17, "TestTest\uFFFD" };
|
||||
|
||||
yield return new object[] { new byte[] { 0, 0, 84, 0, 101, 0, 10, 0, 115, 0, 116, 0, 0, 0, 9, 0, 0, 0, 84, 0, 15, 0, 101, 0, 115, 0, 116, 0, 0, 0, 0 }, 0, 31, "\0Te\nst\0\t\0T\u000Fest\0\uFFFD" };
|
||||
yield return new object[] { new byte[] { 84, 0, 0, 0, 84, 0, 101, 0, 10, 0, 115, 0, 116, 0, 0, 0, 9, 0, 0, 0, 84, 0, 15, 0, 101, 0, 115, 0, 116, 0, 0, 0, 0 }, 0, 33, "T\0Te\nst\0\t\0T\u000Fest\0\uFFFD" };
|
||||
|
||||
yield return new object[] { new byte[] { 3, 216, 84 }, 0, 3, "\uFFFD\uFFFD" };
|
||||
|
||||
@@ -130,7 +130,6 @@ namespace System.Text.Tests
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(Decode_InvalidBytes_TestData))]
|
||||
[ActiveIssue("https://github.com/dotnet/corefx/issues/20715", TargetFrameworkMonikers.UapAot)]
|
||||
public void Decode_InvalidBytes(byte[] littleEndianBytes, int index, int count, string expected)
|
||||
{
|
||||
byte[] bigEndianBytes = GetBigEndianBytes(littleEndianBytes, index, count);
|
||||
|
||||
@@ -85,7 +85,6 @@ namespace System.Text.Tests
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(Encodings_TestData))]
|
||||
[ActiveIssue("https://github.com/dotnet/corefx/issues/20715 - Sync up Encoding code between CoreRT and CoreCLR", TargetFrameworkMonikers.UapAot)]
|
||||
public void WebName(UnicodeEncoding encoding, string expected)
|
||||
{
|
||||
Assert.Equal(expected, encoding.WebName);
|
||||
|
||||
Reference in New Issue
Block a user