@@ -409,6 +409,16 @@ public void TypeTesting(string expression, Type type)
409
409
[ TestCase ( "default(bool)" , TestOf = typeof ( bool ) , ExpectedResult = false , Category = "default values" ) ]
410
410
#endregion
411
411
412
+ #region typeof keyword
413
+ [ TestCase ( "typeof(int)" , ExpectedResult = typeof ( int ) , Category = "typeof keyword" ) ]
414
+ [ TestCase ( "typeof(float)" , ExpectedResult = typeof ( float ) , Category = "typeof keyword" ) ]
415
+ [ TestCase ( "typeof(string)" , ExpectedResult = typeof ( string ) , Category = "typeof keyword" ) ]
416
+ [ TestCase ( "typeof(Regex)" , ExpectedResult = typeof ( Regex ) , Category = "typeof keyword" ) ]
417
+ [ TestCase ( "typeof(string) == \" Hello\" .GetType()" , ExpectedResult = true , Category = "typeof keyword" ) ]
418
+ [ TestCase ( "typeof(int) == 12.GetType()" , ExpectedResult = true , Category = "typeof keyword" ) ]
419
+ [ TestCase ( "typeof(string) == 12.GetType()" , ExpectedResult = false , Category = "typeof keyword" ) ]
420
+ #endregion
421
+
412
422
#region Logical And Shift Operators
413
423
[ TestCase ( "2 & 8" , TestOf = typeof ( int ) , ExpectedResult = 0 , Category = "LogicalAndOperator" ) ]
414
424
[ TestCase ( "10 & 8" , TestOf = typeof ( int ) , ExpectedResult = 8 , Category = "LogicalAndOperator" ) ]
@@ -439,14 +449,14 @@ public void TypeTesting(string expression, Type type)
439
449
[ TestCase ( "Abs(-4) > 10 / 2 ? (true ? 6 : 3+2) : (false ? Abs(-18) : 100 / 2)" , ExpectedResult = 50 , Category = "Conditional Operator t ? x : y" ) ]
440
450
#endregion
441
451
442
- #region C# Keywords
443
- [ TestCase ( "typeof(int)" , ExpectedResult = typeof ( int ) , Category = "C# Keywords, typeof" ) ]
444
- [ TestCase ( "typeof(float)" , ExpectedResult = typeof ( float ) , Category = "C# Keywords, typeof" ) ]
445
- [ TestCase ( "typeof(string)" , ExpectedResult = typeof ( string ) , Category = "C# Keywords, typeof" ) ]
446
- [ TestCase ( "typeof(Regex)" , ExpectedResult = typeof ( Regex ) , Category = "C# Keywords, typeof" ) ]
447
- [ TestCase ( "typeof(string) == \" Hello\" .GetType()" , ExpectedResult = true , Category = "C# Keywords, typeof" ) ]
448
- [ TestCase ( "typeof(int) == 12.GetType()" , ExpectedResult = true , Category = "C# Keywords, typeof" ) ]
449
- [ TestCase ( "typeof(string) == 12.GetType()" , ExpectedResult = false , Category = "C# Keywords, typeof" ) ]
452
+ #region typeof
453
+ [ TestCase ( "typeof(int)" , ExpectedResult = typeof ( int ) , Category = "typeof" ) ]
454
+ [ TestCase ( "typeof(float)" , ExpectedResult = typeof ( float ) , Category = "typeof" ) ]
455
+ [ TestCase ( "typeof(string)" , ExpectedResult = typeof ( string ) , Category = "typeof" ) ]
456
+ [ TestCase ( "typeof(Regex)" , ExpectedResult = typeof ( Regex ) , Category = "typeof" ) ]
457
+ [ TestCase ( "typeof(string) == \" Hello\" .GetType()" , ExpectedResult = true , Category = "typeof" ) ]
458
+ [ TestCase ( "typeof(int) == 12.GetType()" , ExpectedResult = true , Category = "typeof" ) ]
459
+ [ TestCase ( "typeof(string) == 12.GetType()" , ExpectedResult = false , Category = "typeof" ) ]
450
460
#endregion
451
461
452
462
#region Math Constants
0 commit comments