@@ -6331,42 +6331,42 @@ if (isSomeString!S ||
63316331 assertCTFEable! (
63326332 {
63336333 // Test the isNumeric(in string) function
6334- assert (isNumeric(" 1" ) == true );
6335- assert (isNumeric(" 1.0" ) == true );
6336- assert (isNumeric(" 1e-1" ) == true );
6337- assert (isNumeric(" 12345xxxx890" ) == false );
6338- assert (isNumeric(" 567L" ) == true );
6339- assert (isNumeric(" 23UL" ) == true );
6340- assert (isNumeric(" -123..56f" ) == false );
6341- assert (isNumeric(" 12.3.5.6" ) == false );
6342- assert (isNumeric(" 12.356" ) == false );
6343- assert (isNumeric(" 123 5.6" ) == false );
6344- assert (isNumeric(" 1233E-1+1.0e-1i" ) == true );
6345-
6346- assert (isNumeric(" 123.00E-5+1234.45E-12Li" ) == true );
6347- assert (isNumeric(" 123.00e-5+1234.45E-12iL" ) == false );
6348- assert (isNumeric(" 123.00e-5+1234.45e-12uL" ) == false );
6349- assert (isNumeric(" 123.00E-5+1234.45e-12lu" ) == false );
6350-
6351- assert (isNumeric(" 123fi" ) == true );
6352- assert (isNumeric(" 123li" ) == true );
6353- assert (isNumeric(" --123L" ) == false );
6354- assert (isNumeric(" +123.5UL" ) == false );
6355- assert (isNumeric(" 123f" ) == true );
6356- assert (isNumeric(" 123.u" ) == false );
6334+ assert (isNumeric(" 1" ));
6335+ assert (isNumeric(" 1.0" ));
6336+ assert (isNumeric(" 1e-1" ));
6337+ assert (! isNumeric(" 12345xxxx890" ));
6338+ assert (isNumeric(" 567L" ));
6339+ assert (isNumeric(" 23UL" ));
6340+ assert (! isNumeric(" -123..56f" ));
6341+ assert (! isNumeric(" 12.3.5.6" ));
6342+ assert (! isNumeric(" 12.356" ));
6343+ assert (! isNumeric(" 123 5.6" ));
6344+ assert (isNumeric(" 1233E-1+1.0e-1i" ));
6345+
6346+ assert (isNumeric(" 123.00E-5+1234.45E-12Li" ));
6347+ assert (! isNumeric(" 123.00e-5+1234.45E-12iL" ));
6348+ assert (! isNumeric(" 123.00e-5+1234.45e-12uL" ));
6349+ assert (! isNumeric(" 123.00E-5+1234.45e-12lu" ));
6350+
6351+ assert (isNumeric(" 123fi" ));
6352+ assert (isNumeric(" 123li" ));
6353+ assert (! isNumeric(" --123L" ));
6354+ assert (! isNumeric(" +123.5UL" ));
6355+ assert (isNumeric(" 123f" ));
6356+ assert (! isNumeric(" 123.u" ));
63576357
63586358 // @@@BUG@@ to!string(float) is not CTFEable.
63596359 // Related: formatValue(T) if (is(FloatingPointTypeOf!T))
63606360 if (! __ctfe)
63616361 {
6362- assert (isNumeric(to! string (real .nan)) == true );
6363- assert (isNumeric(to! string (- real .infinity)) == true );
6362+ assert (isNumeric(to! string (real .nan)));
6363+ assert (isNumeric(to! string (- real .infinity)));
63646364 }
63656365
63666366 string s = " $250.99-" ;
6367- assert (isNumeric(s[1 .. s.length - 2 ]) == true );
6368- assert (isNumeric(s) == false );
6369- assert (isNumeric(s[0 .. s.length - 1 ]) == false );
6367+ assert (isNumeric(s[1 .. $ - 2 ]));
6368+ assert (! isNumeric(s));
6369+ assert (! isNumeric(s[0 .. $ - 1 ]));
63706370 });
63716371
63726372 assert (! isNumeric(" -" ));
0 commit comments