You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix test failures: skip invalid index/count entries in TryGetAscii_Invalid and TryGetUnicode_Invalid, use Std3-compatible test data for TryGetAscii_WithFlags
Copy file name to clipboardExpand all lines: src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/IdnMapping/IdnMappingGetAsciiTests.cs
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -246,7 +246,7 @@ public void TryGetAscii_NullContaining_ThrowsArgumentException(string unicode)
yieldreturnnewobject[]{"\u0061\u0062\u0063",0,3,"\u0061\u0062\u0063"};// ASCII only code points
278
+
yieldreturnnewobject[]{"\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067",0,7,"xn--d9juau41awczczp"};// Non-ASCII only code points
279
+
yieldreturnnewobject[]{"\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0",0,9,"xn--de-jg4avhby1noc0d"};// ASCII and non-ASCII code points
280
+
yieldreturnnewobject[]{"\u0061\u0062\u0063.\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067.\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0",0,21,"abc.xn--d9juau41awczczp.xn--de-jg4avhby1noc0d"};// Fully qualified domain name
Copy file name to clipboardExpand all lines: src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/IdnMapping/IdnMappingGetUnicodeTests.cs
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -208,6 +208,19 @@ public void TryGetUnicode_Invalid(string ascii, int index, int count, Type excep
208
208
return;// TryGetUnicode takes ReadOnlySpan<char>, which can't be null
209
209
}
210
210
211
+
// Skip entries with invalid index/count (those test the GetUnicode(string, int, int) validation, not the span content validation)
0 commit comments