Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit d9a7a40

Browse files
committed
Merge pull request #1908 from stephentoub/disable_encoding_unix
Disable System.Text.Encoding.Extensions tests failing on Unix
2 parents 6182749 + c400fc3 commit d9a7a40

File tree

9 files changed

+165
-14
lines changed

9 files changed

+165
-14
lines changed

src/System.Text.Encoding.Extensions/tests/4.0.10.0/Encoding/ASCII.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public static void CorrectByteCodes()
103103
}
104104

105105
[Fact]
106+
[ActiveIssue(846, PlatformID.AnyUnix)]
106107
public static void InvalidSequences()
107108
{
108109
s_encodingUtil_ASCII.GetCharsTest(new Byte[] { 0x7F }, 0, 1, -1, 0, "", 1);
@@ -125,6 +126,7 @@ public static void InvalidSequences()
125126
}
126127

127128
[Fact]
129+
[ActiveIssue(846, PlatformID.AnyUnix)]
128130
public static void MaxCharCount()
129131
{
130132
s_encodingUtil_ASCII.GetMaxCharCountTest(0, 0);
@@ -135,6 +137,7 @@ public static void MaxCharCount()
135137
}
136138

137139
[Fact]
140+
[ActiveIssue(846, PlatformID.AnyUnix)]
138141
public static void MaxByteCount()
139142
{
140143
s_encodingUtil_ASCII.GetMaxByteCountTest(0, 1);
@@ -145,12 +148,14 @@ public static void MaxByteCount()
145148
}
146149

147150
[Fact]
151+
[ActiveIssue(846, PlatformID.AnyUnix)]
148152
public static void Preamble()
149153
{
150154
s_encodingUtil_ASCII.GetPreambleTest(new Byte[] { });
151155
}
152156

153157
[Fact]
158+
[ActiveIssue(846, PlatformID.AnyUnix)]
154159
public static void DefaultFallback()
155160
{
156161
s_encodingUtil_ASCII.GetBytesTest("\u0080\u00FF\u0B71\uFFFF\uD800\uDFFF", 0, 6, -1, 0, new Byte[] { 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F }, 6);

src/System.Text.Encoding.Extensions/tests/4.0.10.0/Encoding/ISO-8859-1.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public static void BufferBoundary()
7373
}
7474

7575
[Fact]
76+
[ActiveIssue(846, PlatformID.AnyUnix)]
7677
public static void ValidCodes()
7778
{
7879
s_encodingUtil_Latin1.GetCharsTest(new Byte[] { 0x01, 0x09, 0x10, 0x3F, 0x5C, 0x9F, 0xCB, 0xE7, 0xFF }, 0, 9, -1, 0, "\u0001\u0009\u0010\u003F\u005C\u009F\u00CB\u00E7\u00FF", 9);
@@ -82,6 +83,7 @@ public static void ValidCodes()
8283
}
8384

8485
[Fact]
86+
[ActiveIssue(846, PlatformID.AnyUnix)]
8587
public static void MaxCharCount()
8688
{
8789
s_encodingUtil_Latin1.GetMaxCharCountTest(0, 0);
@@ -92,6 +94,7 @@ public static void MaxCharCount()
9294
}
9395

9496
[Fact]
97+
[ActiveIssue(846, PlatformID.AnyUnix)]
9598
public static void MaxByteCount()
9699
{
97100
s_encodingUtil_Latin1.GetMaxByteCountTest(0, 1);
@@ -102,12 +105,14 @@ public static void MaxByteCount()
102105
}
103106

104107
[Fact]
108+
[ActiveIssue(846, PlatformID.AnyUnix)]
105109
public static void Preamble()
106110
{
107111
s_encodingUtil_Latin1.GetPreambleTest(new Byte[] { });
108112
}
109113

110114
[Fact]
115+
[ActiveIssue(846, PlatformID.AnyUnix)]
111116
public static void DefaultFallback()
112117
{
113118
s_encodingUtil_Latin1.GetBytesTest("\uD800\uDFFF", 0, 2, -1, 0, new Byte[] { 0x3F, 0x3F }, 2);

src/System.Text.Encoding.Extensions/tests/4.0.10.0/Encoding/UTF16BE.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static class UTF16BE
1212
private static readonly EncodingTestHelper s_encodingUtil_UTF16BE = new EncodingTestHelper("UTF-16BE");
1313

1414
[Fact]
15+
[ActiveIssue(846, PlatformID.AnyUnix)]
1516
public static void GetByteCount_InvalidArgumentAndBoundaryValues()
1617
{
1718
s_encodingUtil_UTF16BE.GetByteCountTest(String.Empty, 0, 0, 0);
@@ -29,6 +30,7 @@ public static void GetByteCount_InvalidArgumentAndBoundaryValues()
2930
}
3031

3132
[Fact]
33+
[ActiveIssue(846, PlatformID.AnyUnix)]
3234
public static void GetCharCount_InvalidArgumentAndBoundaryValues()
3335
{
3436
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16BE.GetCharCountTest((Byte[])null, 0, 0, 0));
@@ -86,6 +88,7 @@ public static void GetCharCount_InvalidConversionInput()
8688
}
8789

8890
[Fact]
91+
[ActiveIssue(846, PlatformID.AnyUnix)]
8992
public static void GetChars_BufferBoundary()
9093
{
9194
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16BE.GetCharsTest(new Byte[] { 0x00, 0x61, 0x00, 0x62, 0x00, 0x63 }, 0, 6, -2, 0, String.Empty, 0));
@@ -103,6 +106,7 @@ public static void GetChars_BufferBoundary()
103106
}
104107

105108
[Fact]
109+
[ActiveIssue(846, PlatformID.AnyUnix)]
106110
public static void GetBytes_BufferBoundary()
107111
{
108112
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16BE.GetBytesTest("abc", 0, 3, -2, 0, (Byte[])null, 0));
@@ -120,6 +124,7 @@ public static void GetBytes_BufferBoundary()
120124
}
121125

122126
[Fact]
127+
[ActiveIssue(846, PlatformID.AnyUnix)]
123128
public static void GetChars_BufferBoundary_Pointer()
124129
{
125130
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16BE.GetCharsTest((Byte[])null, 0, 0, 0, String.Empty, 0));
@@ -135,6 +140,7 @@ public static void GetChars_BufferBoundary_Pointer()
135140
}
136141

137142
[Fact]
143+
[ActiveIssue(846, PlatformID.AnyUnix)]
138144
public static void GetBytes_BufferBoundary_Pointer()
139145
{
140146
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16BE.GetBytesTest((String)null, 0, 0, 0, new Byte[] { }, 0));
@@ -150,12 +156,14 @@ public static void GetBytes_BufferBoundary_Pointer()
150156
}
151157

152158
[Fact]
159+
[ActiveIssue(846, PlatformID.AnyUnix)]
153160
public static void BasicValidInputs()
154161
{
155162
s_encodingUtil_UTF16BE.GetCharsTest(new Byte[] { 0x00, 0x61 }, 0, 2, -1, 0, "a", 1);
156163
}
157164

158165
[Fact]
166+
[ActiveIssue(846, PlatformID.AnyUnix)]
159167
public static void InvalidSequences()
160168
{
161169
s_encodingUtil_UTF16BE.GetCharsTest(new Byte[] { 0x00, 0x61, 0x00 }, 0, 3, -1, 0, "\u0061\uFFFD", 2);
@@ -166,6 +174,7 @@ public static void InvalidSequences()
166174

167175
// They don't represent abstract characters, but still need to be transmitted
168176
[Fact]
177+
[ActiveIssue(846, PlatformID.AnyUnix)]
169178
public static void Specials()
170179
{
171180
// U+FFFF, U+FFFE, U+FFFD
@@ -180,6 +189,7 @@ public static void Specials()
180189
}
181190

182191
[Fact]
192+
[ActiveIssue(846, PlatformID.AnyUnix)]
183193
public static void Surrogates()
184194
{
185195
s_encodingUtil_UTF16BE.GetCharsTest(new Byte[] { 0xD8, 0x00, 0xDC, 0x00 }, 0, 4, -1, 0, "\uD800\uDC00", 2);
@@ -222,6 +232,7 @@ public static void Surrogates()
222232
}
223233

224234
[Fact]
235+
[ActiveIssue(846, PlatformID.AnyUnix)]
225236
public static void MaxCharCount()
226237
{
227238
s_encodingUtil_UTF16BE.GetMaxCharCountTest(0, 1);
@@ -233,6 +244,7 @@ public static void MaxCharCount()
233244
}
234245

235246
[Fact]
247+
[ActiveIssue(846, PlatformID.AnyUnix)]
236248
public static void MaxByteCount()
237249
{
238250
s_encodingUtil_UTF16BE.GetMaxByteCountTest(0, 2);
@@ -246,6 +258,7 @@ public static void MaxByteCount()
246258
}
247259

248260
[Fact]
261+
[ActiveIssue(846, PlatformID.AnyUnix)]
249262
public static void Preamble()
250263
{
251264
s_encodingUtil_UTF16BE.GetPreambleTest(new Byte[] { 0xFE, 0xFF });

src/System.Text.Encoding.Extensions/tests/4.0.10.0/Encoding/UTF16LE.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static class UTF16LE
1212
private static readonly EncodingTestHelper s_encodingUtil_UTF16LE = new EncodingTestHelper("UTF-16LE");
1313

1414
[Fact]
15+
[ActiveIssue(846, PlatformID.AnyUnix)]
1516
public static void GetByteCount_InvalidArgumentAndBoundaryValues()
1617
{
1718
s_encodingUtil_UTF16LE.GetByteCountTest(String.Empty, 0, 0, 0);
@@ -29,6 +30,7 @@ public static void GetByteCount_InvalidArgumentAndBoundaryValues()
2930
}
3031

3132
[Fact]
33+
[ActiveIssue(846, PlatformID.AnyUnix)]
3234
public static void GetCharCount_InvalidArgumentAndBoundaryValues()
3335
{
3436
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16LE.GetCharCountTest((Byte[])null, 0, 0, 0));
@@ -86,6 +88,7 @@ public static void GetCharCount_InvalidConversionInput()
8688
}
8789

8890
[Fact]
91+
[ActiveIssue(846, PlatformID.AnyUnix)]
8992
public static void GetChars_BufferBoundary()
9093
{
9194
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16LE.GetCharsTest(new Byte[] { 0x61, 0x00, 0x62, 0x00, 0x63, 0x00 }, 0, 6, -2, 0, String.Empty, 0));
@@ -103,6 +106,7 @@ public static void GetChars_BufferBoundary()
103106
}
104107

105108
[Fact]
109+
[ActiveIssue(846, PlatformID.AnyUnix)]
106110
public static void GetBytes_BufferBoundary()
107111
{
108112
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16LE.GetBytesTest("abc", 0, 3, -2, 0, (Byte[])null, 0));
@@ -120,6 +124,7 @@ public static void GetBytes_BufferBoundary()
120124
}
121125

122126
[Fact]
127+
[ActiveIssue(846, PlatformID.AnyUnix)]
123128
public static void GetChars_BufferBoundary_Pointer()
124129
{
125130
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16LE.GetCharsTest((Byte[])null, 0, 0, 0, String.Empty, 0));
@@ -135,6 +140,7 @@ public static void GetChars_BufferBoundary_Pointer()
135140
}
136141

137142
[Fact]
143+
[ActiveIssue(846, PlatformID.AnyUnix)]
138144
public static void GetBytes_BufferBoundary_Pointer()
139145
{
140146
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF16LE.GetBytesTest((String)null, 0, 0, 0, new Byte[] { }, 0));
@@ -150,12 +156,14 @@ public static void GetBytes_BufferBoundary_Pointer()
150156
}
151157

152158
[Fact]
159+
[ActiveIssue(846, PlatformID.AnyUnix)]
153160
public static void BasicValidInputs()
154161
{
155162
s_encodingUtil_UTF16LE.GetCharsTest(new Byte[] { 0x61, 0x00 }, 0, 2, -1, 0, "a", 1);
156163
}
157164

158165
[Fact]
166+
[ActiveIssue(846, PlatformID.AnyUnix)]
159167
public static void InvalidSequences()
160168
{
161169
s_encodingUtil_UTF16LE.GetCharsTest(new Byte[] { 0x61, 0x00, 0x00 }, 0, 3, -1, 0, "\u0061\uFFFD", 2);
@@ -166,6 +174,7 @@ public static void InvalidSequences()
166174

167175
// They don't represent abstract characters, but still need to be transmitted
168176
[Fact]
177+
[ActiveIssue(846, PlatformID.AnyUnix)]
169178
public static void Specials()
170179
{
171180
// U+FFFF, U+FFFE, U+FFF
@@ -180,6 +189,7 @@ public static void Specials()
180189
}
181190

182191
[Fact]
192+
[ActiveIssue(846, PlatformID.AnyUnix)]
183193
public static void Surrogates()
184194
{
185195
s_encodingUtil_UTF16LE.GetCharsTest(new Byte[] { 0x00, 0xD8, 0x00, 0xDC }, 0, 4, -1, 0, "\uD800\uDC00", 2);
@@ -212,6 +222,7 @@ public static void Surrogates()
212222
}
213223

214224
[Fact]
225+
[ActiveIssue(846, PlatformID.AnyUnix)]
215226
public static void MaxCharCount()
216227
{
217228
s_encodingUtil_UTF16LE.GetMaxCharCountTest(0, 1);
@@ -223,6 +234,7 @@ public static void MaxCharCount()
223234
}
224235

225236
[Fact]
237+
[ActiveIssue(846, PlatformID.AnyUnix)]
226238
public static void MaxByteCount()
227239
{
228240
s_encodingUtil_UTF16LE.GetMaxByteCountTest(0, 2);
@@ -236,6 +248,7 @@ public static void MaxByteCount()
236248
}
237249

238250
[Fact]
251+
[ActiveIssue(846, PlatformID.AnyUnix)]
239252
public static void Preamble()
240253
{
241254
s_encodingUtil_UTF16LE.GetPreambleTest(new Byte[] { 0xFF, 0xFE });

src/System.Text.Encoding.Extensions/tests/4.0.10.0/Encoding/UTF32BE.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static class UTF32BE
1212
private static readonly EncodingTestHelper s_encodingUtil_UTF32BE = new EncodingTestHelper("UTF-32BE");
1313

1414
[Fact]
15+
[ActiveIssue(846, PlatformID.AnyUnix)]
1516
public static void GetByteCount_InvalidArgumentAndBoundaryValues()
1617
{
1718
s_encodingUtil_UTF32BE.GetByteCountTest(String.Empty, 0, 0, 0);
@@ -29,6 +30,7 @@ public static void GetByteCount_InvalidArgumentAndBoundaryValues()
2930
}
3031

3132
[Fact]
33+
[ActiveIssue(846, PlatformID.AnyUnix)]
3234
public static void GetCharCount_InvalidArgumentAndBoundaryValues()
3335
{
3436
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF32BE.GetCharCountTest((Byte[])null, 0, 0, 0));
@@ -87,6 +89,7 @@ public static void GetChars_InvalidConversionInput()
8789
}
8890

8991
[Fact]
92+
[ActiveIssue(846, PlatformID.AnyUnix)]
9093
public static void GetChars_BufferBoundary()
9194
{
9295
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF32BE.GetCharsTest(new Byte[] { 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x62 }, 0, 8, -2, 0, String.Empty, 0));
@@ -104,6 +107,7 @@ public static void GetChars_BufferBoundary()
104107
}
105108

106109
[Fact]
110+
[ActiveIssue(846, PlatformID.AnyUnix)]
107111
public static void GetBytes_BufferBoundary()
108112
{
109113
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF32BE.GetBytesTest("abc", 0, 3, -2, 0, (Byte[])null, 0));
@@ -121,6 +125,7 @@ public static void GetBytes_BufferBoundary()
121125
}
122126

123127
[Fact]
128+
[ActiveIssue(846, PlatformID.AnyUnix)]
124129
public static void GetChars_BufferBoundary_Pointer()
125130
{
126131
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF32BE.GetCharsTest((Byte[])null, 0, 0, 0, String.Empty, 0));
@@ -136,6 +141,7 @@ public static void GetChars_BufferBoundary_Pointer()
136141
}
137142

138143
[Fact]
144+
[ActiveIssue(846, PlatformID.AnyUnix)]
139145
public static void GetBytes_BufferBoundary_Pointer()
140146
{
141147
Assert.Throws<ArgumentNullException>(() => s_encodingUtil_UTF32BE.GetBytesTest((String)null, 0, 0, 0, new Byte[] { }, 0));
@@ -151,13 +157,15 @@ public static void GetBytes_BufferBoundary_Pointer()
151157
}
152158

153159
[Fact]
160+
[ActiveIssue(846, PlatformID.AnyUnix)]
154161
public static void ValidCodePoints()
155162
{
156163
s_encodingUtil_UTF32BE.GetCharsTest(new Byte[] { 0x00, 0x00, 0x00, 0x61 }, 0, 4, -1, 0, "a", 1);
157164
s_encodingUtil_UTF32BE.GetBytesTest("abc", 0, 3, -1, 0, new Byte[] { 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x63 }, 12);
158165
}
159166

160167
[Fact]
168+
[ActiveIssue(846, PlatformID.AnyUnix)]
161169
public static void GetChars_InvalidSequence_OddNumberOfByte()
162170
{
163171
s_encodingUtil_UTF32BE.GetCharsTest(new Byte[] { 0x00, 0x61, 0x00 }, 0, 3, -1, 0, "\uFFFD", 1);
@@ -173,6 +181,7 @@ public static void GetChars_InvalidSequence_OddNumberOfByte()
173181

174182
// They don't represent abstract characters, but still need to be transmitted
175183
[Fact]
184+
[ActiveIssue(846, PlatformID.AnyUnix)]
176185
public static void Specials()
177186
{
178187
// U+FFFF, U+FFFE, U+FFFD
@@ -198,6 +207,7 @@ public static void Specials()
198207
/// DBFF + DFFF: 110110-1111-111111 110111-1111111111: U+000-10000-11111111-11111111
199208
/// </summary>
200209
[Fact]
210+
[ActiveIssue(846, PlatformID.AnyUnix)]
201211
public static void Surrogates()
202212
{
203213
s_encodingUtil_UTF32BE.GetBytesTest("\uD800\uDC00", 0, 2, -1, 0, new Byte[] { 0x00, 0x01, 0x00, 0x00 }, 4);
@@ -248,6 +258,7 @@ public static void Surrogates()
248258
}
249259

250260
[Fact]
261+
[ActiveIssue(846, PlatformID.AnyUnix)]
251262
public static void GetMaxCount()
252263
{
253264
s_encodingUtil_UTF32BE.GetMaxCharCountTest(0, 2);
@@ -269,6 +280,7 @@ public static void GetMaxCount()
269280
}
270281

271282
[Fact]
283+
[ActiveIssue(846, PlatformID.AnyUnix)]
272284
public static void GetPreamble()
273285
{
274286
s_encodingUtil_UTF32BE.GetPreambleTest(false, false, new Byte[] { });

0 commit comments

Comments
 (0)