@@ -18,7 +18,7 @@ public class parseTest
1818
1919 // Invariant culture is commonly used for (de-)serialization and similar to en-US
2020 // Ukrainian (Ukraine) added to catch regressions (https://github.com/dotnet/runtime/issues/14545)
21- // Current cultue to get additional value out of glob/loc test runs
21+ // Current culture to get additional value out of glob/loc test runs
2222 public static IEnumerable < object [ ] > Cultures
2323 {
2424 get
@@ -66,11 +66,11 @@ public static void RunParseToStringTests(CultureInfo culture)
6666 //invalid number style
6767 // ******InvalidNumberStyles
6868 NumberStyles invalid = ( NumberStyles ) 0x7c00 ;
69- AssertExtensions . Throws < ArgumentException > ( null , ( ) =>
69+ AssertExtensions . Throws < ArgumentException > ( "style" , ( ) =>
7070 {
7171 BigInteger . Parse ( "1" , invalid ) . ToString ( "d" ) ;
7272 } ) ;
73- AssertExtensions . Throws < ArgumentException > ( null , ( ) =>
73+ AssertExtensions . Throws < ArgumentException > ( "style" , ( ) =>
7474 {
7575 BigInteger junk ;
7676 BigInteger . TryParse ( "1" , invalid , null , out junk ) ;
@@ -116,6 +116,16 @@ public void Parse_Hex32Bits()
116116
117117 Assert . True ( BigInteger . TryParse ( "080000001" , NumberStyles . HexNumber , null , out result ) ) ;
118118 Assert . Equal ( 0x80000001u , result ) ;
119+
120+ Assert . Throws < FormatException > ( ( ) =>
121+ {
122+ BigInteger . Parse ( "zzz" , NumberStyles . HexNumber ) ;
123+ } ) ;
124+
125+ AssertExtensions . Throws < ArgumentException > ( "style" , ( ) =>
126+ {
127+ BigInteger . Parse ( "1" , NumberStyles . AllowHexSpecifier | NumberStyles . AllowCurrencySymbol ) ;
128+ } ) ;
119129 }
120130
121131 private static void RunFormatProviderParseStrings ( )
0 commit comments