diff --git a/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest1.cs b/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest1.cs index 5776214d..ce80ef06 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest1.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest1.cs @@ -14,307 +14,307 @@ public class UnitTestArithmeticTest1 [TestMethod] public void Arith_arith001_Test() { - OutputHelper.WriteLine("Section 7.4 "); - OutputHelper.WriteLine("This code tests basic literal integral arthimetic additive expressions."); + // Section 7.4 + // This code tests basic literal integral arthimetic additive expressions. Assert.IsTrue(Arith_TestClass_arith001.testMethod()); } [TestMethod] public void Arith_arith003_Test() { - OutputHelper.WriteLine("Section 7.4 "); - OutputHelper.WriteLine("This code tests basic literal integral arthimetic multiplicative expressions."); + // Section 7.4 + // This code tests basic literal integral arthimetic multiplicative expressions. Assert.IsTrue(Arith_TestClass_arith003.testMethod()); } [TestMethod] public void Arith_arith005_Test() { - OutputHelper.WriteLine("Section 7.4 "); - OutputHelper.WriteLine("This code tests basic integral arthimetic additive expressions using variables."); + // Section 7.4 + // This code tests basic integral arthimetic additive expressions using variables. Assert.IsTrue(Arith_TestClass_arith005.testMethod()); } [TestMethod] public void Arith_arith007_Test() { - OutputHelper.WriteLine("Section 7.4 "); - OutputHelper.WriteLine("This code tests basic integral arthimetic multiplicative expressions with variables."); + // Section 7.4 + // This code tests basic integral arthimetic multiplicative expressions with variables. Assert.IsTrue(Arith_TestClass_arith007.testMethod()); } [TestMethod] public void Arith_arith023_Test() { - OutputHelper.WriteLine("Section 7.4 "); - OutputHelper.WriteLine("This code tests enum additive expressions."); + // Section 7.4 + // This code tests enum additive expressions. Assert.IsTrue(Arith_TestClass_arith023.testMethod()); } [TestMethod] public void Arith_arith024_Test() { - OutputHelper.WriteLine("Section 7.4 "); - OutputHelper.WriteLine("This code tests enum additive expressions."); + // Section 7.4 + // This code tests enum additive expressions. Assert.IsTrue(Arith_TestClass_arith024.testMethod()); } [TestMethod] public void Arith_arith028_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith028.testMethod()); } [TestMethod] public void Arith_arith029_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith029.testMethod()); } [TestMethod] public void Arith_arith030_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith030.testMethod()); } [TestMethod] public void Arith_arith031_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith031.testMethod()); } [TestMethod] public void Arith_arith032_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith032.testMethod()); } [TestMethod] public void Arith_arith033_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith033.testMethod()); } [TestMethod] public void Arith_arith034_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith034.testMethod()); } [TestMethod] public void Arith_arith035_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith035.testMethod()); } [TestMethod] public void Arith_arith036_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith036.testMethod()); } [TestMethod] public void Arith_arith037_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith037.testMethod()); } [TestMethod] public void Arith_arith038_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith038.testMethod()); } [TestMethod] public void Arith_arith039_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith039.testMethod()); } [TestMethod] public void Arith_arith040_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith040.testMethod()); } [TestMethod] public void Arith_arith041_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith041.testMethod()); } [TestMethod] public void Arith_arith042_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith042.testMethod()); } [TestMethod] public void Arith_arith043_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith043.testMethod()); } [TestMethod] public void Arith_arith044_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith044.testMethod()); } [TestMethod] public void Arith_arith045_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith045.testMethod()); } [TestMethod] public void Arith_arith046_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith046.testMethod()); } [TestMethod] public void Arith_arith047_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith047.testMethod()); } [TestMethod] public void Arith_arith048_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith048.testMethod()); } [TestMethod] public void Arith_arith049_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith049.testMethod()); } [TestMethod] public void Arith_arith050_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith050.testMethod()); } [TestMethod] public void Arith_arith051_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith051.testMethod()); } [TestMethod] public void Arith_arith052_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith052.testMethod()); } [TestMethod] public void Arith_arith053_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith053.testMethod()); } [TestMethod] public void Arith_arith054_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith054.testMethod()); } [TestMethod] public void Arith_arith055_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith055.testMethod()); } [TestMethod] public void Arith_arith056_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith056.testMethod()); } [TestMethod] public void Arith_arith057_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith057.testMethod()); } [TestMethod] public void Arith_arith058_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith058.testMethod()); } [TestMethod] public void Arith_arith059_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith059.testMethod()); } [TestMethod] public void Arith_arith060_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith060.testMethod()); } [TestMethod] public void Arith_arith061_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith061.testMethod()); } [TestMethod] public void Arith_arith062_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith062.testMethod()); } [TestMethod] public void Arith_arith064_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith064.testMethod()); } [TestMethod] public void Arith_arith065_Test() { - OutputHelper.WriteLine("Section 7.7"); + // Section 7.7 Assert.IsTrue(Arith_TestClass_arith065.testMethod()); } @@ -328,25 +328,25 @@ public static int Main_old() if (5 != (3 + 2)) { intRet = 1; - OutputHelper.WriteLine("Failure at Scenario 1"); + // Failure at Scenario 1 } //Scenario 2: type int if (4 != (9 - 5)) { - OutputHelper.WriteLine("Failure at Scenario 2"); + // Failure at Scenario 2 intRet = 1; } //Scenario 7: type long if (1047L != (999L + 48L)) { - OutputHelper.WriteLine("Failure at Scenario 7"); + // Failure at Scenario 7 intRet = 1; } //Scenario 8: type long if (441L != (786L - 345L)) { - OutputHelper.WriteLine("Failure at Scenario 8"); + // Failure at Scenario 8 intRet = 1; } return intRet; @@ -364,38 +364,38 @@ public static int Main_old() //Scenario 1: type int if (12 != (4 * 3)) { - OutputHelper.WriteLine("Failure at Scenario 1"); + // Failure at Scenario 1 intRet = 1; } //Scenario 2: type int if (4 != (8 / 2)) { - OutputHelper.WriteLine("Failure at Scenario 2"); + // Failure at Scenario 2 intRet = 1; } //Scenario 3; type int if (14 != (64 % 25)) { - OutputHelper.WriteLine("Failure at Scenario 3"); + // Failure at Scenario 3 intRet = 1; } //Scenario 10: type long if (361362L != (458L * 789L)) { - OutputHelper.WriteLine("Failure at Scenario 10"); + // Failure at Scenario 10 intRet = 1; } //Scenario 11: type long if (36L != (32004L / 889L)) { - OutputHelper.WriteLine("Failure at Scenario 11"); + // Failure at Scenario 11 intRet = 1; } //Scenario 12: type long if (29L != (985013L % 56L)) { - OutputHelper.WriteLine("Failure at Scenario 12"); + // Failure at Scenario 12 intRet = 1; } return intRet; @@ -429,7 +429,7 @@ public static int Main_old() i3 = 5; if (i1 != (i2 + i3)) { - OutputHelper.WriteLine("Failure at Scenario 1"); + // Failure at Scenario 1 intRet = 1; } //Scenario 2: type int @@ -438,7 +438,7 @@ public static int Main_old() i3 = 3; if (i1 != (i2 - i3)) { - OutputHelper.WriteLine("Failure at Scenario 2"); + // Failure at Scenario 2 intRet = 1; } //Scenario 3: type byte @@ -447,7 +447,7 @@ public static int Main_old() b3 = 2; if (b1 != (b2 + b3)) { - OutputHelper.WriteLine("Failure at Scenario 3"); + // Failure at Scenario 3 intRet = 1; } //Scenario 4: type byte @@ -456,7 +456,7 @@ public static int Main_old() b3 = 39; if (b1 != (b2 - b3)) { - OutputHelper.WriteLine("Failure at Scenario 4"); + // Failure at Scenario 4 intRet = 1; } //Scenario 5: type short @@ -465,7 +465,7 @@ public static int Main_old() s3 = 22; if (s1 != (s2 + s3)) { - OutputHelper.WriteLine("Failure at Scenario 5"); + // Failure at Scenario 5 intRet = 1; } //Scenario 6: type short @@ -474,7 +474,7 @@ public static int Main_old() s3 = 14; if (s1 != (s2 - s3)) { - OutputHelper.WriteLine("Failure at Scenario 6"); + // Failure at Scenario 6 intRet = 1; } //Scenario 7: type long @@ -483,7 +483,7 @@ public static int Main_old() l3 = 855L; if (l1 != (l2 + l3)) { - OutputHelper.WriteLine("Failure at Scenario 7"); + // Failure at Scenario 7 intRet = 1; } //Scenario 8: type long @@ -492,7 +492,7 @@ public static int Main_old() l3 = 136920L; if (l1 != (l2 - l3)) { - OutputHelper.WriteLine("Failure at Scenario 8"); + // Failure at Scenario 8 intRet = 1; } return intRet; @@ -526,7 +526,7 @@ public static int Main_old() i3 = 6; if (i1 != (i2 * i3)) { - OutputHelper.WriteLine("Failure at Scenario 1"); + // Failure at Scenario 1 intRet = 1; } //Scenario 2: type int @@ -535,7 +535,7 @@ public static int Main_old() i3 = 14; if (i1 != (i2 / i3)) { - OutputHelper.WriteLine("Failure at Scenario 2"); + // Failure at Scenario 2 intRet = 1; } //Scenario 3; type int @@ -544,7 +544,7 @@ public static int Main_old() i3 = 31; if (i1 != (i2 % i3)) { - OutputHelper.WriteLine("Failure at Scenario 3"); + // Failure at Scenario 3 intRet = 1; } //Scenario 4: type byte @@ -553,7 +553,7 @@ public static int Main_old() b3 = 47; if (b1 != (b2 * b3)) { - OutputHelper.WriteLine("Failure at Scenario 4"); + // Failure at Scenario 4 intRet = 1; } //Scenario 5: type byte @@ -562,7 +562,7 @@ public static int Main_old() b3 = 6; if (b1 != (b2 / b3)) { - OutputHelper.WriteLine("Failure at Scenario 5"); + // Failure at Scenario 5 intRet = 1; } //Scenario 6: type byte @@ -571,7 +571,7 @@ public static int Main_old() b3 = 86; if (b1 != (b2 % b3)) { - OutputHelper.WriteLine("Failure at Scenario 6"); + // Failure at Scenario 6 intRet = 1; } //Scenario 7: type short @@ -580,7 +580,7 @@ public static int Main_old() s3 = 35; if (s1 != (s2 * s3)) { - OutputHelper.WriteLine("Failure at Scenario 7"); + // Failure at Scenario 7 intRet = 1; } //Scenario 8: type short @@ -589,7 +589,7 @@ public static int Main_old() s3 = 26; if (s1 != (s2 / s3)) { - OutputHelper.WriteLine("Failure at Scenario 8"); + // Failure at Scenario 8 intRet = 1; } //Scenario 9: type short @@ -598,7 +598,7 @@ public static int Main_old() s3 = 90; if (s1 != (s2 % s3)) { - OutputHelper.WriteLine("Failure at Scenario 9"); + // Failure at Scenario 9 intRet = 1; } //Scenario 10: type long @@ -607,7 +607,7 @@ public static int Main_old() l3 = 98L; if (l1 != (l2 * l3)) { - OutputHelper.WriteLine("Failure at Scenario 10"); + // Failure at Scenario 10 intRet = 1; } //Scenario 11: type long @@ -616,7 +616,7 @@ public static int Main_old() l3 = 7L; if (l1 != (l2 / l3)) { - OutputHelper.WriteLine("Failure at Scenario 11"); + // Failure at Scenario 11 intRet = 1; } //Scenario 12: type long @@ -625,7 +625,7 @@ public static int Main_old() l3 = 458L; if (l1 != (l2 % l3)) { - OutputHelper.WriteLine("Failure at Scenario 12"); + // Failure at Scenario 12 intRet = 1; } return intRet; diff --git a/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest2.cs b/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest2.cs index f2c39ef5..4378a870 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest2.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestArithmeticTest2.cs @@ -39,699 +39,699 @@ public void Arith_opt004_Test() [TestMethod] public void Arith_mult0001_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0001.testMethod()); } [TestMethod] public void Arith_mult0002_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0002.testMethod()); } [TestMethod] public void Arith_mult0003_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0003.testMethod()); } [TestMethod] public void Arith_mult0004_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0004.testMethod()); } [TestMethod] public void Arith_mult0008_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0008.testMethod()); } [TestMethod] public void Arith_mult0009_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0009.testMethod()); } [TestMethod] public void Arith_mult0010_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0010.testMethod()); } [TestMethod] public void Arith_mult0011_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0011.testMethod()); } [TestMethod] public void Arith_mult0015_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0015.testMethod()); } [TestMethod] public void Arith_mult0016_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0016.testMethod()); } [TestMethod] public void Arith_mult0017_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0017.testMethod()); } [TestMethod] public void Arith_mult0018_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0018.testMethod()); } [TestMethod] public void Arith_mult0022_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0022.testMethod()); } [TestMethod] public void Arith_mult0023_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0023.testMethod()); } [TestMethod] public void Arith_mult0024_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0024.testMethod()); } [TestMethod] public void Arith_mult0025_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0025.testMethod()); } [TestMethod] public void Arith_mult0050_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0050.testMethod()); } [TestMethod] public void Arith_mult0051_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0051.testMethod()); } [TestMethod] public void Arith_mult0052_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0052.testMethod()); } [TestMethod] public void Arith_mult0053_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0053.testMethod()); } [TestMethod] public void Arith_mult0057_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0057.testMethod()); } [TestMethod] public void Arith_mult0058_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0058.testMethod()); } [TestMethod] public void Arith_mult0059_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0059.testMethod()); } [TestMethod] public void Arith_mult0060_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0060.testMethod()); } [TestMethod] public void Arith_mult0064_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0064.testMethod()); } [TestMethod] public void Arith_mult0065_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0065.testMethod()); } [TestMethod] public void Arith_mult0066_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0066.testMethod()); } [TestMethod] public void Arith_mult0067_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0067.testMethod()); } [TestMethod] public void Arith_mult0071_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0071.testMethod()); } [TestMethod] public void Arith_mult0072_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0072.testMethod()); } [TestMethod] public void Arith_mult0073_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0073.testMethod()); } [TestMethod] public void Arith_mult0074_Test() { - OutputHelper.WriteLine("Section 7.7.1"); + // Section 7.7.1 Assert.IsTrue(Arith_TestClass_mult0074.testMethod()); } [TestMethod] public void Arith_div0001_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0001.testMethod()); } [TestMethod] public void Arith_div0002_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0002.testMethod()); } [TestMethod] public void Arith_div0008_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0008.testMethod()); } [TestMethod] public void Arith_div0009_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0009.testMethod()); } [TestMethod] public void Arith_div0015_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0015.testMethod()); } [TestMethod] public void Arith_div0016_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0016.testMethod()); } [TestMethod] public void Arith_div0022_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0022.testMethod()); } [TestMethod] public void Arith_div0023_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0023.testMethod()); } [TestMethod] public void Arith_div0050_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0050.testMethod()); } [TestMethod] public void Arith_div0051_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0051.testMethod()); } [TestMethod] public void Arith_div0057_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0057.testMethod()); } [TestMethod] public void Arith_div0058_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0058.testMethod()); } [TestMethod] public void Arith_div0064_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0064.testMethod()); } [TestMethod] public void Arith_div0065_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0065.testMethod()); } [TestMethod] public void Arith_div0071_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0071.testMethod()); } [TestMethod] public void Arith_div0072_Test() { - OutputHelper.WriteLine("Section 7.7.2"); + // Section 7.7.2 Assert.IsTrue(Arith_TestClass_div0072.testMethod()); } [TestMethod] public void Arith_rem0001_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0001.testMethod()); } [TestMethod] public void Arith_rem0002_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0002.testMethod()); } [TestMethod] public void Arith_rem0008_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0008.testMethod()); } [TestMethod] public void Arith_rem0009_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0009.testMethod()); } [TestMethod] public void Arith_rem0015_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0015.testMethod()); } [TestMethod] public void Arith_rem0016_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0016.testMethod()); } [TestMethod] public void Arith_rem0022_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0022.testMethod()); } [TestMethod] public void Arith_rem0023_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0023.testMethod()); } [TestMethod] public void Arith_rem0050_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0050.testMethod()); } [TestMethod] public void Arith_rem0051_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0051.testMethod()); } [TestMethod] public void Arith_rem0057_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0057.testMethod()); } [TestMethod] public void Arith_rem0058_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0058.testMethod()); } [TestMethod] public void Arith_rem0064_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0064.testMethod()); } [TestMethod] public void Arith_rem0065_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0065.testMethod()); } [TestMethod] public void Arith_rem0071_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0071.testMethod()); } [TestMethod] public void Arith_rem0072_Test() { - OutputHelper.WriteLine("Section 7.7.3"); + // Section 7.7.3 Assert.IsTrue(Arith_TestClass_rem0072.testMethod()); } [TestMethod] public void Arith_add0001_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0001.testMethod()); } [TestMethod] public void Arith_add0002_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0002.testMethod()); } [TestMethod] public void Arith_add0003_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0003.testMethod()); } [TestMethod] public void Arith_add0007_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0007.testMethod()); } [TestMethod] public void Arith_add0008_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0008.testMethod()); } [TestMethod] public void Arith_add0009_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0009.testMethod()); } [TestMethod] public void Arith_add0013_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0013.testMethod()); } [TestMethod] public void Arith_add0014_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0014.testMethod()); } [TestMethod] public void Arith_add0015_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0015.testMethod()); } [TestMethod] public void Arith_add0037_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0037.testMethod()); } [TestMethod] public void Arith_add0038_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0038.testMethod()); } [TestMethod] public void Arith_add0039_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0039.testMethod()); } [TestMethod] public void Arith_add0043_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0043.testMethod()); } [TestMethod] public void Arith_add0044_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0044.testMethod()); } [TestMethod] public void Arith_add0045_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0045.testMethod()); } [TestMethod] public void Arith_add0049_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0049.testMethod()); } [TestMethod] public void Arith_add0050_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0050.testMethod()); } [TestMethod] public void Arith_add0051_Test() { - OutputHelper.WriteLine("Section 7.7.4"); + // Section 7.7.4 Assert.IsTrue(Arith_TestClass_add0051.testMethod()); } [TestMethod] public void Arith_sub0001_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0001.testMethod()); } [TestMethod] public void Arith_sub0002_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0002.testMethod()); } [TestMethod] public void Arith_sub0003_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0003.testMethod()); } [TestMethod] public void Arith_sub0007_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0007.testMethod()); } [TestMethod] public void Arith_sub0008_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0008.testMethod()); } [TestMethod] public void Arith_sub0009_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0009.testMethod()); } [TestMethod] public void Arith_sub0013_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0013.testMethod()); } [TestMethod] public void Arith_sub0014_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0014.testMethod()); } [TestMethod] public void Arith_sub0015_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0015.testMethod()); } [TestMethod] public void Arith_sub0037_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0037.testMethod()); } [TestMethod] public void Arith_sub0038_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0038.testMethod()); } [TestMethod] public void Arith_sub0039_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0039.testMethod()); } [TestMethod] public void Arith_sub0043_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0043.testMethod()); } [TestMethod] public void Arith_sub0044_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0044.testMethod()); } [TestMethod] public void Arith_sub0045_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0045.testMethod()); } [TestMethod] public void Arith_sub0049_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0049.testMethod()); } [TestMethod] public void Arith_sub0050_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0050.testMethod()); } [TestMethod] public void Arith_sub0051_Test() { - OutputHelper.WriteLine("Section 7.7.5"); + // Section 7.7.5 Assert.IsTrue(Arith_TestClass_sub0051.testMethod()); } diff --git a/Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs b/Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs index caf2ac18..ef83372f 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestExpressionTests.cs @@ -16,394 +16,394 @@ class UnitTestExpressionTests [TestMethod] public void Exp_ident001_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within a block, and the block contains a local variable or parameter with the "); - OutputHelper.WriteLine("given name, then the primary-expression refers to that local variable."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within a block, and the block contains a local variable or parameter with the + // given name, then the primary-expression refers to that local variable. Assert.IsTrue(ident001.testMethod()); } [TestMethod] public void Exp_ident002_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within a block, and the block contains a local variable or parameter with the "); - OutputHelper.WriteLine("given name, then the primary-expression refers to that local variable."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within a block, and the block contains a local variable or parameter with the + // given name, then the primary-expression refers to that local variable. Assert.IsTrue(ident002.testMethod()); } [TestMethod] public void Exp_ident003_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within a block, and the block contains a local variable or parameter with the "); - OutputHelper.WriteLine("given name, then the primary-expression refers to that local variable."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within a block, and the block contains a local variable or parameter with the + // given name, then the primary-expression refers to that local variable. Assert.IsTrue(ident003.testMethod()); } [TestMethod] public void Exp_ident004_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within a block, and the block contains a local variable or parameter with the "); - OutputHelper.WriteLine("given name, then the primary-expression refers to that local variable."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within a block, and the block contains a local variable or parameter with the + // given name, then the primary-expression refers to that local variable. Assert.IsTrue(ident004.testMethod()); } [TestMethod] public void Exp_ident007_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); - OutputHelper.WriteLine("and the name identifies one or more accessible methods of the immediately enclosing"); - OutputHelper.WriteLine("class, then the primary expression refers to that method."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within the block of a constructor, instance method, or instance property accessor, + // and the name identifies one or more accessible methods of the immediately enclosing + // class, then the primary expression refers to that method. Assert.IsTrue(ident007.testMethod()); } [TestMethod] public void Exp_ident008_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); - OutputHelper.WriteLine("and the name identifies one or more accessible methods of the immediately enclosing"); - OutputHelper.WriteLine("class, then the primary expression refers to that method."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within the block of a constructor, instance method, or instance property accessor, + // and the name identifies one or more accessible methods of the immediately enclosing + // class, then the primary expression refers to that method. Assert.IsTrue(ident008.testMethod()); } [TestMethod] public void Exp_ident009_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); - OutputHelper.WriteLine("and the name identifies one or more accessible methods of the immediately enclosing"); - OutputHelper.WriteLine("class, then the primary expression refers to that method."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within the block of a constructor, instance method, or instance property accessor, + // and the name identifies one or more accessible methods of the immediately enclosing + // class, then the primary expression refers to that method. Assert.IsTrue(ident009.testMethod()); } [TestMethod] public void Exp_ident010_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); - OutputHelper.WriteLine("and the name identifies one or more accessible methods of the immediately enclosing"); - OutputHelper.WriteLine("class, then the primary expression refers to that method."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within the block of a constructor, instance method, or instance property accessor, + // and the name identifies one or more accessible methods of the immediately enclosing + // class, then the primary expression refers to that method. Assert.IsTrue(ident010.testMethod()); } [TestMethod] public void Exp_ident011_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); - OutputHelper.WriteLine("and the name identifies an accessible, non-static field or property of the immediately"); - OutputHelper.WriteLine("enclosing class, then the primary expression refers to that field or property."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within the block of a constructor, instance method, or instance property accessor, + // and the name identifies an accessible, non-static field or property of the immediately + // enclosing class, then the primary expression refers to that field or property. Assert.IsTrue(ident011.testMethod()); } [TestMethod] public void Exp_ident012_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); - OutputHelper.WriteLine("and the name identifies an accessible, non-static field or property of the immediately"); - OutputHelper.WriteLine("enclosing class, then the primary expression refers to that field or property."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within the block of a constructor, instance method, or instance property accessor, + // and the name identifies an accessible, non-static field or property of the immediately + // enclosing class, then the primary expression refers to that field or property. Assert.IsTrue(ident012.testMethod()); } [TestMethod] public void Exp_ident013_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of a single identifier "); - OutputHelper.WriteLine("is within the block of a constructor, instance method, or instance property accessor,"); - OutputHelper.WriteLine("and the name identifies an accessible, non-static field or property of the immediately"); - OutputHelper.WriteLine("enclosing class, then the primary expression refers to that field or property."); + // Section 7.2.2 + // This code tests that if the primary expression consisting of a single identifier + // is within the block of a constructor, instance method, or instance property accessor, + // and the name identifies an accessible, non-static field or property of the immediately + // enclosing class, then the primary expression refers to that field or property. Assert.IsTrue(ident013.testMethod()); } [TestMethod] public void Exp_ident014_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident014.testMethod()); } [TestMethod] public void Exp_ident015_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident015.testMethod()); } [TestMethod] public void Exp_ident016_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident016.testMethod()); } [TestMethod] public void Exp_ident017_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident017.testMethod()); } [TestMethod] public void Exp_ident018_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident018.testMethod()); } [TestMethod] public void Exp_ident019_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident019_Top.ident019.testMethod()); } [TestMethod] public void Exp_ident020_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident020_Top.ident020.testMethod()); } [TestMethod] public void Exp_ident021_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident021_Top.ident021.testMethod()); } [TestMethod] public void Exp_ident022_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident022_Top.ident022.testMethod()); } [TestMethod] public void Exp_ident023_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident023_Top.ident023.testMethod()); } [TestMethod] public void Exp_ident024_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident024_Top.ident024.testMethod()); } [TestMethod] public void Exp_ident025_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident025_Top.ident025_Next.ident025.testMethod()); } [TestMethod] public void Exp_ident026_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident026_Top.ident026_Next.ident026.testMethod()); } [TestMethod] public void Exp_ident027_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident027_Top.ident027_Next.ident027.testMethod()); } [TestMethod] public void Exp_ident028_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if the primary expression appears within the body of a class, "); - OutputHelper.WriteLine("struct, or enumeration declaration, and continuing with each enclosing class or struct"); - OutputHelper.WriteLine("declaration, if the name identifies one or more accessible members of that class, "); - OutputHelper.WriteLine("struct, or enumeration, then the primary expression is evaluated exactly as if it was "); - OutputHelper.WriteLine("a member access of the form T.E where T is the type in which the member was found and "); - OutputHelper.WriteLine("E is the primary expression."); + // Section 7.2.2 + // This code tests that if the primary expression appears within the body of a class, + // struct, or enumeration declaration, and continuing with each enclosing class or struct + // declaration, if the name identifies one or more accessible members of that class, + // struct, or enumeration, then the primary expression is evaluated exactly as if it was + // a member access of the form T.E where T is the type in which the member was found and + // E is the primary expression. Assert.IsTrue(ident028_Top.ident028_Next.ident028.testMethod()); } [TestMethod] public void Exp_ident029_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to a member in an enclosing namespace, then the primary expression is evaluated "); - OutputHelper.WriteLine("to that member and classified as a namespace or a type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to a member in an enclosing namespace, then the primary expression is evaluated + // to that member and classified as a namespace or a type. Assert.IsTrue(ident029.testMethod()); } [TestMethod] public void Exp_ident030_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to a member in an enclosing namespace, then the primary expression is evaluated "); - OutputHelper.WriteLine("to that member and classified as a namespace or a type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to a member in an enclosing namespace, then the primary expression is evaluated + // to that member and classified as a namespace or a type. Assert.IsTrue(ident030.testMethod()); } [TestMethod] public void Exp_ident031_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to a member in an enclosing namespace, then the primary expression is evaluated "); - OutputHelper.WriteLine("to that member and classified as a namespace or a type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to a member in an enclosing namespace, then the primary expression is evaluated + // to that member and classified as a namespace or a type. Assert.IsTrue(NS_ident031_I.ident031.testMethod()) ; } [TestMethod] public void Exp_ident032_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to an imported type, then the primary expression refers to that type. Assert.IsTrue(NS_ident032_I.ident032.testMethod()) ; } [TestMethod] public void Exp_ident033_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to an imported type, then the primary expression refers to that type. Assert.IsTrue(NS_ident033_O.NS_ident033_I.ident033.testMethod()) ; } [TestMethod] public void Exp_ident034_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to a single type in an imported namespace, then the primary expression refers to that "); - OutputHelper.WriteLine("type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to a single type in an imported namespace, then the primary expression refers to that + // type. Assert.IsTrue(NS_ident034_I.ident034.testMethod()) ; } [TestMethod] public void Exp_ident035_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to a single type in an imported namespace, then the primary expression refers to that "); - OutputHelper.WriteLine("type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to a single type in an imported namespace, then the primary expression refers to that + // type. Assert.IsTrue(NS_ident035_O.NS_ident035_I.ident035.testMethod()) ; } [TestMethod] public void Exp_ident038_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to an imported type, then the primary expression refers to that type. Assert.IsTrue(NS_ident038_I.ident038.testMethod()) ; } [TestMethod] public void Exp_ident039_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to an imported type, then the primary expression refers to that type. Assert.IsTrue(NS_ident039_O.NS_ident039_I.ident039.testMethod()) ; } [TestMethod] public void Exp_ident040_Test() { - OutputHelper.WriteLine("Section 7.2.2 "); - OutputHelper.WriteLine("This code tests that if a primary expression consisting of a single identifier refers "); - OutputHelper.WriteLine("to an imported type, then the primary expression refers to that type."); + // Section 7.2.2 + // This code tests that if a primary expression consisting of a single identifier refers + // to an imported type, then the primary expression refers to that type. Assert.IsTrue(NS_ident040_I.ident040.testMethod()) ; } [TestMethod] public void Exp_mem001_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a namespace and I is the name of an accessible member of that namespace, then the "); - OutputHelper.WriteLine("result is the member, either a namespace or a type."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a namespace and I is the name of an accessible member of that namespace, then the + // result is the member, either a namespace or a type. Assert.IsTrue(mem001.testMethod()) ; } /* [TestMethod] public void Exp_mem002_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a namespace and I is the name of an accessible member of that namespace, then the "); - OutputHelper.WriteLine("result is the member, either a namespace or a type."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a namespace and I is the name of an accessible member of that namespace, then the + // result is the member, either a namespace or a type. Assert.IsTrue(mem002.testMethod()) { return MFTestResults.Pass; @@ -414,563 +414,563 @@ public void Exp_mem002_Test() [TestMethod] public void Exp_mem003_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is also a type, then the result of the member is that type."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is also a type, then the result of the member is that type. Assert.IsTrue(mem003.testMethod()) ; } [TestMethod] public void Exp_mem004_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is also a type, then the result of the member is that type."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is also a type, then the result of the member is that type. Assert.IsTrue(mem004.testMethod()) ; } [TestMethod] public void Exp_mem005_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I identifies one or more methods, then the result is a method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I identifies one or more methods, then the result is a method group. Assert.IsTrue(mem005.testMethod()); } [TestMethod] public void Exp_mem006_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I identifies one or more methods, then the result is a method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I identifies one or more methods, then the result is a method group. Assert.IsTrue(mem006.testMethod()); } [TestMethod] public void Exp_mem007_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I identifies one or more methods, then the result is a method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I identifies one or more methods, then the result is a method group. Assert.IsTrue(mem007.testMethod()); } [TestMethod] public void Exp_mem008_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I identifies one or more methods, then the result is a method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I identifies one or more methods, then the result is a method group. Assert.IsTrue(mem008.testMethod()); } [TestMethod] public void Exp_mem011_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is a static property, then the result is that static property."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is a static property, then the result is that static property. Assert.IsTrue(mem011.testMethod()); } [TestMethod] public void Exp_mem012_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is a static property, then the result is that static property."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is a static property, then the result is that static property. Assert.IsTrue(mem012.testMethod()); } [TestMethod] public void Exp_mem013_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is a static read only field, then the result is a value of the "); - OutputHelper.WriteLine("static field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is a static read only field, then the result is a value of the + // static field I. Assert.IsTrue(mem013.testMethod()); } [TestMethod] public void Exp_mem014_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is a static read only field, then the result is a value of the "); - OutputHelper.WriteLine("static field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is a static read only field, then the result is a value of the + // static field I. Assert.IsTrue(mem014.testMethod()); } [TestMethod] public void Exp_mem015_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is a static field, then the result is the static field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is a static field, then the result is the static field I. Assert.IsTrue(mem015.testMethod()); } [TestMethod] public void Exp_mem016_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is a static field, then the result is the static field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is a static field, then the result is the static field I. Assert.IsTrue(mem016.testMethod()); } [TestMethod] public void Exp_mem017_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is a constant, then the result is the value of that constant."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is a constant, then the result is the value of that constant. Assert.IsTrue(mem017.testMethod()); } [TestMethod] public void Exp_mem018_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I is a constant, then the result is the value of that constant."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I is a constant, then the result is the value of that constant. Assert.IsTrue(mem018.testMethod()); } [TestMethod] public void Exp_mem019_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a type and I identifies an enumeration member, then the result is the value of"); - OutputHelper.WriteLine("that enumeration member."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a type and I identifies an enumeration member, then the result is the value of + // that enumeration member. Assert.IsTrue(mem019.testMethod()); } [TestMethod] public void Exp_mem021_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); - OutputHelper.WriteLine("more method groups, then the result is the method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies one or + // more method groups, then the result is the method group. Assert.IsTrue(mem021.testMethod()); } [TestMethod] public void Exp_mem022_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); - OutputHelper.WriteLine("more method groups, then the result is the method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies one or + // more method groups, then the result is the method group. Assert.IsTrue(mem022.testMethod()); } [TestMethod] public void Exp_mem023_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); - OutputHelper.WriteLine("more method groups, then the result is the method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies one or + // more method groups, then the result is the method group. Assert.IsTrue(mem023.testMethod()); } [TestMethod] public void Exp_mem025_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); - OutputHelper.WriteLine("more method groups, then the result is the method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies one or + // more method groups, then the result is the method group. Assert.IsTrue(mem025.testMethod()); } [TestMethod] public void Exp_mem026_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies one or "); - OutputHelper.WriteLine("more method groups, then the result is the method group."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies one or + // more method groups, then the result is the method group. Assert.IsTrue(mem026.testMethod()); } [TestMethod] public void Exp_mem027_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); - OutputHelper.WriteLine("instance property, then the result is that instance property."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies an + // instance property, then the result is that instance property. Assert.IsTrue(mem027.testMethod()); } [TestMethod] public void Exp_mem028_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); - OutputHelper.WriteLine("instance property, then the result is that instance property."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies an + // instance property, then the result is that instance property. Assert.IsTrue(mem028.testMethod()); } [TestMethod] public void Exp_mem029_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); - OutputHelper.WriteLine("instance property, then the result is that instance property."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies an + // instance property, then the result is that instance property. Assert.IsTrue(mem029.testMethod()); } [TestMethod] public void Exp_mem031_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); - OutputHelper.WriteLine("instance property, then the result is that instance property."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies an + // instance property, then the result is that instance property. Assert.IsTrue(mem031.testMethod()); } [TestMethod] public void Exp_mem032_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the type of which is T, and I identifies an "); - OutputHelper.WriteLine("instance property, then the result is that instance property."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the type of which is T, and I identifies an + // instance property, then the result is that instance property. Assert.IsTrue(mem032.testMethod()); } [TestMethod] public void Exp_mem034_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field, then if the value of E is null, a System.Exception is "); - OutputHelper.WriteLine("thrown."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // an instance field, then if the value of E is null, a System.Exception is + // thrown. Assert.IsTrue(mem034.testMethod()); } [TestMethod] public void Exp_mem035_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field, then if the value of E is null, a System.Exception is "); - OutputHelper.WriteLine("thrown."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // an instance field, then if the value of E is null, a System.Exception is + // thrown. Assert.IsTrue(mem035.testMethod()); } [TestMethod] public void Exp_mem036_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); - OutputHelper.WriteLine("of the field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // a read only instance field outside the class declaration, then the result is a value + // of the field I. Assert.IsTrue(mem036.testMethod()); } [TestMethod] public void Exp_mem038_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); - OutputHelper.WriteLine("of the field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // a read only instance field outside the class declaration, then the result is a value + // of the field I. Assert.IsTrue(mem038.testMethod()); } [TestMethod] public void Exp_mem040_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); - OutputHelper.WriteLine("of the field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // a read only instance field outside the class declaration, then the result is a value + // of the field I. Assert.IsTrue(mem040.testMethod()); } [TestMethod] public void Exp_mem042_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem042.testMethod()); } [TestMethod] public void Exp_mem043_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem043.testMethod()); } [TestMethod] public void Exp_mem044_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem044.testMethod()); } [TestMethod] public void Exp_mem045_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem045.testMethod()); } [TestMethod] public void Exp_mem046_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem046.testMethod()); } [TestMethod] public void Exp_mem047_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the class type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the class type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem047.testMethod()); } [TestMethod] public void Exp_mem048_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); - OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); - OutputHelper.WriteLine("of the field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the struct type of which is T, and I identifies + // a read only instance field outside the class declaration, then the result is a value + // of the field I. Assert.IsTrue(mem048.testMethod()); } [TestMethod] public void Exp_mem050_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); - OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); - OutputHelper.WriteLine("of the field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the struct type of which is T, and I identifies + // a read only instance field outside the class declaration, then the result is a value + // of the field I. Assert.IsTrue(mem050.testMethod()); } [TestMethod] public void Exp_mem052_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests that if the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); - OutputHelper.WriteLine("a read only instance field outside the class declaration, then the result is a value"); - OutputHelper.WriteLine("of the field I."); + // Section 7.2.7 + // This code tests that if the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the struct type of which is T, and I identifies + // a read only instance field outside the class declaration, then the result is a value + // of the field I. Assert.IsTrue(mem052.testMethod()); } [TestMethod] public void Exp_mem054_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the struct type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem054.testMethod()); } [TestMethod] public void Exp_mem055_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the struct type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem055.testMethod()); } [TestMethod] public void Exp_mem056_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the struct type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem056.testMethod()); } [TestMethod] public void Exp_mem058_Test() { - OutputHelper.WriteLine("Section 7.2.7 "); - OutputHelper.WriteLine("This code tests the primary expression consisting of the form E.I, where E "); - OutputHelper.WriteLine("is a variable, property, or value, the struct type of which is T, and I identifies"); - OutputHelper.WriteLine("an instance field of class type T."); + // Section 7.2.7 + // This code tests the primary expression consisting of the form E.I, where E + // is a variable, property, or value, the struct type of which is T, and I identifies + // an instance field of class type T. Assert.IsTrue(mem058.testMethod()); } [TestMethod] public void Exp_lit001_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("This code tests that a boolean-literal is of type bool."); + // Section 7.2.1 + // This code tests that a boolean-literal is of type bool. Assert.IsTrue(lit001.testMethod()) ; } [TestMethod] public void Exp_lit004_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("This code tests that an int-literal is of type int."); + // Section 7.2.1 + // This code tests that an int-literal is of type int. Assert.IsTrue(lit004.testMethod()) ; } [TestMethod] public void Exp_lit005_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("This code tests that a long-literal is of type long."); + // Section 7.2.1 + // This code tests that a long-literal is of type long. Assert.IsTrue(lit005.testMethod()) ; } [TestMethod] public void Exp_lit006_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("This code tests that a float-literal is of type float."); + // Section 7.2.1 + // This code tests that a float-literal is of type float. Assert.IsTrue(lit006.testMethod()) ; } [TestMethod] public void Exp_lit007_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("This code tests that a double-literal is of type double."); + // Section 7.2.1 + // This code tests that a double-literal is of type double. Assert.IsTrue(lit007.testMethod()) ; } [TestMethod] public void Exp_lit008_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("This code tests that a double-literal is of type double."); + // Section 7.2.1 + // This code tests that a double-literal is of type double. Assert.IsTrue(lit008.testMethod()); } [TestMethod] public void Exp_lit009_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("This code tests that a character-literal is of type char."); + // Section 7.2.1 + // This code tests that a character-literal is of type char. Assert.IsTrue(lit009.testMethod()); } [TestMethod] public void Exp_lit010_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("This code tests that a string-literal is of type string."); + // Section 7.2.1 + // This code tests that a string-literal is of type string. Assert.IsTrue(lit010.testMethod()); } [TestMethod] public void Exp_lit011_Test() { - OutputHelper.WriteLine("Section 7.2.1 "); - OutputHelper.WriteLine("string compare with with its base type."); + // Section 7.2.1 + // string compare with with its base type. Assert.IsTrue(lit011.testMethod()); } [TestMethod] public void Exp_base006_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base006.testMethod()) ; } [TestMethod] public void Exp_base007_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base007.testMethod()) ; } [TestMethod] public void Exp_base009_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base009.testMethod()) ; } [TestMethod] public void Exp_base010_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base010.testMethod()) ; } [TestMethod] public void Exp_base011_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base011.testMethod()); } [TestMethod] public void Exp_base012_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base012.testMethod()); } [TestMethod] public void Exp_base013_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base013.testMethod()); } [TestMethod] public void Exp_base014_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base014.testMethod()); } [TestMethod] public void Exp_base015_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base015.testMethod()); } [TestMethod] public void Exp_base016_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. Assert.IsTrue(base016.testMethod()); } [TestMethod] public void Exp_base017_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); - OutputHelper.WriteLine("Expected Fail"); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. + // Expected Fail Assert.IsTrue(base017.testMethod()); } [TestMethod] public void Exp_base018_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); - OutputHelper.WriteLine("Expected Fail"); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. + // Expected Fail Assert.IsTrue(base018.testMethod()); } [TestMethod] public void Exp_base019_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); - OutputHelper.WriteLine("Expected Fail"); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. + // Expected Fail Assert.IsTrue(base019.testMethod()); } [TestMethod] public void Exp_base020_Test() { - OutputHelper.WriteLine("Section 7.2.8 "); - OutputHelper.WriteLine("A base class access is permitted only in the block of a constructor,"); - OutputHelper.WriteLine("an instance method, or an instance property accessor."); - OutputHelper.WriteLine("Expected Fail"); + // Section 7.2.8 + // A base class access is permitted only in the block of a constructor, + // an instance method, or an instance property accessor. + // Expected Fail Assert.IsTrue(base020.testMethod()); } diff --git a/Tests/NFUnitTestArithmetic/UnitTestFormat.cs b/Tests/NFUnitTestArithmetic/UnitTestFormat.cs index 49b4b2a0..8e2b9af7 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestFormat.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestFormat.cs @@ -593,7 +593,6 @@ public void WriteOutput() OutputHelper.Write(GetColumnInfo((ColumnType)i).ColumnHeader.PadLeft(GetColumnInfo((ColumnType)i).LargestLength + 1)); // +1 for an extra space between columns } } - OutputHelper.WriteLine(""); // complete the line // now write out the row data for (int i = 0; i < m_rows.Count; i++) @@ -616,11 +615,8 @@ public void WriteOutput() OutputHelper.Write(rd.ColumnData[j].PadLeft(GetColumnInfo((ColumnType)j).LargestLength + 1)); // +1 for an extra space between columns } } - OutputHelper.WriteLine(""); // complete the line } - } - } #endregion } diff --git a/Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs b/Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs index b86770fe..dec31183 100644 --- a/Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs +++ b/Tests/NFUnitTestArithmetic/UnitTestOtherArithmeticTests.cs @@ -16,223 +16,223 @@ class UnitTestOtherArithmeticTests [TestMethod] public void Other_unary068_Test() { - OutputHelper.WriteLine(" 7.6.5 Operator Overloading - Unary operator"); + // 7.6.5 Operator Overloading - Unary operator Assert.IsTrue(Other_TestClass_unary068.testMethod()); } [TestMethod] public void Other_relat001_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat001.testMethod()); } [TestMethod] public void Other_relat002_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat002.testMethod()); } [TestMethod] public void Other_relat003_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat003.testMethod()); } [TestMethod] public void Other_relat004_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat004.testMethod()); } [TestMethod] public void Other_relat005_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat005.testMethod()); } [TestMethod] public void Other_relat006_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat006.testMethod()); } [TestMethod] public void Other_relat007_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat007.testMethod()); } [TestMethod] public void Other_relat008_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat008.testMethod()); } [TestMethod] public void Other_relat009_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat009.testMethod()); } [TestMethod] public void Other_relat010_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat010.testMethod()); } [TestMethod] public void Other_relat011_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat011.testMethod()); } [TestMethod] public void Other_relat012_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat012.testMethod()); } [TestMethod] public void Other_relat013_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat013.testMethod()); } [TestMethod] public void Other_relat014_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat014.testMethod()); } [TestMethod] public void Other_relat015_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat015.testMethod()); } [TestMethod] public void Other_relat016_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat016.testMethod()); } [TestMethod] public void Other_relat017_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat017.testMethod()); } [TestMethod] public void Other_relat018_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat018.testMethod()); } [TestMethod] public void Other_relat019_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat019.testMethod()); } [TestMethod] public void Other_relat020_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat020.testMethod()); } [TestMethod] public void Other_relat021_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat021.testMethod()); } [TestMethod] public void Other_relat022_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat022.testMethod()); } [TestMethod] public void Other_relat023_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat023.testMethod()); } [TestMethod] public void Other_relat024_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat024.testMethod()); } [TestMethod] public void Other_relat025_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat025.testMethod()); } [TestMethod] public void Other_relat026_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat026.testMethod()); } [TestMethod] public void Other_relat027_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat027.testMethod()); } [TestMethod] public void Other_relat028_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat028.testMethod()); } [TestMethod] public void Other_relat029_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat029.testMethod()); } [TestMethod] public void Other_relat030_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat030.testMethod()); } [TestMethod] public void Other_relat031_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat031.testMethod()); } [TestMethod] public void Other_relat032_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat032.testMethod()); } [TestMethod] public void Other_relat033_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat033.testMethod()); } [TestMethod] public void Other_relat034_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat034.testMethod()); } [TestMethod] public void Other_relat035_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat035.testMethod()); } [TestMethod] public void Other_relat036_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat036.testMethod()); } @@ -241,10 +241,10 @@ public void Other_relat036_Test() [TestMethod] public void Other_relat037_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("If either operand is NaN, the result is false"); - OutputHelper.WriteLine("for all operators except !=, and true for !="); - OutputHelper.WriteLine("operator."); + // Section 7.9 + // If either operand is NaN, the result is false + // for all operators except !=, and true for != + // operator. Assert.IsTrue(Other_TestClass_relat037.testMethod()) { return MFTestResults.Pass; @@ -254,10 +254,10 @@ public void Other_relat037_Test() [TestMethod] public void Other_relat038_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("If either operand is NaN, the result is false"); - OutputHelper.WriteLine("for all operators except !=, and true for !="); - OutputHelper.WriteLine("operator."); + // Section 7.9 + // If either operand is NaN, the result is false + // for all operators except !=, and true for != + // operator. Assert.IsTrue(Other_TestClass_relat038.testMethod()) { return MFTestResults.Pass; @@ -267,10 +267,10 @@ public void Other_relat038_Test() [TestMethod] public void Other_relat039_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("If either operand is NaN, the result is false"); - OutputHelper.WriteLine("for all operators except !=, and true for !="); - OutputHelper.WriteLine("operator."); + // Section 7.9 + // If either operand is NaN, the result is false + // for all operators except !=, and true for != + // operator. Assert.IsTrue(Other_TestClass_relat039.testMethod()) { return MFTestResults.Pass; @@ -280,10 +280,10 @@ public void Other_relat039_Test() [TestMethod] public void Other_relat040_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("If either operand is NaN, the result is false"); - OutputHelper.WriteLine("for all operators except !=, and true for !="); - OutputHelper.WriteLine("operator."); + // Section 7.9 + // If either operand is NaN, the result is false + // for all operators except !=, and true for != + // operator. Assert.IsTrue(Other_TestClass_relat040.testMethod()) { return MFTestResults.Pass; @@ -293,10 +293,10 @@ public void Other_relat040_Test() [TestMethod] public void Other_relat041_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("If either operand is NaN, the result is false"); - OutputHelper.WriteLine("for all operators except !=, and true for !="); - OutputHelper.WriteLine("operator."); + // Section 7.9 + // If either operand is NaN, the result is false + // for all operators except !=, and true for != + // operator. Assert.IsTrue(Other_TestClass_relat041.testMethod()) { return MFTestResults.Pass; @@ -306,10 +306,10 @@ public void Other_relat041_Test() [TestMethod] public void Other_relat042_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("If either operand is NaN, the result is false"); - OutputHelper.WriteLine("for all operators except !=, and true for !="); - OutputHelper.WriteLine("operator."); + // Section 7.9 + // If either operand is NaN, the result is false + // for all operators except !=, and true for != + // operator. Assert.IsTrue(Other_TestClass_relat042.testMethod()) { return MFTestResults.Pass; @@ -319,9 +319,9 @@ public void Other_relat042_Test() [TestMethod] public void Other_relat043_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("Negative and positive zero is considered"); - OutputHelper.WriteLine("equal."); + // Section 7.9 + // Negative and positive zero is considered + // equal. Assert.IsTrue(Other_TestClass_relat043.testMethod()) { return MFTestResults.Pass; @@ -331,9 +331,9 @@ public void Other_relat043_Test() [TestMethod] public void Other_relat044_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("Negative and positive zero is considered"); - OutputHelper.WriteLine("equal."); + // Section 7.9 + // Negative and positive zero is considered + // equal. Assert.IsTrue(Other_TestClass_relat044.testMethod()) { return MFTestResults.Pass; @@ -343,10 +343,10 @@ public void Other_relat044_Test() [TestMethod] public void Other_relat045_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("Other_TestClass_?_A negative infinity is considered less than"); - OutputHelper.WriteLine("all other values, but equal to another negative"); - OutputHelper.WriteLine("infinity."); + // Section 7.9 + // Other_TestClass_?_A negative infinity is considered less than + // all other values, but equal to another negative + // infinity. Assert.IsTrue(Other_TestClass_relat045.testMethod()) { return MFTestResults.Pass; @@ -356,10 +356,10 @@ public void Other_relat045_Test() [TestMethod] public void Other_relat046_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("Other_TestClass_?_A negative infinity is considered less than"); - OutputHelper.WriteLine("all other values, but equal to another negative"); - OutputHelper.WriteLine("infinity."); + // Section 7.9 + // Other_TestClass_?_A negative infinity is considered less than + // all other values, but equal to another negative + // infinity. Assert.IsTrue(Other_TestClass_relat046.testMethod()) { return MFTestResults.Pass; @@ -369,9 +369,9 @@ public void Other_relat046_Test() [TestMethod] public void Other_relat047_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("Other_TestClass_?_A positive infinity is considered greater than all"); - OutputHelper.WriteLine("other values, but equal to positive infinity."); + // Section 7.9 + // Other_TestClass_?_A positive infinity is considered greater than all + // other values, but equal to positive infinity. Assert.IsTrue(Other_TestClass_relat047.testMethod()) { return MFTestResults.Pass; @@ -381,9 +381,9 @@ public void Other_relat047_Test() [TestMethod] public void Other_relat048_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("Other_TestClass_?_A positive infinity is considered greater than all"); - OutputHelper.WriteLine("other values, but equal to positive infinity."); + // Section 7.9 + // Other_TestClass_?_A positive infinity is considered greater than all + // other values, but equal to positive infinity. Assert.IsTrue(Other_TestClass_relat048.testMethod()) { return MFTestResults.Pass; @@ -394,180 +394,180 @@ public void Other_relat048_Test() [TestMethod] public void Other_relat055_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat055.testMethod()); } [TestMethod] public void Other_relat056_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat056.testMethod()); } [TestMethod] public void Other_relat057_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat057.testMethod()); } [TestMethod] public void Other_relat058_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat058.testMethod()); } [TestMethod] public void Other_relat059_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat059.testMethod()); } [TestMethod] public void Other_relat060_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat060.testMethod()); } [TestMethod] public void Other_relat061_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat061.testMethod()); } [TestMethod] public void Other_relat062_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat062.testMethod()); } [TestMethod] public void Other_relat063_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("since the predefined reference type equality"); - OutputHelper.WriteLine("operators accept operands of type object, they"); - OutputHelper.WriteLine("apply to all types that do not declare applicable"); - OutputHelper.WriteLine("operator == and != members. Conversely, any "); - OutputHelper.WriteLine("applicable user-defined equality operators"); - OutputHelper.WriteLine("effectively hide the predefined reference type"); - OutputHelper.WriteLine("equality operators."); + // Section 7.9 + // since the predefined reference type equality + // operators accept operands of type object, they + // apply to all types that do not declare applicable + // operator == and != members. Conversely, any + // applicable user-defined equality operators + // effectively hide the predefined reference type + // equality operators. Assert.IsTrue(Other_TestClass_relat063.testMethod()); } [TestMethod] public void Other_relat064_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("since the predefined reference type equality"); - OutputHelper.WriteLine("operators accept operands of type object, they"); - OutputHelper.WriteLine("apply to all types that do not declare applicable"); - OutputHelper.WriteLine("operator == and != members. Conversely, any "); - OutputHelper.WriteLine("applicable user-defined equality operators"); - OutputHelper.WriteLine("effectively hide the predefined reference type"); - OutputHelper.WriteLine("equality operators."); + // Section 7.9 + // since the predefined reference type equality + // operators accept operands of type object, they + // apply to all types that do not declare applicable + // operator == and != members. Conversely, any + // applicable user-defined equality operators + // effectively hide the predefined reference type + // equality operators. Assert.IsTrue(Other_TestClass_relat064.testMethod()); } [TestMethod] public void Other_relat065_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("since the predefined reference type equality"); - OutputHelper.WriteLine("operators accept operands of type object, they"); - OutputHelper.WriteLine("apply to all types that do not declare applicable"); - OutputHelper.WriteLine("operator == and != members. Conversely, any "); - OutputHelper.WriteLine("applicable user-defined equality operators"); - OutputHelper.WriteLine("effectively hide the predefined reference type"); - OutputHelper.WriteLine("equality operators."); + // Section 7.9 + // since the predefined reference type equality + // operators accept operands of type object, they + // apply to all types that do not declare applicable + // operator == and != members. Conversely, any + // applicable user-defined equality operators + // effectively hide the predefined reference type + // equality operators. Assert.IsTrue(Other_TestClass_relat065.testMethod()); } [TestMethod] public void Other_relat066_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("since the predefined reference type equality"); - OutputHelper.WriteLine("operators accept operands of type object, they"); - OutputHelper.WriteLine("apply to all types that do not declare applicable"); - OutputHelper.WriteLine("operator == and != members. Conversely, any "); - OutputHelper.WriteLine("applicable user-defined equality operators"); - OutputHelper.WriteLine("effectively hide the predefined reference type"); - OutputHelper.WriteLine("equality operators."); + // Section 7.9 + // since the predefined reference type equality + // operators accept operands of type object, they + // apply to all types that do not declare applicable + // operator == and != members. Conversely, any + // applicable user-defined equality operators + // effectively hide the predefined reference type + // equality operators. Assert.IsTrue(Other_TestClass_relat066.testMethod()); } [TestMethod] public void Other_relat069_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("It is an error to use the predefined reference"); - OutputHelper.WriteLine("type equality operators to compare two references"); - OutputHelper.WriteLine("that are known to be different at compile-time."); + // Section 7.9 + // It is an error to use the predefined reference + // type equality operators to compare two references + // that are known to be different at compile-time. Assert.IsTrue(Other_TestClass_relat069.testMethod()); } [TestMethod] public void Other_relat072_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("The predefined reference type equality operators"); - OutputHelper.WriteLine("do not permit value type operands to be compared."); - OutputHelper.WriteLine("Therefore, unless a struct type declares its own"); - OutputHelper.WriteLine("equality operators, it is not possible to compare"); - OutputHelper.WriteLine("values of that struct type."); + // Section 7.9 + // The predefined reference type equality operators + // do not permit value type operands to be compared. + // Therefore, unless a struct type declares its own + // equality operators, it is not possible to compare + // values of that struct type. Assert.IsTrue(Other_TestClass_relat072.testMethod()); } [TestMethod] public void Other_relat073_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("For an operation of the form x==y or x!=y, "); - OutputHelper.WriteLine("if any appicable operator == or != exists, the"); - OutputHelper.WriteLine("operator overload resolution rules will select"); - OutputHelper.WriteLine("that operator instead of the predefined reference"); - OutputHelper.WriteLine("type equality operator. However, it is always"); - OutputHelper.WriteLine("possible to select the reference type equality"); - OutputHelper.WriteLine("operator by explicitly casting one or both of"); - OutputHelper.WriteLine("the operands to type object."); + // Section 7.9 + // For an operation of the form x==y or x!=y, + // if any appicable operator == or != exists, the + // operator overload resolution rules will select + // that operator instead of the predefined reference + // type equality operator. However, it is always + // possible to select the reference type equality + // operator by explicitly casting one or both of + // the operands to type object. Assert.IsTrue(Other_TestClass_relat073.testMethod()); } [TestMethod] public void Other_relat074_Test() { - OutputHelper.WriteLine("Section 7.9"); - OutputHelper.WriteLine("For an operation of the form x==y or x!=y, "); - OutputHelper.WriteLine("if any appicable operator == or != exists, the"); - OutputHelper.WriteLine("operator overload resolution rules will select"); - OutputHelper.WriteLine("that operator instead of the predefined reference"); - OutputHelper.WriteLine("type equality operator. However, it is always"); - OutputHelper.WriteLine("possible to select the reference type equality"); - OutputHelper.WriteLine("operator by explicitly casting one or both of"); - OutputHelper.WriteLine("the operands to type object."); + // Section 7.9 + // For an operation of the form x==y or x!=y, + // if any appicable operator == or != exists, the + // operator overload resolution rules will select + // that operator instead of the predefined reference + // type equality operator. However, it is always + // possible to select the reference type equality + // operator by explicitly casting one or both of + // the operands to type object. Assert.IsTrue(Other_TestClass_relat074.testMethod()); } [TestMethod] public void Other_relat075_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat075.testMethod()); } [TestMethod] public void Other_relat076_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat076.testMethod()); } [TestMethod] public void Other_relat077_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat077.testMethod()); } [TestMethod] public void Other_relat078_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat078.testMethod()); } /* [TestMethod] public void Other_relat079_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat079.testMethod()) { return MFTestResults.Pass; @@ -578,198 +578,198 @@ public void Other_relat079_Test() [TestMethod] public void Other_relat080_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat080.testMethod()); } [TestMethod] public void Other_relat081_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat081.testMethod()); } [TestMethod] public void Other_relat083_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat083.testMethod()); } [TestMethod] public void Other_relat084_Test() { - OutputHelper.WriteLine("Section 7.9"); + // Section 7.9 Assert.IsTrue(Other_TestClass_relat084.testMethod()); } [TestMethod] public void Other_relat086_Test() { - OutputHelper.WriteLine("Making sure floating point relational operators are working correctly for negative"); - OutputHelper.WriteLine("vs. positive values."); + // Making sure floating point relational operators are working correctly for negative + // vs. positive values. Assert.IsTrue(Other_TestClass_relat086.testMethod()); } [TestMethod] public void Other_relat087_Test() { - OutputHelper.WriteLine("Making sure floating point relational operators are working correctly for negative"); - OutputHelper.WriteLine("vs. positive values."); + // Making sure floating point relational operators are working correctly for negative + // vs. positive values. Assert.IsTrue(Other_TestClass_relat087.testMethod()); } [TestMethod] public void Other_relat088_Test() { - OutputHelper.WriteLine("Making sure floating point relational operators are working correctly for negative"); - OutputHelper.WriteLine("vs. positive values."); + // Making sure floating point relational operators are working correctly for negative + // vs. positive values. Assert.IsTrue(Other_TestClass_relat088.testMethod()); } [TestMethod] public void Other_relat089_Test() { - OutputHelper.WriteLine("Making sure floating point relational operators are working correctly for negative"); - OutputHelper.WriteLine("vs. positive values."); + // Making sure floating point relational operators are working correctly for negative + // vs. positive values. Assert.IsTrue(Other_TestClass_relat089.testMethod()); } [TestMethod] public void Other_operators_logic001_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic001.testMethod()); } [TestMethod] public void Other_operators_logic002_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic002.testMethod()); } [TestMethod] public void Other_operators_logic003_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic003.testMethod()); } [TestMethod] public void Other_operators_logic004_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic004.testMethod()); } [TestMethod] public void Other_operators_logic005_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic005.testMethod()); } [TestMethod] public void Other_operators_logic006_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic006.testMethod()); } [TestMethod] public void Other_operators_logic007_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic007.testMethod()); } [TestMethod] public void Other_operators_logic008_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic008.testMethod()); } [TestMethod] public void Other_operators_logic009_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic009.testMethod()); } [TestMethod] public void Other_operators_logic010_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic010.testMethod()); } [TestMethod] public void Other_operators_logic011_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic011.testMethod()); } [TestMethod] public void Other_operators_logic012_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic012.testMethod()); } [TestMethod] public void Other_operators_logic013_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic013.testMethod()); } [TestMethod] public void Other_operators_logic014_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic014.testMethod()); } [TestMethod] public void Other_operators_logic015_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_operators_logic015.testMethod()); } [TestMethod] public void Other_operators_logic016_Test() { - OutputHelper.WriteLine("Section 7.11"); - OutputHelper.WriteLine("The operation x (double amp) y corresponds to the"); - OutputHelper.WriteLine("operation x (amp) y except that y is evaluated only"); - OutputHelper.WriteLine("if x is true."); + // Section 7.11 + // The operation x (double amp) y corresponds to the + // operation x (amp) y except that y is evaluated only + // if x is true. Assert.IsTrue(Other_TestClass_operators_logic016.testMethod()); } [TestMethod] public void Other_operators_logic017_Test() { - OutputHelper.WriteLine("Section 7.11"); - OutputHelper.WriteLine("The operation x (double amp) y corresponds to the"); - OutputHelper.WriteLine("operation x (amp) y except that y is evaluated only"); - OutputHelper.WriteLine("if x is true."); + // Section 7.11 + // The operation x (double amp) y corresponds to the + // operation x (amp) y except that y is evaluated only + // if x is true. Assert.IsTrue(Other_TestClass_operators_logic017.testMethod()); } [TestMethod] public void Other_operators_logic018_Test() { - OutputHelper.WriteLine("Section 7.11"); - OutputHelper.WriteLine("The operation x || y corresponds to the"); - OutputHelper.WriteLine("operation x (amp) y except that y is evaluated only"); - OutputHelper.WriteLine("if x is false."); + // Section 7.11 + // The operation x || y corresponds to the + // operation x (amp) y except that y is evaluated only + // if x is false. Assert.IsTrue(Other_TestClass_operators_logic018.testMethod()); } [TestMethod] public void Other_operators_logic019_Test() { - OutputHelper.WriteLine("Section 7.11"); - OutputHelper.WriteLine("The operation x || y corresponds to the"); - OutputHelper.WriteLine("operation x (amp) y except that y is evaluated only"); - OutputHelper.WriteLine("if x is false."); + // Section 7.11 + // The operation x || y corresponds to the + // operation x (amp) y except that y is evaluated only + // if x is false. Assert.IsTrue(Other_TestClass_operators_logic019.testMethod()); } /* [TestMethod] public void Other_operators_logic022_Test() { - OutputHelper.WriteLine("Section 7.11"); - OutputHelper.WriteLine("When the operands of && or || are of types"); - OutputHelper.WriteLine("that declare an applicable user-defined operator &"); - OutputHelper.WriteLine("or operator |, both of the following must be true,"); - OutputHelper.WriteLine("where T is the type in which the selected operand"); - OutputHelper.WriteLine("is declared:"); - OutputHelper.WriteLine("The return type and the type of each parameter of "); - OutputHelper.WriteLine("the selected operator must be T. In other words, "); - OutputHelper.WriteLine("the operator must compute the logical AND or the"); - OutputHelper.WriteLine("logical OR of the two operands of type T, and must"); - OutputHelper.WriteLine("return a result of type T."); - OutputHelper.WriteLine("T must contain declarations of operator true and"); - OutputHelper.WriteLine("operator false."); + // Section 7.11 + // When the operands of && or || are of types + // that declare an applicable user-defined operator & + // or operator |, both of the following must be true, + // where T is the type in which the selected operand + // is declared: + // The return type and the type of each parameter of + // the selected operator must be T. In other words, + // the operator must compute the logical AND or the + // logical OR of the two operands of type T, and must + // return a result of type T. + // T must contain declarations of operator true and + // operator false. Assert.IsTrue(Other_TestClass_operators_logic022.testMethod()) { return MFTestResults.Pass; @@ -779,19 +779,19 @@ public void Other_operators_logic022_Test() [TestMethod] public void Other_operators_logic023_Test() { - OutputHelper.WriteLine("Section 7.11"); - OutputHelper.WriteLine("When the operands of && or || are of types"); - OutputHelper.WriteLine("that declare an applicable user-defined operator &"); - OutputHelper.WriteLine("or operator |, both of the following must be true,"); - OutputHelper.WriteLine("where T is the type in which the selected operand"); - OutputHelper.WriteLine("is declared:"); - OutputHelper.WriteLine("The return type and the type of each parameter of "); - OutputHelper.WriteLine("the selected operator must be T. In other words, "); - OutputHelper.WriteLine("the operator must compute the logical AND or the"); - OutputHelper.WriteLine("logical OR of the two operands of type T, and must"); - OutputHelper.WriteLine("return a result of type T."); - OutputHelper.WriteLine("T must contain declarations of operator true and"); - OutputHelper.WriteLine("operator false."); + // Section 7.11 + // When the operands of && or || are of types + // that declare an applicable user-defined operator & + // or operator |, both of the following must be true, + // where T is the type in which the selected operand + // is declared: + // The return type and the type of each parameter of + // the selected operator must be T. In other words, + // the operator must compute the logical AND or the + // logical OR of the two operands of type T, and must + // return a result of type T. + // T must contain declarations of operator true and + // operator false. Assert.IsTrue(Other_TestClass_operators_logic023.testMethod()) { return MFTestResults.Pass; @@ -801,7 +801,7 @@ public void Other_operators_logic023_Test() [TestMethod] public void Other_operators_logic032_Test() { - OutputHelper.WriteLine("Section 7.11"); + // Section 7.11 Assert.IsTrue(Other_TestClass_operators_logic032.testMethod()) { return MFTestResults.Pass; @@ -812,886 +812,886 @@ public void Other_operators_logic032_Test() [TestMethod] public void Other_operators_logic033_Test() { - OutputHelper.WriteLine("Section 7.11"); + // Section 7.11 Assert.IsTrue(Other_TestClass_operators_logic033.testMethod()); } [TestMethod] public void Other_cond001_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("Other_TestClass_?_A conditional expression of the form b(question) x(colon)y"); - OutputHelper.WriteLine("first evaluates the condition b. Then, if b"); - OutputHelper.WriteLine("is true, x is evaluated and becomes the result"); - OutputHelper.WriteLine("of the operation. Otherwise, y is evaluated"); - OutputHelper.WriteLine("and becomes the result of the operation. Other_TestClass_?_A"); - OutputHelper.WriteLine("conditional expression never evaluates both x"); - OutputHelper.WriteLine("and y."); + // Section 7.12 + // Other_TestClass_?_A conditional expression of the form b(question) x(colon)y + // first evaluates the condition b. Then, if b + // is true, x is evaluated and becomes the result + // of the operation. Otherwise, y is evaluated + // and becomes the result of the operation. Other_TestClass_?_A + // conditional expression never evaluates both x + // and y. Assert.IsTrue(Other_TestClass_cond001.testMethod()); } [TestMethod] public void Other_cond002_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("Other_TestClass_?_A conditional expression of the form b(question) x(colon)y"); - OutputHelper.WriteLine("first evaluates the condition b. Then, if b"); - OutputHelper.WriteLine("is true, x is evaluated and becomes the result"); - OutputHelper.WriteLine("of the operation. Otherwise, y is evaluated"); - OutputHelper.WriteLine("and becomes the result of the operation. Other_TestClass_?_A"); - OutputHelper.WriteLine("conditional expression never evaluates both x"); - OutputHelper.WriteLine("and y."); + // Section 7.12 + // Other_TestClass_?_A conditional expression of the form b(question) x(colon)y + // first evaluates the condition b. Then, if b + // is true, x is evaluated and becomes the result + // of the operation. Otherwise, y is evaluated + // and becomes the result of the operation. Other_TestClass_?_A + // conditional expression never evaluates both x + // and y. Assert.IsTrue(Other_TestClass_cond002.testMethod()); } [TestMethod] public void Other_cond003_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("Other_TestClass_?_A conditional expression of the form b(question) x(colon)y"); - OutputHelper.WriteLine("first evaluates the condition b. Then, if b"); - OutputHelper.WriteLine("is true, x is evaluated and becomes the result"); - OutputHelper.WriteLine("of the operation. Otherwise, y is evaluated"); - OutputHelper.WriteLine("and becomes the result of the operation. Other_TestClass_?_A"); - OutputHelper.WriteLine("conditional expression never evaluates both x"); - OutputHelper.WriteLine("and y."); + // Section 7.12 + // Other_TestClass_?_A conditional expression of the form b(question) x(colon)y + // first evaluates the condition b. Then, if b + // is true, x is evaluated and becomes the result + // of the operation. Otherwise, y is evaluated + // and becomes the result of the operation. Other_TestClass_?_A + // conditional expression never evaluates both x + // and y. Assert.IsTrue(Other_TestClass_cond003.testMethod()); } [TestMethod] public void Other_cond004_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("Other_TestClass_?_A conditional expression of the form b(question) x(colon)y"); - OutputHelper.WriteLine("first evaluates the condition b. Then, if b"); - OutputHelper.WriteLine("is true, x is evaluated and becomes the result"); - OutputHelper.WriteLine("of the operation. Otherwise, y is evaluated"); - OutputHelper.WriteLine("and becomes the result of the operation. Other_TestClass_?_A"); - OutputHelper.WriteLine("conditional expression never evaluates both x"); - OutputHelper.WriteLine("and y."); + // Section 7.12 + // Other_TestClass_?_A conditional expression of the form b(question) x(colon)y + // first evaluates the condition b. Then, if b + // is true, x is evaluated and becomes the result + // of the operation. Otherwise, y is evaluated + // and becomes the result of the operation. Other_TestClass_?_A + // conditional expression never evaluates both x + // and y. Assert.IsTrue(Other_TestClass_cond004.testMethod()); } [TestMethod] public void Other_cond005_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("The conditional operator is right-associative, meaning"); - OutputHelper.WriteLine("that operations are grouped from right to left. For example,"); - OutputHelper.WriteLine("an expression of the form a?b:c?d:e is evaluated as a?b:(c?d:e)."); + // Section 7.12 + // The conditional operator is right-associative, meaning + // that operations are grouped from right to left. For example, + // an expression of the form a?b:c?d:e is evaluated as a?b:(c?d:e). Assert.IsTrue(Other_TestClass_cond005.testMethod()); } [TestMethod] public void Other_cond006_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("The first operand of the ?: operator must"); - OutputHelper.WriteLine("be an expression of a type that can be "); - OutputHelper.WriteLine("implicitly converted to bool, or an expression"); - OutputHelper.WriteLine("of a type that implements operator true. If neither"); - OutputHelper.WriteLine("of these requirements are satisfied, a compile-time"); - OutputHelper.WriteLine("error occurs."); + // Section 7.12 + // The first operand of the ?: operator must + // be an expression of a type that can be + // implicitly converted to bool, or an expression + // of a type that implements operator true. If neither + // of these requirements are satisfied, a compile-time + // error occurs. Assert.IsTrue(Other_TestClass_cond006.testMethod()); } [TestMethod] public void Other_cond008_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("The first operand of the ?: operator must"); - OutputHelper.WriteLine("be an expression of a type that can be "); - OutputHelper.WriteLine("implicitly converted to bool, or an expression"); - OutputHelper.WriteLine("of a type that implements operator true. If neither"); - OutputHelper.WriteLine("of these requirements are satisfied, a compile-time"); - OutputHelper.WriteLine("error occurs."); + // Section 7.12 + // The first operand of the ?: operator must + // be an expression of a type that can be + // implicitly converted to bool, or an expression + // of a type that implements operator true. If neither + // of these requirements are satisfied, a compile-time + // error occurs. Assert.IsTrue(Other_TestClass_cond008.testMethod()); } [TestMethod] public void Other_cond010_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("Let X and Y be the types of the second and"); - OutputHelper.WriteLine("third operands. Then,"); - OutputHelper.WriteLine("If X and Y are the same types, then this is"); - OutputHelper.WriteLine("the type of the conditional expression."); - OutputHelper.WriteLine("Otherwise, if an implicit conversion exists"); - OutputHelper.WriteLine("from X to Y, but not from Y to X, then Y"); - OutputHelper.WriteLine("is the type of the conditional expression."); - OutputHelper.WriteLine("Otherwise, if an implicit conversion exists"); - OutputHelper.WriteLine("from Y to X, but not from X to Y, then X"); - OutputHelper.WriteLine("is the type of the conditional expression."); - OutputHelper.WriteLine("Otherwise, no expression type can be "); - OutputHelper.WriteLine("determined, and a compile time error occurs. "); + // Section 7.12 + // Let X and Y be the types of the second and + // third operands. Then, + // If X and Y are the same types, then this is + // the type of the conditional expression. + // Otherwise, if an implicit conversion exists + // from X to Y, but not from Y to X, then Y + // is the type of the conditional expression. + // Otherwise, if an implicit conversion exists + // from Y to X, but not from X to Y, then X + // is the type of the conditional expression. + // Otherwise, no expression type can be + // determined, and a compile time error occurs. Assert.IsTrue(Other_TestClass_cond010.testMethod()); } [TestMethod] public void Other_cond011_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("Let X and Y be the types of the second and"); - OutputHelper.WriteLine("third operands. Then,"); - OutputHelper.WriteLine("If X and Y are the same types, then this is"); - OutputHelper.WriteLine("the type of the conditional expression."); - OutputHelper.WriteLine("Otherwise, if an implicit conversion exists"); - OutputHelper.WriteLine("from X to Y, but not from Y to X, then Y"); - OutputHelper.WriteLine("is the type of the conditional expression."); - OutputHelper.WriteLine("Otherwise, if an implicit conversion exists"); - OutputHelper.WriteLine("from Y to X, but not from X to Y, then X"); - OutputHelper.WriteLine("is the type of the conditional expression."); - OutputHelper.WriteLine("Otherwise, no expression type can be "); - OutputHelper.WriteLine("determined, and a compile time error occurs. "); + // Section 7.12 + // Let X and Y be the types of the second and + // third operands. Then, + // If X and Y are the same types, then this is + // the type of the conditional expression. + // Otherwise, if an implicit conversion exists + // from X to Y, but not from Y to X, then Y + // is the type of the conditional expression. + // Otherwise, if an implicit conversion exists + // from Y to X, but not from X to Y, then X + // is the type of the conditional expression. + // Otherwise, no expression type can be + // determined, and a compile time error occurs. Assert.IsTrue(Other_TestClass_cond011.testMethod()); } [TestMethod] public void Other_cond014_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("The run-time processing of a conditional expression of"); - OutputHelper.WriteLine("the form b? x: y consists of the following steps:"); - OutputHelper.WriteLine("If an implicit conversion from type b to bool exists,"); - OutputHelper.WriteLine("then this implicit conversion is performed to produce"); - OutputHelper.WriteLine("a bool value."); - OutputHelper.WriteLine("Otherwise, the operator true defined by the type of"); - OutputHelper.WriteLine("b is invoked to produce a bool value."); + // Section 7.12 + // The run-time processing of a conditional expression of + // the form b? x: y consists of the following steps: + // If an implicit conversion from type b to bool exists, + // then this implicit conversion is performed to produce + // a bool value. + // Otherwise, the operator true defined by the type of + // b is invoked to produce a bool value. Assert.IsTrue(Other_TestClass_cond014.testMethod()); } [TestMethod] public void Other_cond015_Test() { - OutputHelper.WriteLine("Section 7.12"); - OutputHelper.WriteLine("The run-time processing of a conditional expression of"); - OutputHelper.WriteLine("the form b? x: y consists of the following steps:"); - OutputHelper.WriteLine("If an implicit conversion from type b to bool exists,"); - OutputHelper.WriteLine("then this implicit conversion is performed to produce"); - OutputHelper.WriteLine("a bool value."); - OutputHelper.WriteLine("Otherwise, the operator true defined by the type of"); - OutputHelper.WriteLine("b is invoked to produce a bool value."); + // Section 7.12 + // The run-time processing of a conditional expression of + // the form b? x: y consists of the following steps: + // If an implicit conversion from type b to bool exists, + // then this implicit conversion is performed to produce + // a bool value. + // Otherwise, the operator true defined by the type of + // b is invoked to produce a bool value. Assert.IsTrue(Other_TestClass_cond015.testMethod()); } [TestMethod] public void Other_is005_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The is operator is used to check whether the run-time type"); - OutputHelper.WriteLine("of an ojbect is compatible with a given type. In an operation"); - OutputHelper.WriteLine("of the form e is T, e must be an expression of a reference-type"); - OutputHelper.WriteLine("and T must be a reference-type. If this is not the case, a compile"); - OutputHelper.WriteLine("time error occurs."); + // Section 7.9.9 + // The is operator is used to check whether the run-time type + // of an ojbect is compatible with a given type. In an operation + // of the form e is T, e must be an expression of a reference-type + // and T must be a reference-type. If this is not the case, a compile + // time error occurs. Assert.IsTrue(Other_TestClass_is005.testMethod()); } [TestMethod] public void Other_is006_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The is operator is used to check whether the run-time type"); - OutputHelper.WriteLine("of an ojbect is compatible with a given type. In an operation"); - OutputHelper.WriteLine("of the form e is T, e must be an expression of a reference-type"); - OutputHelper.WriteLine("and T must be a reference-type. If this is not the case, a compile"); - OutputHelper.WriteLine("time error occurs."); + // Section 7.9.9 + // The is operator is used to check whether the run-time type + // of an ojbect is compatible with a given type. In an operation + // of the form e is T, e must be an expression of a reference-type + // and T must be a reference-type. If this is not the case, a compile + // time error occurs. Assert.IsTrue(Other_TestClass_is006.testMethod()); } [TestMethod] public void Other_is007_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is007.testMethod()); } [TestMethod] public void Other_is008_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is008.testMethod()); } [TestMethod] public void Other_is009_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is009.testMethod()); } [TestMethod] public void Other_is010_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is010.testMethod()); } [TestMethod] public void Other_is011_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is011.testMethod()); } [TestMethod] public void Other_is012_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is012.testMethod()); } [TestMethod] public void Other_is013_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is013.testMethod()); } [TestMethod] public void Other_is014_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is014.testMethod()); } [TestMethod] public void Other_is015_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is015.testMethod()); } [TestMethod] public void Other_is016_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is016.testMethod()); } [TestMethod] public void Other_is017_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is017.testMethod()); } [TestMethod] public void Other_is018_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is018.testMethod()); } [TestMethod] public void Other_is019_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is019.testMethod()); } [TestMethod] public void Other_is020_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is020.testMethod()); } [TestMethod] public void Other_is021_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is021.testMethod()); } [TestMethod] public void Other_is022_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("The operation e is T returns true if not null"); - OutputHelper.WriteLine("and if an implicit reference conversion from the "); - OutputHelper.WriteLine("run-time type of the instance referenced by e to "); - OutputHelper.WriteLine("the type given by T exists. In other words, e is T"); - OutputHelper.WriteLine("checks that e is not null and that a cast-expression"); - OutputHelper.WriteLine("of the form (T)(e) will complete without throwing an "); - OutputHelper.WriteLine("System.Exception."); + // Section 7.9.9 + // The operation e is T returns true if not null + // and if an implicit reference conversion from the + // run-time type of the instance referenced by e to + // the type given by T exists. In other words, e is T + // checks that e is not null and that a cast-expression + // of the form (T)(e) will complete without throwing an + // System.Exception. Assert.IsTrue(Other_TestClass_is022.testMethod()); } [TestMethod] public void Other_is023_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is023.testMethod()); } [TestMethod] public void Other_is024_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is024.testMethod()); } [TestMethod] public void Other_is025_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is025.testMethod()); } [TestMethod] public void Other_is026_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is026.testMethod()); } [TestMethod] public void Other_is027_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is027.testMethod()); } [TestMethod] public void Other_is028_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is028.testMethod()); } [TestMethod] public void Other_is029_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is029.testMethod()); } [TestMethod] public void Other_is030_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is030.testMethod()); } [TestMethod] public void Other_is031_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is031.testMethod()); } [TestMethod] public void Other_is032_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is032.testMethod()); } [TestMethod] public void Other_is033_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is033.testMethod()); } [TestMethod] public void Other_is034_Test() { - OutputHelper.WriteLine("Section 7.9.9"); - OutputHelper.WriteLine("If e is T is known at compile-time to always be"); - OutputHelper.WriteLine("true or always be false, a compile-time error"); - OutputHelper.WriteLine("occurs. The operation is known to always be "); - OutputHelper.WriteLine("true if an implicit reference conversion exists from"); - OutputHelper.WriteLine("the compile-time type of e to T. The operation is known"); - OutputHelper.WriteLine("to always be false if no implicit or explicit reference"); - OutputHelper.WriteLine("conversion exists from the compile-time type of e to t."); + // Section 7.9.9 + // If e is T is known at compile-time to always be + // true or always be false, a compile-time error + // occurs. The operation is known to always be + // true if an implicit reference conversion exists from + // the compile-time type of e to T. The operation is known + // to always be false if no implicit or explicit reference + // conversion exists from the compile-time type of e to t. Assert.IsTrue(Other_TestClass_is034.testMethod()); } [TestMethod] public void Other_as001_Test() { - OutputHelper.WriteLine("Section 7.9.10"); + // Section 7.9.10 Assert.IsTrue(Other_TestClass_as001.testMethod()); } [TestMethod] public void Other_as002_Test() { - OutputHelper.WriteLine("Section 7.9.10"); + // Section 7.9.10 Assert.IsTrue(Other_TestClass_as002.testMethod()); } [TestMethod] public void Other_as003_Test() { - OutputHelper.WriteLine("Section 7.9.10"); - OutputHelper.WriteLine("string->object->array "); + // Section 7.9.10 + // string->object->array Assert.IsTrue(Other_TestClass_as003.testMethod()); } [TestMethod] public void Other_as004_Test() { - OutputHelper.WriteLine("Section 7.9.10"); - OutputHelper.WriteLine("string->object->array "); + // Section 7.9.10 + // string->object->array Assert.IsTrue(Other_TestClass_as004.testMethod()); } [TestMethod] public void Other_as007_Test() { - OutputHelper.WriteLine("Section 7.9.10"); - OutputHelper.WriteLine("string->object->array "); + // Section 7.9.10 + // string->object->array Assert.IsTrue(Other_TestClass_as007.testMethod()); } [TestMethod] public void Other_as008_Test() { - OutputHelper.WriteLine("Section 7.9.10"); - OutputHelper.WriteLine("exp as object "); + // Section 7.9.10 + // exp as object Assert.IsTrue(Other_TestClass_as008.testMethod()); } [TestMethod] public void Other_as011_Test() { - OutputHelper.WriteLine("Section 7.9.10"); - OutputHelper.WriteLine("expression as for a deep inheritance"); + // Section 7.9.10 + // expression as for a deep inheritance Assert.IsTrue(Other_TestClass_as011.testMethod()); } [TestMethod] public void Other_as012_Test() { - OutputHelper.WriteLine("Section 7.9.10"); - OutputHelper.WriteLine("expression as non-type through interface (check at runtime)"); + // Section 7.9.10 + // expression as non-type through interface (check at runtime) Assert.IsTrue(Other_TestClass_as012.testMethod()); } [TestMethod] public void Other_add001_Test() { - OutputHelper.WriteLine("Section 7.7.4"); - OutputHelper.WriteLine("When one or both operands are of type string, the"); - OutputHelper.WriteLine("predefined addition operators concatenate the string"); - OutputHelper.WriteLine("representation of the operands."); + // Section 7.7.4 + // When one or both operands are of type string, the + // predefined addition operators concatenate the string + // representation of the operands. Assert.IsTrue(Other_TestClass_add001.testMethod()); } [TestMethod] public void Other_add002_Test() { - OutputHelper.WriteLine("Section 7.7.4"); - OutputHelper.WriteLine("When one or both operands are of type string, the"); - OutputHelper.WriteLine("predefined addition operators concatenate the string"); - OutputHelper.WriteLine("representation of the operands."); + // Section 7.7.4 + // When one or both operands are of type string, the + // predefined addition operators concatenate the string + // representation of the operands. Assert.IsTrue(Other_TestClass_add002.testMethod()); } [TestMethod] public void Other_add003_Test() { - OutputHelper.WriteLine("Section 7.7.4"); - OutputHelper.WriteLine("When one or both operands are of type string, the"); - OutputHelper.WriteLine("predefined addition operators concatenate the string"); - OutputHelper.WriteLine("representation of the operands."); + // Section 7.7.4 + // When one or both operands are of type string, the + // predefined addition operators concatenate the string + // representation of the operands. Assert.IsTrue(Other_TestClass_add003.testMethod()); } [TestMethod] public void Other_add004_Test() { - OutputHelper.WriteLine("Section 7.7.4"); - OutputHelper.WriteLine("When one or both operands are of type string, the"); - OutputHelper.WriteLine("predefined addition operators concatenate the string"); - OutputHelper.WriteLine("representation of the operands."); + // Section 7.7.4 + // When one or both operands are of type string, the + // predefined addition operators concatenate the string + // representation of the operands. Assert.IsTrue(Other_TestClass_add004.testMethod()); } [TestMethod] public void Other_add005_Test() { - OutputHelper.WriteLine("Section 7.7.4"); - OutputHelper.WriteLine("When one or both operands are of type string, the"); - OutputHelper.WriteLine("predefined addition operators concatenate the string"); - OutputHelper.WriteLine("representation of the operands."); + // Section 7.7.4 + // When one or both operands are of type string, the + // predefined addition operators concatenate the string + // representation of the operands. Assert.IsTrue(Other_TestClass_add005.testMethod()); } [TestMethod] public void Other_add006_Test() { - OutputHelper.WriteLine("Section 7.7.4"); - OutputHelper.WriteLine("When one or both operands are of type string, the"); - OutputHelper.WriteLine("predefined addition operators concatenate the string"); - OutputHelper.WriteLine("representation of the operands."); + // Section 7.7.4 + // When one or both operands are of type string, the + // predefined addition operators concatenate the string + // representation of the operands. Assert.IsTrue(Other_TestClass_add006.testMethod()); } [TestMethod] public void Other_logic001_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic001.testMethod()); } [TestMethod] public void Other_logic002_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic002.testMethod()); } [TestMethod] public void Other_logic003_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic003.testMethod()); } [TestMethod] public void Other_logic004_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic004.testMethod()); } [TestMethod] public void Other_logic005_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic005.testMethod()); } [TestMethod] public void Other_logic006_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic006.testMethod()); } [TestMethod] public void Other_logic007_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic007.testMethod()); } [TestMethod] public void Other_logic008_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic008.testMethod()); } [TestMethod] public void Other_logic009_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic009.testMethod()); } [TestMethod] public void Other_logic010_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic010.testMethod()); } [TestMethod] public void Other_logic011_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic011.testMethod()); } [TestMethod] public void Other_logic012_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic012.testMethod()); } [TestMethod] public void Other_logic013_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic013.testMethod()); } [TestMethod] public void Other_logic014_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic014.testMethod()); } [TestMethod] public void Other_logic015_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic015.testMethod()); } [TestMethod] public void Other_logic016_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic016.testMethod()); } [TestMethod] public void Other_logic017_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic017.testMethod()); } [TestMethod] public void Other_logic018_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic018.testMethod()); } [TestMethod] public void Other_logic019_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic019.testMethod()); } [TestMethod] public void Other_logic020_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic020.testMethod()); } [TestMethod] public void Other_logic021_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic021.testMethod()); } [TestMethod] public void Other_logic022_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic022.testMethod()); } [TestMethod] public void Other_logic023_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic023.testMethod()); } [TestMethod] public void Other_logic024_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic024.testMethod()); } [TestMethod] public void Other_logic025_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic025.testMethod()); } [TestMethod] public void Other_logic026_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic026.testMethod()); } [TestMethod] public void Other_logic027_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic027.testMethod()); } [TestMethod] public void Other_logic028_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic028.testMethod()); } [TestMethod] public void Other_logic029_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic029.testMethod()); } [TestMethod] public void Other_logic030_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic030.testMethod()); } [TestMethod] public void Other_logic032_Test() { - OutputHelper.WriteLine("Section 7.10"); + // Section 7.10 Assert.IsTrue(Other_TestClass_logic032.testMethod()); } diff --git a/Tests/NFUnitTestArray/UnitTestOtherTests.cs b/Tests/NFUnitTestArray/UnitTestOtherTests.cs index afea51ce..50ed78ee 100644 --- a/Tests/NFUnitTestArray/UnitTestOtherTests.cs +++ b/Tests/NFUnitTestArray/UnitTestOtherTests.cs @@ -16,24 +16,24 @@ public class UnitTestOtherTests [TestMethod] public void Othersystemarrays_conversion_01_Test() { - OutputHelper.WriteLine("System.Array Type - Conversions "); - OutputHelper.WriteLine("Verify that an implicit reference conversion from T[D] to System.Array exists"); + // System.Array Type - Conversions + // Verify that an implicit reference conversion from T[D] to System.Array exists Assert.IsTrue(Other_TestClass_systemarrays_conversion_01.testMethod()); } [TestMethod] public void Othersystemarrays_conversion_02_Test() { - OutputHelper.WriteLine("System.Array Type - Conversions "); - OutputHelper.WriteLine("Verify that an explicit reference conversion from System.Array to T[D] exists"); + // System.Array Type - Conversions + // Verify that an explicit reference conversion from System.Array to T[D] exists Assert.IsTrue(Other_TestClass_systemarrays_conversion_02.testMethod()); } [TestMethod] public void Othersystemarrays_nullvalue_01_Test() { - OutputHelper.WriteLine("System.Array Type - Null Values"); - OutputHelper.WriteLine("Verify that a System.Array array can be set to null"); + // System.Array Type - Null Values + // Verify that a System.Array array can be set to null Assert.IsTrue(Other_TestClass_systemarrays_nullvalue_01.testMethod()); } @@ -46,87 +46,87 @@ public void Othercovariance_exception_01_Test() [TestMethod] public void Othercovariance_exception_02_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify an System.Exception is thrown when incompatible types are assigned to array elements"); + // Array Covariance + // Verify an System.Exception is thrown when incompatible types are assigned to array elements Assert.IsTrue(Other_TestClass_covariance_exception_02.testMethod()); } [TestMethod] public void Othercovariance_explicit_01_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from object to any reference-type (class)"); + // Array Covariance + // Verify covariance from object to any reference-type (class) Assert.IsTrue(Other_TestClass_covariance_explicit_01.testMethod()); } [TestMethod] public void Othercovariance_explicit_02_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from any reference-type (interface) to object"); + // Array Covariance + // Verify covariance from any reference-type (interface) to object Assert.IsTrue(Other_TestClass_covariance_explicit_02.testMethod()); } [TestMethod] public void Othercovariance_explicit_03_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from any class-type S to any class-type T, provided S is base class of T"); + // Array Covariance + // Verify covariance from any class-type S to any class-type T, provided S is base class of T Assert.IsTrue(Other_TestClass_covariance_explicit_03.testMethod()); } [TestMethod] public void Othercovariance_explicit_04_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from any interface-type S to any interface-type T, provided S is not derived from T"); + // Array Covariance + // Verify covariance from any interface-type S to any interface-type T, provided S is not derived from T Assert.IsTrue(Other_TestClass_covariance_explicit_04.testMethod()); } [TestMethod] public void Othercovariance_implicit_01_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from any reference-type (class) to object"); + // Array Covariance + // Verify covariance from any reference-type (class) to object Assert.IsTrue(Other_TestClass_covariance_implicit_01.testMethod()); } [TestMethod] public void Othercovariance_implicit_02_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from any reference-type (interface) to object"); + // Array Covariance + // Verify covariance from any reference-type (interface) to object Assert.IsTrue(Other_TestClass_covariance_implicit_02.testMethod()); } [TestMethod] public void Othercovariance_implicit_03_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from any class-type S to any class-type T, provided S is derived from T"); + // Array Covariance + // Verify covariance from any class-type S to any class-type T, provided S is derived from T Assert.IsTrue(Other_TestClass_covariance_implicit_03.testMethod()); } [TestMethod] public void Othercovariance_implicit_04_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from any class-type S to any interface-type T, provided S implements T"); + // Array Covariance + // Verify covariance from any class-type S to any interface-type T, provided S implements T Assert.IsTrue(Other_TestClass_covariance_implicit_04.testMethod()); } [TestMethod] public void Othercovariance_implicit_05_Test() { - OutputHelper.WriteLine("Array Covariance"); - OutputHelper.WriteLine("Verify covariance from any interface-type S to any interface-type T, provided S is derived from T"); + // Array Covariance + // Verify covariance from any interface-type S to any interface-type T, provided S is derived from T Assert.IsTrue(Other_TestClass_covariance_implicit_05.testMethod()); } [TestMethod] public void BinarySearch_Test() { - OutputHelper.WriteLine("Array.BinarySearch"); + // Array.BinarySearch var objects = new MyClass[6]; for (int i = 0; i < 6; i++) @@ -312,7 +312,7 @@ class Other_TestClass_covariance_explicit_02_Imp : Other_TestClass_covariance_ex { public int testmethod() { - OutputHelper.WriteLine("Other_TestClass_covariance_explicit_02_Imp::testmethod()"); + // Other_TestClass_covariance_explicit_02_Imp::testmethod() return 0; } } @@ -437,7 +437,7 @@ class Other_TestClass_covariance_implicit_02_Imp : Other_TestClass_covariance_im { public int testmethod() { - OutputHelper.WriteLine("Other_TestClass_covariance_implicit_02_Imp::testmethod()"); + // Other_TestClass_covariance_implicit_02_Imp::testmethod() return 0; } } diff --git a/Tests/NFUnitTestArray/UnitTestSimpleTests.cs b/Tests/NFUnitTestArray/UnitTestSimpleTests.cs index bc9c082f..770b43b7 100644 --- a/Tests/NFUnitTestArray/UnitTestSimpleTests.cs +++ b/Tests/NFUnitTestArray/UnitTestSimpleTests.cs @@ -16,961 +16,961 @@ class UnitTestSimpleTests [TestMethod] public void Simple_decl_decl_01_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type int"); + // Arrays - Declarations + // Declare a simple array of type int Assert.IsTrue(Simple_TestClass_decl_decl_01.testMethod()); } [TestMethod] public void Simple_decl_decl_02_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type byte"); + // Arrays - Declarations + // Declare a simple array of type byte Assert.IsTrue(Simple_TestClass_decl_decl_02.testMethod()); } [TestMethod] public void Simple_decl_decl_03_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type short"); + // Arrays - Declarations + // Declare a simple array of type short Assert.IsTrue(Simple_TestClass_decl_decl_03.testMethod()); } [TestMethod] public void Simple_decl_decl_04_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type long"); + // Arrays - Declarations + // Declare a simple array of type long Assert.IsTrue(Simple_TestClass_decl_decl_04.testMethod()); } [TestMethod] public void Simple_decl_decl_05_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type char"); + // Arrays - Declarations + // Declare a simple array of type char Assert.IsTrue(Simple_TestClass_decl_decl_05.testMethod()); } [TestMethod] public void Simple_decl_decl_06_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type double"); + // Arrays - Declarations + // Declare a simple array of type double Assert.IsTrue(Simple_TestClass_decl_decl_06.testMethod()); } [TestMethod] public void Simple_decl_decl_07_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type float"); + // Arrays - Declarations + // Declare a simple array of type float Assert.IsTrue(Simple_TestClass_decl_decl_07.testMethod()); } [TestMethod] public void Simple_decl_decl_08_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type double"); + // Arrays - Declarations + // Declare a simple array of type double Assert.IsTrue(Simple_TestClass_decl_decl_08.testMethod()); } [TestMethod] public void Simple_decl_decl_09_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type bool"); + // Arrays - Declarations + // Declare a simple array of type bool Assert.IsTrue(Simple_TestClass_decl_decl_09.testMethod()); } [TestMethod] public void Simple_decl_decl_10_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of a user-defined struct"); + // Arrays - Declarations + // Declare a simple array of a user-defined struct Assert.IsTrue(Simple_TestClass_decl_decl_10.testMethod()); } [TestMethod] public void Simple_decl_decl_11_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of a user-defined class"); + // Arrays - Declarations + // Declare a simple array of a user-defined class Assert.IsTrue(Simple_TestClass_decl_decl_11.testMethod()); } [TestMethod] public void Simple_decl_decl_12_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of a user-defined interface"); + // Arrays - Declarations + // Declare a simple array of a user-defined interface Assert.IsTrue(Simple_TestClass_decl_decl_12.testMethod()); } [TestMethod] public void Simple_decl_decl_13_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type object"); + // Arrays - Declarations + // Declare a simple array of type object Assert.IsTrue(Simple_TestClass_decl_decl_13.testMethod()); } [TestMethod] public void Simple_decl_decl_14_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of delegates"); + // Arrays - Declarations + // Declare a simple array of delegates Assert.IsTrue(Simple_TestClass_decl_decl_14.testMethod()); } [TestMethod] public void Simple_decl_decl_15_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Declare a simple array of type System.Array"); + // Arrays - Declarations + // Declare a simple array of type System.Array Assert.IsTrue(Simple_TestClass_decl_decl_15.testMethod()); } [TestMethod] public void Simple_decl_bounds_01_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" An array created as array[0] compiles successfully"); + // Arrays - Declarations + // An array created as array[0] compiles successfully Assert.IsTrue(Simple_TestClass_decl_bounds_01.testMethod()); } [TestMethod] public void Simple_decl_bounds_02_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" An array created as array[maxint] compiles successfully"); - OutputHelper.WriteLine("This test is expected to generate"); - OutputHelper.WriteLine("Out Of Memory System.Exception"); + // Arrays - Declarations + // An array created as array[maxint] compiles successfully + // This test is expected to generate + // Out Of Memory System.Exception Assert.IsFalse(Simple_TestClass_decl_bounds_02.testMethod()); - OutputHelper.WriteLine(" This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine(" It previously marked as known failure because of bug # 16823"); - OutputHelper.WriteLine(" The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 16823 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void Simple_decl_bounds_03_Test() { - OutputHelper.WriteLine(" decl_bounds_03 "); - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" An array created as array[maxint+1] compiles successfully"); + // decl_bounds_03 + // Arrays - Declarations + // An array created as array[maxint+1] compiles successfully Assert.IsFalse(Simple_TestClass_decl_bounds_03.testMethod()); - OutputHelper.WriteLine(" This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine(" It previously marked as known failure because of bug # 16823"); - OutputHelper.WriteLine(" The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 16823 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void Simple_decl_index_01_Test() { - OutputHelper.WriteLine(" decl_index_01 "); - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A char variable as an array index should work"); + // decl_index_01 + // Arrays - Declarations + // A char variable as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_01.testMethod()); } [TestMethod] public void Simple_decl_index_02_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A byte variable as an array index should work"); + // Arrays - Declarations + // A byte variable as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_02.testMethod()); } [TestMethod] public void Simple_decl_index_03_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A short variable as an array index should work"); + // Arrays - Declarations + // A short variable as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_03.testMethod()); } [TestMethod] public void Simple_decl_index_04_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A short literal as an array index should work"); + // Arrays - Declarations + // A short literal as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_04.testMethod()); } [TestMethod] public void Simple_decl_index_05_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A byte literal as an array index should work"); + // Arrays - Declarations + // A byte literal as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_05.testMethod()); } [TestMethod] public void Simple_decl_index_06_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A char literal as an array index should work"); + // Arrays - Declarations + // A char literal as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_06.testMethod()); } [TestMethod] public void Simple_decl_index_07_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A uint variable as an array index should work"); + // Arrays - Declarations + // A uint variable as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_07.testMethod()); } [TestMethod] public void Simple_decl_index_08_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A long variable as an array index should work"); + // Arrays - Declarations + // A long variable as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_08.testMethod()); } [TestMethod] public void Simple_decl_index_09_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A ulong variable as an array index should work"); + // Arrays - Declarations + // A ulong variable as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_09.testMethod()); } [TestMethod] public void Simple_decl_index_10_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A uint literal as an array index should work"); + // Arrays - Declarations + // A uint literal as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_10.testMethod()); } [TestMethod] public void Simple_decl_index_11_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A long literal as an array index should work"); + // Arrays - Declarations + // A long literal as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_11.testMethod()); } [TestMethod] public void Simple_decl_index_12_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" A ulong literal as an array index should work"); + // Arrays - Declarations + // A ulong literal as an array index should work Assert.IsTrue(Simple_TestClass_decl_index_12.testMethod()); } [TestMethod] public void Simple_decl_syntax_03_Test() { - OutputHelper.WriteLine(" Arrays - Declarations"); - OutputHelper.WriteLine(" Spaces after type and between brackets and comments do not affect arrays"); + // Arrays - Declarations + // Spaces after type and between brackets and comments do not affect arrays Assert.IsTrue(Simple_TestClass_decl_syntax_03.testMethod()); } [TestMethod] public void Simple_init_init_a_01_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type int using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type int using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_01.testMethod()); } [TestMethod] public void Simple_init_init_a_02_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type short using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type short using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_02.testMethod()); } [TestMethod] public void Simple_init_init_a_03_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type byte using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type byte using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_03.testMethod()); } [TestMethod] public void Simple_init_init_a_04_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type long using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type long using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_04.testMethod()); } [TestMethod] public void Simple_init_init_a_05_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type double using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type double using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_05.testMethod()); } [TestMethod] public void Simple_init_init_a_06_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type float using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type float using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_06.testMethod()); } [TestMethod] public void Simple_init_init_a_08_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type String using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type String using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_08.testMethod()); } [TestMethod] public void Simple_init_init_a_09_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type char using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type char using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_09.testMethod()); } [TestMethod] public void Simple_init_init_a_10_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type bool using new (longhand)"); + // Arrays - Initialization + // Initialization of arrays of type bool using new (longhand) Assert.IsTrue(Simple_TestClass_init_init_a_10.testMethod()); } [TestMethod] public void Simple_init_init_b_01_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type int using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type int using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_01.testMethod()); } [TestMethod] public void Simple_init_init_b_02_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type short using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type short using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_02.testMethod()); } [TestMethod] public void Simple_init_init_b_03_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type byte using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type byte using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_03.testMethod()); } [TestMethod] public void Simple_init_init_b_04_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type long using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type long using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_04.testMethod()); } [TestMethod] public void Simple_init_init_b_05_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type double using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type double using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_05.testMethod()); } [TestMethod] public void Simple_init_init_b_06_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type float using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type float using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_06.testMethod()); } [TestMethod] public void Simple_init_init_b_08_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type String using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type String using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_08.testMethod()); } [TestMethod] public void Simple_init_init_b_09_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type char using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type char using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_09.testMethod()); } [TestMethod] public void Simple_init_init_b_10_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type bool using new (shorthand)"); + // Arrays - Initialization + // Initialization of arrays of type bool using new (shorthand) Assert.IsTrue(Simple_TestClass_init_init_b_10.testMethod()); } [TestMethod] public void Simple_init_init_c_01_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type int using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type int using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_01.testMethod()); } [TestMethod] public void Simple_init_init_c_02_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type short using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type short using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_02.testMethod()); } [TestMethod] public void Simple_init_init_c_03_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type byte using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type byte using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_03.testMethod()); } [TestMethod] public void Simple_init_init_c_04_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type long using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type long using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_04.testMethod()); } [TestMethod] public void Simple_init_init_c_05_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type double using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type double using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_05.testMethod()); } [TestMethod] public void Simple_init_init_c_06_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type float using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type float using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_06.testMethod()); } [TestMethod] public void Simple_init_init_c_08_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type String using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type String using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_08.testMethod()); } [TestMethod] public void Simple_init_init_c_09_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type char using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type char using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_09.testMethod()); } [TestMethod] public void Simple_init_init_c_10_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type bool using new (# init values sets array size)"); + // Arrays - Initialization + // Initialization of arrays of type bool using new (# init values sets array size) Assert.IsTrue(Simple_TestClass_init_init_c_10.testMethod()); } [TestMethod] public void Simple_init_init_d_01_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type int using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type int using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_01.testMethod()); } [TestMethod] public void Simple_init_init_d_02_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type short using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type short using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_02.testMethod()); } [TestMethod] public void Simple_init_init_d_03_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type byte using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type byte using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_03.testMethod()); } [TestMethod] public void Simple_init_init_d_04_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type long using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type long using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_04.testMethod()); } [TestMethod] public void Simple_init_init_d_05_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type double using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type double using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_05.testMethod()); } [TestMethod] public void Simple_init_init_d_06_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type float using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type float using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_06.testMethod()); } [TestMethod] public void Simple_init_init_d_08_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type String using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type String using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_08.testMethod()); } [TestMethod] public void Simple_init_init_d_09_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type char using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type char using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_09.testMethod()); } [TestMethod] public void Simple_init_init_d_10_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type bool using new (longhand) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type bool using new (longhand) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_d_10.testMethod()); } [TestMethod] public void Simple_init_init_e_01_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type int using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type int using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_01.testMethod()); } [TestMethod] public void Simple_init_init_e_02_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type short using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type short using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_02.testMethod()); } [TestMethod] public void Simple_init_init_e_03_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type byte using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type byte using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_03.testMethod()); } [TestMethod] public void Simple_init_init_e_04_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type long using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type long using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_04.testMethod()); } [TestMethod] public void Simple_init_init_e_05_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type double using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type double using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_05.testMethod()); } [TestMethod] public void Simple_init_init_e_06_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type float using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type float using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_06.testMethod()); } [TestMethod] public void Simple_init_init_e_08_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type String using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type String using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_08.testMethod()); } [TestMethod] public void Simple_init_init_e_09_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type char using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type char using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_09.testMethod()); } [TestMethod] public void Simple_init_init_e_10_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type bool using new (# init values sets array size) separate from decl statement"); + // Arrays - Initialization + // Initialization of arrays of type bool using new (# init values sets array size) separate from decl statement Assert.IsTrue(Simple_TestClass_init_init_e_10.testMethod()); } [TestMethod] public void Simple_init_syntax_09_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Syntax - Whitespace and comments in braces should not affect anything"); + // Arrays - Initialization + // Syntax - Whitespace and comments in braces should not affect anything Assert.IsTrue(Simple_TestClass_init_syntax_09.testMethod()); } [TestMethod] public void Simple_init_syntax_11_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Syntax - zero elements in initializer should create zero length array"); + // Arrays - Initialization + // Syntax - zero elements in initializer should create zero length array Assert.IsTrue(Simple_TestClass_init_syntax_11.testMethod()); } [TestMethod] public void Simple_init_syntax_12_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Syntax - zero elements in initializer should be allowed for 0-length array"); + // Arrays - Initialization + // Syntax - zero elements in initializer should be allowed for 0-length array Assert.IsTrue(Simple_TestClass_init_syntax_12.testMethod()); } [TestMethod] public void Simple_init_decl_02_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Declaration - if initializer is used, a provided index can be a const"); + // Arrays - Initialization + // Declaration - if initializer is used, a provided index can be a const Assert.IsTrue(Simple_TestClass_init_decl_02.testMethod()); } [TestMethod] public void Simple_init_decl_03_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Declaration - if initializer is used, a provided index can be a const short"); + // Arrays - Initialization + // Declaration - if initializer is used, a provided index can be a const short Assert.IsTrue(Simple_TestClass_init_decl_03.testMethod()); } [TestMethod] public void Simple_init_decl_04_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Declaration - if initializer is used, a provided index can be a const byte"); + // Arrays - Initialization + // Declaration - if initializer is used, a provided index can be a const byte Assert.IsTrue(Simple_TestClass_init_decl_04.testMethod()); } [TestMethod] public void Simple_init_decl_05_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Declaration - if initializer is used, a provided index can be a const long casted to an int"); + // Arrays - Initialization + // Declaration - if initializer is used, a provided index can be a const long casted to an int Assert.IsTrue(Simple_TestClass_init_decl_05.testMethod()); } [TestMethod] public void Simple_init_shorthand_01_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Initialization of arrays of type int using new (shorthand)"); - OutputHelper.WriteLine(" This is to verify bug #52958 doesn't regress"); + // Arrays - Initialization + // Initialization of arrays of type int using new (shorthand) + // This is to verify bug #52958 doesn't regress Assert.IsTrue(Simple_TestClass_init_shorthand_01.testMethod()); } [TestMethod] public void Simple_init_constinit_01_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Ensure all constant init optimization code paths are covered: all constants (VS7:124565 for more info)"); + // Arrays - Initialization + // Ensure all constant init optimization code paths are covered: all constants (VS7:124565 for more info) Assert.IsTrue(Simple_TestClass_init_constinit_01.testMethod()); } [TestMethod] public void Simple_init_constinit_02_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Ensure all constant init optimization code paths are covered: all variables (VS7:124565 for more info)"); + // Arrays - Initialization + // Ensure all constant init optimization code paths are covered: all variables (VS7:124565 for more info) Assert.IsTrue(Simple_TestClass_init_constinit_02.testMethod()); } [TestMethod] public void Simple_init_constinit_03_Test() { - OutputHelper.WriteLine(" Arrays - Initialization"); - OutputHelper.WriteLine(" Ensure all constant init optimization code paths are covered: half variables and half constants (VS7:124565 for more info)"); + // Arrays - Initialization + // Ensure all constant init optimization code paths are covered: half variables and half constants (VS7:124565 for more info) Assert.IsTrue(Simple_TestClass_init_constinit_03.testMethod()); } [TestMethod] public void Simple_acc_iter_length_01_Test() { - OutputHelper.WriteLine(" acc_iter_length_01 "); - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Declare simple arrays of various lengths and verify that array.Length is correct"); + // acc_iter_length_01 + // Arrays - Access and Iteration + // Declare simple arrays of various lengths and verify that array.Length is correct Assert.IsTrue(Simple_TestClass_acc_iter_length_01.testMethod()); } [TestMethod] public void Simple_acc_iter_bounds_01_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's 0th element should work fine"); + // Arrays - Access and Iteration + // Accessing an array's 0th element should work fine Assert.IsTrue(Simple_TestClass_acc_iter_bounds_01.testMethod()); } [TestMethod] public void Simple_acc_iter_bounds_02_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's maxlength element should work fine"); + // Arrays - Access and Iteration + // Accessing an array's maxlength element should work fine Assert.IsTrue(Simple_TestClass_acc_iter_bounds_02.testMethod()); } [TestMethod] public void Simple_acc_iter_bounds_03_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's -1 element should throw an System.Exception"); + // Arrays - Access and Iteration + // Accessing an array's -1 element should throw an System.Exception Assert.IsTrue(Simple_TestClass_acc_iter_bounds_03.testMethod()); } [TestMethod] public void Simple_acc_iter_bounds_04_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's maxlength+1 element should throw an System.Exception"); + // Arrays - Access and Iteration + // Accessing an array's maxlength+1 element should throw an System.Exception Assert.IsTrue(Simple_TestClass_acc_iter_bounds_04.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_01_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a variable of type int should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a variable of type int should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_01.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_02_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a variable of type short should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a variable of type short should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_02.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_03_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a variable of type byte should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a variable of type byte should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_03.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_04_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a variable of type char should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a variable of type char should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_04.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_a_06_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a variable of type long should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a variable of type long should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_a_06.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_01_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with an int literal should work"); + // Arrays - Access and Iteration + // Accessing an array's index with an int literal should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_01.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_02_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a short literal should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a short literal should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_02.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_03_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a byte literal should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a byte literal should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_03.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_04_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a char literal should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a char literal should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_04.testMethod()); } [TestMethod] public void Simple_acc_iter_idxtype_b_06_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Accessing an array's index with a variable of type long should work"); + // Arrays - Access and Iteration + // Accessing an array's index with a variable of type long should work Assert.IsTrue(Simple_TestClass_acc_iter_idxtype_b_06.testMethod()); } [TestMethod] public void Simple_acc_iter_iter_01_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Declare simple array of int, init it through iteration, verify values are correct"); + // Arrays - Access and Iteration + // Declare simple array of int, init it through iteration, verify values are correct Assert.IsTrue(Simple_TestClass_acc_iter_iter_01.testMethod()); } [TestMethod] public void Simple_acc_iter_iter_02_Test() { - OutputHelper.WriteLine(" Arrays - Access and Iteration"); - OutputHelper.WriteLine(" Declare simple array of char, init it through individual element assignments, verify correctness"); + // Arrays - Access and Iteration + // Declare simple array of char, init it through individual element assignments, verify correctness Assert.IsTrue(Simple_TestClass_acc_iter_iter_02.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_01_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning int type literals into array elements should work"); + // Arrays - Assignments + // Assigning int type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_01.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_02_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning byte type literals into array elements should work"); + // Arrays - Assignments + // Assigning byte type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_02.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_03_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning short type literals into array elements should work"); + // Arrays - Assignments + // Assigning short type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_03.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_04_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning long type literals into array elements should work"); + // Arrays - Assignments + // Assigning long type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_04.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_05_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning char type literals into array elements should work"); + // Arrays - Assignments + // Assigning char type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_05.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_06_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning double type literals into array elements should work"); + // Arrays - Assignments + // Assigning double type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_06.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_07_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning float type literals into array elements should work"); + // Arrays - Assignments + // Assigning float type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_07.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_08_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning double type literals into array elements should work"); + // Arrays - Assignments + // Assigning double type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_08.testMethod()); } [TestMethod] public void Simple_assign_smpass_a_09_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning bool type literals into array elements should work"); + // Arrays - Assignments + // Assigning bool type literals into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_a_09.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_01_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning int type variables into array elements should work"); + // Arrays - Assignments + // Assigning int type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_01.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_02_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning byte type variables into array elements should work"); + // Arrays - Assignments + // Assigning byte type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_02.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_03_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning short type variables into array elements should work"); + // Arrays - Assignments + // Assigning short type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_03.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_04_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning long type variables into array elements should work"); + // Arrays - Assignments + // Assigning long type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_04.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_05_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning char type variables into array elements should work"); + // Arrays - Assignments + // Assigning char type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_05.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_06_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning double type variables into array elements should work"); + // Arrays - Assignments + // Assigning double type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_06.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_07_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning float type variables into array elements should work"); + // Arrays - Assignments + // Assigning float type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_07.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_08_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning double type variables into array elements should work"); + // Arrays - Assignments + // Assigning double type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_08.testMethod()); } [TestMethod] public void Simple_assign_smpass_b_09_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning bool type variables into array elements should work"); + // Arrays - Assignments + // Assigning bool type variables into array elements should work Assert.IsTrue(Simple_TestClass_assign_smpass_b_09.testMethod()); } [TestMethod] public void Simple_assign_badass_01_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning null to an array variable should work"); + // Arrays - Assignments + // Assigning null to an array variable should work Assert.IsTrue(Simple_TestClass_assign_badass_01.testMethod()); } [TestMethod] public void Simple_assign_badass_03_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning a smaller array to a bigger array should work"); + // Arrays - Assignments + // Assigning a smaller array to a bigger array should work Assert.IsTrue(Simple_TestClass_assign_badass_03.testMethod()); } [TestMethod] public void Simple_assign_badass_04_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning a bigger array to a smaller array should work"); + // Arrays - Assignments + // Assigning a bigger array to a smaller array should work Assert.IsTrue(Simple_TestClass_assign_badass_04.testMethod()); } [TestMethod] public void Simple_assign_element_01_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning one element to another element of the same array should work"); + // Arrays - Assignments + // Assigning one element to another element of the same array should work Assert.IsTrue(Simple_TestClass_assign_element_01.testMethod()); } [TestMethod] public void Simple_assign_element_02_Test() { - OutputHelper.WriteLine(" Arrays - Assignments"); - OutputHelper.WriteLine(" Assigning one element to another element of a different array should work"); + // Arrays - Assignments + // Assigning one element to another element of a different array should work Assert.IsTrue(Simple_TestClass_assign_element_02.testMethod()); } [TestMethod] public void Simple_assign_argpass_01_Test() { - OutputHelper.WriteLine(" Arrays - Assignments - Passing elements to methods"); - OutputHelper.WriteLine(" Passing an element to a function should work"); + // Arrays - Assignments - Passing elements to methods + // Passing an element to a function should work Assert.IsTrue(Simple_TestClass_assign_argpass_01.testMethod()); } [TestMethod] public void Simple_assign_argpass_02_Test() { - OutputHelper.WriteLine(" Arrays - Assignments - Passing elements to methods"); - OutputHelper.WriteLine(" Passing an element to a function as a ref parameter should work"); + // Arrays - Assignments - Passing elements to methods + // Passing an element to a function as a ref parameter should work Assert.IsTrue(Simple_TestClass_assign_argpass_02.testMethod()); } [TestMethod] public void Simple_assign_argpass_03_Test() { - OutputHelper.WriteLine(" Arrays - Assignments - Passing elements to methods"); - OutputHelper.WriteLine(" Passing an element to a function as an out parameter should work"); + // Arrays - Assignments - Passing elements to methods + // Passing an element to a function as an out parameter should work Assert.IsTrue(Simple_TestClass_assign_argpass_03.testMethod()); } [TestMethod] public void Simple_object_sysarr_01_Test() { - OutputHelper.WriteLine(" Arrays - As Object and System.Array"); - OutputHelper.WriteLine(" Testing the System.Array methods and Properties: System.Array.Clear()"); + // Arrays - As Object and System.Array + // Testing the System.Array methods and Properties: System.Array.Clear() Assert.IsTrue(Simple_TestClass_object_sysarr_01.testMethod()); } [TestMethod] public void Simple_object_sysarr_02_Test() { - OutputHelper.WriteLine(" Arrays - As Object and System.Array"); - OutputHelper.WriteLine(" Testing the System.Array methods and Properties: Length property"); + // Arrays - As Object and System.Array + // Testing the System.Array methods and Properties: Length property Assert.IsTrue(Simple_TestClass_object_sysarr_02.testMethod()); } @@ -1192,7 +1192,7 @@ public static int Main_old() } catch (System.Exception) { - OutputHelper.WriteLine("Out Of Memory System.Exception"); + // Out Of Memory System.Exception } return 1; } diff --git a/Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs b/Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs index e22bf662..511f56fc 100644 --- a/Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs +++ b/Tests/NFUnitTestAttributes/UnitTestAttributesTest1.cs @@ -17,28 +17,28 @@ public class UnitTestAttributesTest1 [TestMethod] public void Attrib_attrib000_Test() { - OutputHelper.WriteLine("Declare a basic attribute class, example from C# Language reference, 1.1"); + // Declare a basic attribute class, example from C# Language reference, 1.1 Assert.IsTrue(Attrib_TestClass_attrib000.testMethod()); } [TestMethod] public void Attrib_attrib000_2_Test() { - OutputHelper.WriteLine("17.1 - A non-abstract attribute class must have public accessibility."); + // 17.1 - A non-abstract attribute class must have public accessibility. Assert.IsTrue(Attrib_TestClass_attrib000_2.testMethod()); } [TestMethod] public void Attrib_attrib001_Test() { - OutputHelper.WriteLine("Declare a basic attribute class, example from C# Language reference, 1.1"); + // Declare a basic attribute class, example from C# Language reference, 1.1 Assert.IsTrue(Attrib_TestClass_attrib001.testMethod()); } [TestMethod] public void Attrib_attrib002_Test() { - OutputHelper.WriteLine("Declare a basic attribute class, example from C# Language reference, 1.1"); + // Declare a basic attribute class, example from C# Language reference, 1.1 Assert.IsTrue(Attrib_TestClass_attrib002.testMethod()); } @@ -46,14 +46,14 @@ public void Attrib_attrib002_Test() //[TestMethod] //public void Attrib_attrib017_7a_Test() //{ - // OutputHelper.WriteLine("17.4.5 test of conditional when DEBUG is undefined"); + // // 17.4.5 test of conditional when DEBUG is undefined // Assert.IsTrue(Attrib_TestClass_attrib017_7a.testMethod()); //} [TestMethod] public void Attrib_attrib017_8c_Test() { - OutputHelper.WriteLine("17.4.5 - Example from CLR"); + // 17.4.5 - Example from CLR Assert.IsTrue(Attrib_TestClass_attrib017_8c.testMethod()); } @@ -61,70 +61,70 @@ public void Attrib_attrib017_8c_Test() [TestMethod] public void Attrib_attrib021_2_Test() { - OutputHelper.WriteLine("CLR 17.4.9 - guid Attribute"); + // CLR 17.4.9 - guid Attribute Assert.IsTrue(Attrib_TestClass_attrib021_2.testMethod()); } [TestMethod] public void Attrib_attrib021_4_Test() { - OutputHelper.WriteLine("CLR 17.4.9 - guid Attribute"); + // CLR 17.4.9 - guid Attribute Assert.IsTrue(Attrib_TestClass_attrib021_4.testMethod()); } [TestMethod] public void Attrib_attrib029_8_Test() { - OutputHelper.WriteLine("CLR 17.4.19 - obsolete"); - OutputHelper.WriteLine("obsolete can be used on any declaration, but should be able to call"); - OutputHelper.WriteLine("obsolete methods"); + // CLR 17.4.19 - obsolete + // obsolete can be used on any declaration, but should be able to call + // obsolete methods Assert.IsTrue(Attrib_TestClass_attrib029_8.testMethod()); } [TestMethod] public void Attrib_attrib029_9_Test() { - OutputHelper.WriteLine("CLR 17.4.19 - obsolete"); - OutputHelper.WriteLine("obsolete can be used on any declaration, but should be able to call"); - OutputHelper.WriteLine("obsolete methods"); + // CLR 17.4.19 - obsolete + // obsolete can be used on any declaration, but should be able to call + // obsolete methods Assert.IsTrue(Attrib_TestClass_attrib029_9.testMethod()); } [TestMethod] public void Attrib_attrib029_a_Test() { - OutputHelper.WriteLine("CLR 17.4.19 - obsolete"); - OutputHelper.WriteLine("obsolete can be used on any declaration, but should be able to call"); - OutputHelper.WriteLine("obsolete methods"); + // CLR 17.4.19 - obsolete + // obsolete can be used on any declaration, but should be able to call + // obsolete methods Assert.IsTrue(Attrib_TestClass_attrib029_a.testMethod()); } [TestMethod] public void Attrib_attrib029_b_Test() { - OutputHelper.WriteLine("CLR 17.4.19 - obsolete"); - OutputHelper.WriteLine("obsolete can be used on any declaration, but overrides should generate warning"); + // CLR 17.4.19 - obsolete + // obsolete can be used on any declaration, but overrides should generate warning Assert.IsTrue(Attrib_TestClass_attrib029_b.testMethod()); } [TestMethod] public void Attrib_attrib031_4_Test() { - OutputHelper.WriteLine("CLR 17.4.22 - serializable Attribute"); + // CLR 17.4.22 - serializable Attribute Assert.IsTrue(Attrib_TestClass_attrib031_4.testMethod()); } [TestMethod] public void Attrib_attrib032_2_Test() { - OutputHelper.WriteLine("CLR 17.4.23 - structlayout Attribute"); + // CLR 17.4.23 - structlayout Attribute Assert.IsTrue(Attrib_TestClass_attrib032_2.testMethod()); } [TestMethod] public void Attrib_attrib033_2_Test() { - OutputHelper.WriteLine("Attribute usage is inherited."); + // Attribute usage is inherited. Assert.IsTrue(Attrib_TestClass_attrib033_2.testMethod()); } @@ -134,7 +134,7 @@ public void Attrib_attrib033_2_Test() [TestMethod] public void Attrib_attrib035_12_Test() { - OutputHelper.WriteLine("Make sure that assembly level GuidAttribute appears in assembly"); + // Make sure that assembly level GuidAttribute appears in assembly Assert.IsTrue(Attrib_TestClass_attrib035_12.testMethod()) { return MFTestResults.Pass; @@ -144,7 +144,7 @@ public void Attrib_attrib035_12_Test() [TestMethod] public void Attrib_attrib035_22_Test() { - OutputHelper.WriteLine("Make sure that assembly level GuidAttribute appears in assembly"); + // Make sure that assembly level GuidAttribute appears in assembly Assert.IsTrue(Attrib_TestClass_attrib035_22.testMethod()) { return MFTestResults.Pass; @@ -156,64 +156,64 @@ public void Attrib_attrib035_22_Test() [TestMethod] public void Attrib_attrib036_1_Test() { - OutputHelper.WriteLine("17.1 - A top-level, non-abstract attribute class must have public or"); - OutputHelper.WriteLine("internal accessibility. Nested attribute classes may also be private,"); - OutputHelper.WriteLine("protected, or protected internal."); + // 17.1 - A top-level, non-abstract attribute class must have public or + // internal accessibility. Nested attribute classes may also be private, + // protected, or protected internal. Assert.IsTrue(Attrib_TestClass_attrib036_1.testMethod()); } [TestMethod] public void Attrib_attrib038_1_Test() { - OutputHelper.WriteLine("Verify params keyword"); + // Verify params keyword Assert.IsTrue(Attrib_TestClass_attrib038_1.testMethod()); } [TestMethod] public void Attrib_attrib047_4_Test() { - OutputHelper.WriteLine(" Make sure that ObsoleteAttribute works with following targets"); - OutputHelper.WriteLine("[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |"); - OutputHelper.WriteLine(" AttributeTargets.Enum | AttributeTargets.Constructor |"); - OutputHelper.WriteLine(" AttributeTargets.Method | AttributeTargets.Property |"); - OutputHelper.WriteLine(" AttributeTargets.Field | AttributeTargets.Event |"); - OutputHelper.WriteLine(" AttributeTargets.Interface | AttributeTargets.Delegate)]"); + // Make sure that ObsoleteAttribute works with following targets + // [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | + // AttributeTargets.Enum | AttributeTargets.Constructor | + // AttributeTargets.Method | AttributeTargets.Property | + // AttributeTargets.Field | AttributeTargets.Event | + // AttributeTargets.Interface | AttributeTargets.Delegate)] Assert.IsTrue(Attrib_TestClass_attrib047_4.testMethod()); } [TestMethod] public void Attrib_attrib047_5_Test() { - OutputHelper.WriteLine(" Make sure that ObsoleteAttribute works with following targets"); - OutputHelper.WriteLine("[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |"); - OutputHelper.WriteLine(" AttributeTargets.Enum | AttributeTargets.Constructor |"); - OutputHelper.WriteLine(" AttributeTargets.Method | AttributeTargets.Property |"); - OutputHelper.WriteLine(" AttributeTargets.Field | AttributeTargets.Event |"); - OutputHelper.WriteLine(" AttributeTargets.Interface | AttributeTargets.Delegate)]"); + // Make sure that ObsoleteAttribute works with following targets + // [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | + // AttributeTargets.Enum | AttributeTargets.Constructor | + // AttributeTargets.Method | AttributeTargets.Property | + // AttributeTargets.Field | AttributeTargets.Event | + // AttributeTargets.Interface | AttributeTargets.Delegate)] Assert.IsTrue(Attrib_TestClass_attrib047_5.testMethod()); } [TestMethod] public void Attrib_attrib049_4_Test() { - OutputHelper.WriteLine("Bad named attribute argumements should be an error"); + // Bad named attribute argumements should be an error Assert.IsTrue(Attrib_TestClass_attrib049_4.testMethod()); } [TestMethod] public void Attrib_attrib054_Test() { - OutputHelper.WriteLine("ECMA complaince: support special attribute name binding rules with @ identifier"); - OutputHelper.WriteLine("explictly specify attribute location with @"); + // ECMA complaince: support special attribute name binding rules with @ identifier + // explictly specify attribute location with @ Assert.IsTrue(Attrib_TestClass_attrib054.testMethod()); } [TestMethod] public void Attrib_attrib062_Test() { - OutputHelper.WriteLine("Declare a derived attribute after declaring its base."); - OutputHelper.WriteLine("Attributes can inherit from other attirubtes that have not yet been declared as long as there are no"); - OutputHelper.WriteLine("circular dependencies."); + // Declare a derived attribute after declaring its base. + // Attributes can inherit from other attirubtes that have not yet been declared as long as there are no + // circular dependencies. Assert.IsTrue(Attrib_TestClass_attrib062.testMethod()); } @@ -295,7 +295,7 @@ public class Attrib_TestClass_attrib017_7a_C1 public static void M() { Attrib_TestClass_attrib017_7a.retval++; - OutputHelper.WriteLine("Executed Attrib_TestClass_attrib017_7a_C1.M"); + // Executed Attrib_TestClass_attrib017_7a_C1.M } } public class Attrib_TestClass_attrib017_7a_C2 @@ -325,7 +325,7 @@ class Attrib_TestClass_attrib017_8c_C1 [Conditional("DEBUG")] public static void C1() { - OutputHelper.WriteLine("Executed Class1.C1()"); + // Executed Class1.C1() } } @@ -333,7 +333,7 @@ class Attrib_TestClass_attrib017_8c_C2 { public static void C2() { - OutputHelper.WriteLine("Executed Class2.C2()"); + // Executed Class2.C2() Attrib_TestClass_attrib017_8c_C1.C1(); // C1 is called } } @@ -342,7 +342,7 @@ class Attrib_TestClass_attrib017_8c_C3 { public static void C4() { - OutputHelper.WriteLine("Executed Attrib_TestClass_attrib017_8c_C3.C4()"); + // Executed Attrib_TestClass_attrib017_8c_C3.C4() Attrib_TestClass_attrib017_8c_C1.C1(); } } @@ -437,10 +437,17 @@ public static int Main_old() retval -= 2; Attrib_TestClass_attrib029_8_S1 s1 = new Attrib_TestClass_attrib029_8_S1(); s1.j = 10; + if (10 == s1.j) + { retval -= 4; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval==" + retval.ToString()); + } + + if (0 != retval) + { + OutputHelper.WriteLine("FAIL, retval==" + retval.ToString()); + } + return retval; } public static bool testMethod() @@ -478,10 +485,17 @@ public static int Main_old() if (anInt == 5) retval -= 2; Attrib_TestClass_attrib029_9_S1 s1 = new Attrib_TestClass_attrib029_9_S1(); + if (10 == s1.S1Method(10)) + { retval -= 4; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval==" + retval.ToString()); + } + + if (0 != retval) + { + OutputHelper.WriteLine("FAIL, retval==" + retval.ToString()); + } + return retval; } public static bool testMethod() @@ -519,10 +533,17 @@ public static int Main_old() retval -= 1; Attrib_TestClass_attrib029_a_S1 s1 = new Attrib_TestClass_attrib029_a_S1(); s1.j = 10; + if (10 == s1.j) + { retval -= 2; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval==" + retval.ToString()); + } + + if (0 != retval) + { + OutputHelper.WriteLine("FAIL, retval==" + retval.ToString()); + } + return retval; } public static bool testMethod() @@ -554,10 +575,17 @@ public static int Main_old() { Attrib_TestClass_attrib029_b_C1 c1 = new Attrib_TestClass_attrib029_b_C1(); int anInt = c1.C1Method(5); + if (anInt == 5) + { retval -= 2; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval==" + retval.ToString()); + } + + if (0 == retval) + { + OutputHelper.WriteLine("FAIL, retval==" + retval.ToString()); + } + return retval; } public static bool testMethod() @@ -574,10 +602,10 @@ public static int Main_old() { if (typeof(Attrib_TestClass_attrib031_4_C1).IsSerializable) { - OutputHelper.WriteLine("PASS"); + // PASS return 0; } - OutputHelper.WriteLine("FAIL"); + // FAIL return 1; } public static bool testMethod() @@ -642,7 +670,7 @@ public static int Main_old() retval -= 2; } catch { } //Just keep the program from dying - if (retval == 0) OutputHelper.WriteLine("PASS"); + if (retval == 0) // PASS else OutputHelper.WriteLine("FAIL, retval == {0}", retval); return retval; } @@ -657,7 +685,7 @@ public static int Main_old() { Attrib_TestClass_attrib035_22_C5 x = new Attrib_TestClass_attrib035_22_C5(); int retval = x.MyMethod(); - if (retval == 0) OutputHelper.WriteLine("PASS"); + if (retval == 0) // PASS else OutputHelper.WriteLine("FAIL, retval == {0}", retval); return retval; } @@ -709,7 +737,7 @@ public class Attrib_TestClass_attrib038_1_C1 { public void Attrib_TestClass_attrib038_1(params int[] numbers) { - OutputHelper.WriteLine("Called with " + numbers.Length.ToString() + " args"); + // Called with " + numbers.Length.ToString() + " args } } public class Attrib_TestClass_attrib038_1 diff --git a/Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs b/Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs index 29d8ec60..54aa877a 100644 --- a/Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs +++ b/Tests/NFUnitTestBasicConcepts/UnitTestBasicConceptsTests.cs @@ -16,1241 +16,1241 @@ public class UnitTestBasicConceptsTests [TestMethod] public void Basic_scope001_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a namespace member declared by"); - OutputHelper.WriteLine("a namespace-member-declaration with no enclosing"); - OutputHelper.WriteLine("namespace-declaration is the entire program text"); - OutputHelper.WriteLine("of each compilation unit."); + // Section 3.5 + // The scope of a namespace member declared by + // a namespace-member-declaration with no enclosing + // namespace-declaration is the entire program text + // of each compilation unit. Assert.IsTrue(Basic_TestClass_scope001.testMethod()); } [TestMethod] public void Basic_scope002_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a namespace member declared by a "); - OutputHelper.WriteLine("namespace-member-declaration within a "); - OutputHelper.WriteLine("namespace-declaration whose fully qualified name"); - OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); - OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); - OutputHelper.WriteLine("sequence of indentifiers as N."); + // Section 3.5 + // The scope of a namespace member declared by a + // namespace-member-declaration within a + // namespace-declaration whose fully qualified name + // is N is the namespace-body of every namespace-declaration + // whose fully qualified name is N or starts with the same + // sequence of indentifiers as N. Assert.IsTrue(NS_Basic_TestClass_scope002.Basic_TestClass_scope002.testMethod()); } [TestMethod] public void Basic_scope003_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a namespace member declared by a "); - OutputHelper.WriteLine("namespace-member-declaration within a "); - OutputHelper.WriteLine("namespace-declaration whose fully qualified name"); - OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); - OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); - OutputHelper.WriteLine("sequence of indentifiers as N."); + // Section 3.5 + // The scope of a namespace member declared by a + // namespace-member-declaration within a + // namespace-declaration whose fully qualified name + // is N is the namespace-body of every namespace-declaration + // whose fully qualified name is N or starts with the same + // sequence of indentifiers as N. Assert.IsTrue(NS_Basic_TestClass_scope003.Basic_TestClass_scope003.testMethod()); } [TestMethod] public void Basic_scope004_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a namespace member declared by a "); - OutputHelper.WriteLine("namespace-member-declaration within a "); - OutputHelper.WriteLine("namespace-declaration whose fully qualified name"); - OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); - OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); - OutputHelper.WriteLine("sequence of indentifiers as N."); + // Section 3.5 + // The scope of a namespace member declared by a + // namespace-member-declaration within a + // namespace-declaration whose fully qualified name + // is N is the namespace-body of every namespace-declaration + // whose fully qualified name is N or starts with the same + // sequence of indentifiers as N. Assert.IsTrue(NS_Basic_TestClass_scope004.NS_Basic_TestClass_scope004_2.Basic_TestClass_scope004.testMethod()); } [TestMethod] public void Basic_scope005_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a namespace member declared by a "); - OutputHelper.WriteLine("namespace-member-declaration within a "); - OutputHelper.WriteLine("namespace-declaration whose fully qualified name"); - OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); - OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); - OutputHelper.WriteLine("sequence of indentifiers as N."); + // Section 3.5 + // The scope of a namespace member declared by a + // namespace-member-declaration within a + // namespace-declaration whose fully qualified name + // is N is the namespace-body of every namespace-declaration + // whose fully qualified name is N or starts with the same + // sequence of indentifiers as N. Assert.IsTrue(NS_Basic_TestClass_scope005.NS_Basic_TestClass_scope005_2.Basic_TestClass_scope005.testMethod()); } [TestMethod] public void Basic_scope006_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a namespace member declared by a "); - OutputHelper.WriteLine("namespace-member-declaration within a "); - OutputHelper.WriteLine("namespace-declaration whose fully qualified name"); - OutputHelper.WriteLine("is N is the namespace-body of every namespace-declaration"); - OutputHelper.WriteLine("whose fully qualified name is N or starts with the same "); - OutputHelper.WriteLine("sequence of indentifiers as N."); + // Section 3.5 + // The scope of a namespace member declared by a + // namespace-member-declaration within a + // namespace-declaration whose fully qualified name + // is N is the namespace-body of every namespace-declaration + // whose fully qualified name is N or starts with the same + // sequence of indentifiers as N. Assert.IsTrue(NS_Basic_TestClass_scope006.NS_Basic_TestClass_scope006_2.Basic_TestClass_scope006.testMethod()); } [TestMethod] public void Basic_scope012_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a name defined or imported by a using-directive"); - OutputHelper.WriteLine("extends over the namespace-member-declarations of the"); - OutputHelper.WriteLine("compilation-unit or namespace-body in which the using-directive"); - OutputHelper.WriteLine("occurs."); + // Section 3.5 + // The scope of a name defined or imported by a using-directive + // extends over the namespace-member-declarations of the + // compilation-unit or namespace-body in which the using-directive + // occurs. Assert.IsTrue(NS_Basic_TestClass_scope012.Basic_TestClass_scope012.testMethod()); } [TestMethod] public void Basic_scope019_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a member declared by a class-member-declaration"); - OutputHelper.WriteLine("is the class body in which the declaration occurs."); + // Section 3.5 + // The scope of a member declared by a class-member-declaration + // is the class body in which the declaration occurs. Assert.IsTrue(Basic_TestClass_scope019.testMethod()); } [TestMethod] public void Basic_scope022_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a member declared by a class-member-declaration"); - OutputHelper.WriteLine("is the class body in which the declaration occurs. In addition,"); - OutputHelper.WriteLine("the scope of a class member extends to the class-body of those"); - OutputHelper.WriteLine("derived classes that are included in the accessibility domain"); - OutputHelper.WriteLine("of the member."); + // Section 3.5 + // The scope of a member declared by a class-member-declaration + // is the class body in which the declaration occurs. In addition, + // the scope of a class member extends to the class-body of those + // derived classes that are included in the accessibility domain + // of the member. Assert.IsTrue(Basic_TestClass_scope022.testMethod()); } [TestMethod] public void Basic_scope023_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a member declared by a class-member-declaration"); - OutputHelper.WriteLine("is the class body in which the declaration occurs. In addition,"); - OutputHelper.WriteLine("the scope of a class member extends to the class-body of those"); - OutputHelper.WriteLine("derived classes that are included in the accessibility domain"); - OutputHelper.WriteLine("of the member."); + // Section 3.5 + // The scope of a member declared by a class-member-declaration + // is the class body in which the declaration occurs. In addition, + // the scope of a class member extends to the class-body of those + // derived classes that are included in the accessibility domain + // of the member. Assert.IsTrue(Basic_TestClass_scope023.testMethod()); } [TestMethod] public void Basic_scope024_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a member declared by a class-member-declaration"); - OutputHelper.WriteLine("is the class body in which the declaration occurs. In addition,"); - OutputHelper.WriteLine("the scope of a class member extends to the class-body of those"); - OutputHelper.WriteLine("derived classes that are included in the accessibility domain"); - OutputHelper.WriteLine("of the member."); + // Section 3.5 + // The scope of a member declared by a class-member-declaration + // is the class body in which the declaration occurs. In addition, + // the scope of a class member extends to the class-body of those + // derived classes that are included in the accessibility domain + // of the member. Assert.IsTrue(Basic_TestClass_scope024.testMethod()); } [TestMethod] public void Basic_scope025_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a member declared by a struct-member-declaration"); - OutputHelper.WriteLine("is the struct-body in which the declaration occurs."); + // Section 3.5 + // The scope of a member declared by a struct-member-declaration + // is the struct-body in which the declaration occurs. Assert.IsTrue(Basic_TestClass_scope025.testMethod()); } [TestMethod] public void Basic_scope027_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a member declared by an enum-member-declaration"); - OutputHelper.WriteLine("is the enum-body in which the declaration occurs."); + // Section 3.5 + // The scope of a member declared by an enum-member-declaration + // is the enum-body in which the declaration occurs. Assert.IsTrue(Basic_TestClass_scope027.testMethod()); } [TestMethod] public void Basic_scope029_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a parameter declared in a constructor-declaration"); - OutputHelper.WriteLine("is the constructor-initializer and the block of that "); - OutputHelper.WriteLine("constructor-declaration."); + // Section 3.5 + // The scope of a parameter declared in a constructor-declaration + // is the constructor-initializer and the block of that + // constructor-declaration. Assert.IsTrue(Basic_TestClass_scope029.testMethod()); } [TestMethod] public void Basic_scope033_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a parameter declared in a method-declaration"); - OutputHelper.WriteLine("is the method-body of that method-declaration."); + // Section 3.5 + // The scope of a parameter declared in a method-declaration + // is the method-body of that method-declaration. Assert.IsTrue(Basic_TestClass_scope033.testMethod()); } [TestMethod] public void Basic_scope037_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a parameter declared in an indexer-declaration"); - OutputHelper.WriteLine("is the accessor-declarations of that indexer-declaration."); + // Section 3.5 + // The scope of a parameter declared in an indexer-declaration + // is the accessor-declarations of that indexer-declaration. Assert.IsTrue(Basic_TestClass_scope037.testMethod()); } [TestMethod] public void Basic_scope041_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a parameter declared in an operator-declaration"); - OutputHelper.WriteLine("is the block of that operator-declaration."); + // Section 3.5 + // The scope of a parameter declared in an operator-declaration + // is the block of that operator-declaration. Assert.IsTrue(Basic_TestClass_scope041.testMethod()); } [TestMethod] public void Basic_scope044_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a local variable declared in a local-variable-declaration"); - OutputHelper.WriteLine("is the block in which the declaration occurs. It is an error to refer to"); - OutputHelper.WriteLine("a lcaol variable in a textual position that precedes the variable-declaratior"); - OutputHelper.WriteLine("of the local variable."); + // Section 3.5 + // The scope of a local variable declared in a local-variable-declaration + // is the block in which the declaration occurs. It is an error to refer to + // a lcaol variable in a textual position that precedes the variable-declaratior + // of the local variable. Assert.IsTrue(Basic_TestClass_scope044.testMethod()); } [TestMethod] public void Basic_scope051_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a local variable in a for-initializer of a "); - OutputHelper.WriteLine("for statement is the for-initializer, the for-condition,"); - OutputHelper.WriteLine("the for-iterator, and the contained statement of the for"); - OutputHelper.WriteLine("statement."); + // Section 3.5 + // The scope of a local variable in a for-initializer of a + // for statement is the for-initializer, the for-condition, + // the for-iterator, and the contained statement of the for + // statement. Assert.IsTrue(Basic_TestClass_scope051.testMethod()); } [TestMethod] public void Basic_scope053_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a label declared in a label-statement"); - OutputHelper.WriteLine("is the block in which the declaration occurs."); + // Section 3.5 + // The scope of a label declared in a label-statement + // is the block in which the declaration occurs. Assert.IsTrue(Basic_TestClass_scope053.testMethod()); } [TestMethod] public void Basic_scope055_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a label declared in a label-statement"); - OutputHelper.WriteLine("is the block in which the declaration occurs."); + // Section 3.5 + // The scope of a label declared in a label-statement + // is the block in which the declaration occurs. Assert.IsTrue(Basic_TestClass_scope055.testMethod()); } [TestMethod] public void Basic_scope056_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("Within the scope of a namespace, class,"); - OutputHelper.WriteLine("struct, interface, or enumeration member "); - OutputHelper.WriteLine("it is possible to refer to the member in "); - OutputHelper.WriteLine("a textual position that precedes the "); - OutputHelper.WriteLine("declaration of the member."); + // Section 3.5 + // Within the scope of a namespace, class, + // struct, interface, or enumeration member + // it is possible to refer to the member in + // a textual position that precedes the + // declaration of the member. Assert.IsTrue(NS_Basic_TestClass_scope056.Basic_TestClass_scope056.testMethod()); } [TestMethod] public void Basic_scope057_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("Within the scope of a namespace, class,"); - OutputHelper.WriteLine("struct, interface, or enumeration member "); - OutputHelper.WriteLine("it is possible to refer to the member in "); - OutputHelper.WriteLine("a textual position that precedes the "); - OutputHelper.WriteLine("declaration of the member."); + // Section 3.5 + // Within the scope of a namespace, class, + // struct, interface, or enumeration member + // it is possible to refer to the member in + // a textual position that precedes the + // declaration of the member. Assert.IsTrue(Basic_TestClass_scope057.testMethod()); } [TestMethod] public void Basic_scope058_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("Within the scope of a namespace, class,"); - OutputHelper.WriteLine("struct, interface, or enumeration member "); - OutputHelper.WriteLine("it is possible to refer to the member in "); - OutputHelper.WriteLine("a textual position that precedes the "); - OutputHelper.WriteLine("declaration of the member."); + // Section 3.5 + // Within the scope of a namespace, class, + // struct, interface, or enumeration member + // it is possible to refer to the member in + // a textual position that precedes the + // declaration of the member. Assert.IsTrue(Basic_TestClass_scope058.testMethod()); } [TestMethod] public void Basic_scope059_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("Within the scope of a namespace, class,"); - OutputHelper.WriteLine("struct, interface, or enumeration member "); - OutputHelper.WriteLine("it is possible to refer to the member in "); - OutputHelper.WriteLine("a textual position that precedes the "); - OutputHelper.WriteLine("declaration of the member."); + // Section 3.5 + // Within the scope of a namespace, class, + // struct, interface, or enumeration member + // it is possible to refer to the member in + // a textual position that precedes the + // declaration of the member. Assert.IsTrue(Basic_TestClass_scope059.testMethod()); } [TestMethod] public void Basic_scope061_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("Witin the scope of a local variable, it is an"); - OutputHelper.WriteLine("error to refer to the local variable in a "); - OutputHelper.WriteLine("textual position that precedes the"); - OutputHelper.WriteLine("variable-declarator of the local variable."); + // Section 3.5 + // Witin the scope of a local variable, it is an + // error to refer to the local variable in a + // textual position that precedes the + // variable-declarator of the local variable. Assert.IsTrue(Basic_TestClass_scope061.testMethod()); } [TestMethod] public void Basic_scope062_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The meaning of a name within a block may differ"); - OutputHelper.WriteLine("based on the context in which the name is used."); + // Section 3.5 + // The meaning of a name within a block may differ + // based on the context in which the name is used. Assert.IsTrue(Basic_TestClass_scope062.testMethod()); } [TestMethod] public void Basic_scope063_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_scope063.testMethod()); } [TestMethod] public void Basic_scope064_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_scope064.testMethod()); } [TestMethod] public void Basic_scope067_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_scope067.testMethod()); } [TestMethod] public void Basic_scope068_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_scope068.testMethod()); } [TestMethod] public void Basic_scope069_Test() { - OutputHelper.WriteLine("Section 3"); + // Section 3 Assert.IsTrue(Basic_TestClass_scope069.testMethod()); } [TestMethod] public void Basic_scope070_Test() { - OutputHelper.WriteLine("Section 3"); + // Section 3 Assert.IsTrue(Basic_TestClass_scope070.testMethod()); } [TestMethod] public void Basic_scope071_Test() { - OutputHelper.WriteLine("Section 3"); + // Section 3 Assert.IsTrue(Basic_TestClass_scope071.testMethod()); } [TestMethod] public void Basic_scope074_Test() { - OutputHelper.WriteLine("Section 3.5"); - OutputHelper.WriteLine("The scope of a label declared in a label-statement"); - OutputHelper.WriteLine("is the block in which the declaration occurs."); + // Section 3.5 + // The scope of a label declared in a label-statement + // is the block in which the declaration occurs. Assert.IsTrue(Basic_TestClass_scope074.testMethod()); } [TestMethod] public void Basic_nhide001_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide001.Basic_TestClass_nhide001.testMethod()); } [TestMethod] public void Basic_nhide002_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide002.Basic_TestClass_nhide002.testMethod()); } [TestMethod] public void Basic_nhide003_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide003.Basic_TestClass_nhide003.testMethod()); } [TestMethod] public void Basic_nhide004_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide004.Basic_TestClass_nhide004.testMethod()); } [TestMethod] public void Basic_nhide005_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide005.Basic_TestClass_nhide005.testMethod()); } [TestMethod] public void Basic_nhide006_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide006.Basic_TestClass_nhide006.testMethod()); } [TestMethod] public void Basic_nhide007_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide007.testMethod()); } [TestMethod] public void Basic_nhide008_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide008.Basic_TestClass_nhide008.testMethod()); } [TestMethod] public void Basic_nhide009_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide009.Basic_TestClass_nhide009.testMethod()); } [TestMethod] public void Basic_nhide010_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide010.Basic_TestClass_nhide010.testMethod()); } [TestMethod] public void Basic_nhide011_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide011.Basic_TestClass_nhide011.testMethod()); } [TestMethod] public void Basic_nhide012_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide012.Basic_TestClass_nhide012.testMethod()); } [TestMethod] public void Basic_nhide013_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(NS_Basic_TestClass_nhide013.Basic_TestClass_nhide013.testMethod()); } [TestMethod] public void Basic_nhide014_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide014.testMethod()); } [TestMethod] public void Basic_nhide015_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide015.testMethod()); } [TestMethod] public void Basic_nhide016_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide016.testMethod()); } [TestMethod] public void Basic_nhide017_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide017.testMethod()); } [TestMethod] public void Basic_nhide018_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide018.testMethod()); } [TestMethod] public void Basic_nhide019_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide019.testMethod()); } [TestMethod] public void Basic_nhide020_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide020.testMethod()); } [TestMethod] public void Basic_nhide021_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide021.testMethod()); } [TestMethod] public void Basic_nhide022_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide022.testMethod()); } [TestMethod] public void Basic_nhide023_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide023.testMethod()); } [TestMethod] public void Basic_nhide024_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide024.testMethod()); } [TestMethod] public void Basic_nhide025_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide025.testMethod()); } [TestMethod] public void Basic_nhide026_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide026.testMethod()); } [TestMethod] public void Basic_nhide027_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide027.testMethod()); } [TestMethod] public void Basic_nhide028_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide028.testMethod()); } [TestMethod] public void Basic_nhide029_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide029.testMethod()); } [TestMethod] public void Basic_nhide030_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide030.testMethod()); } [TestMethod] public void Basic_nhide031_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide031.testMethod()); } [TestMethod] public void Basic_nhide032_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide032.testMethod()); } [TestMethod] public void Basic_nhide033_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide033.testMethod()); } [TestMethod] public void Basic_nhide034_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide034.testMethod()); } [TestMethod] public void Basic_nhide035_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide035.testMethod()); } [TestMethod] public void Basic_nhide036_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide036.testMethod()); } [TestMethod] public void Basic_nhide037_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide037.testMethod()); } [TestMethod] public void Basic_nhide038_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide038.testMethod()); } [TestMethod] public void Basic_nhide039_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide039.testMethod()); } [TestMethod] public void Basic_nhide040_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide040.testMethod()); } [TestMethod] public void Basic_nhide041_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide041.testMethod()); } [TestMethod] public void Basic_nhide042_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide042.testMethod()); } [TestMethod] public void Basic_nhide043_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide043.testMethod()); } [TestMethod] public void Basic_nhide044_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Name hiding through nesting can occur as a result of"); - OutputHelper.WriteLine("nesting namespaces or types within namespaces, as a "); - OutputHelper.WriteLine("result of nesting types within classes or structs,"); - OutputHelper.WriteLine("and as a result of parameter and local variable"); - OutputHelper.WriteLine("declarations. Name hiding through nesting of scopes"); - OutputHelper.WriteLine("always occurs silently, i.e. no errors or warnings"); - OutputHelper.WriteLine("are reported when outer names are hidden by inner names."); + // Section 3.5.1 + // Name hiding through nesting can occur as a result of + // nesting namespaces or types within namespaces, as a + // result of nesting types within classes or structs, + // and as a result of parameter and local variable + // declarations. Name hiding through nesting of scopes + // always occurs silently, i.e. no errors or warnings + // are reported when outer names are hidden by inner names. Assert.IsTrue(Basic_TestClass_nhide044.testMethod()); } [TestMethod] public void Basic_nhide045_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide045.testMethod()); } [TestMethod] public void Basic_nhide047_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide047.testMethod()); } [TestMethod] public void Basic_nhide049_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide049.testMethod()); } [TestMethod] public void Basic_nhide050_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide050.testMethod()); } [TestMethod] public void Basic_nhide051_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide051.testMethod()); } [TestMethod] public void Basic_nhide053_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide053.testMethod()); } [TestMethod] public void Basic_nhide055_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide055.testMethod()); } [TestMethod] public void Basic_nhide056_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide056.testMethod()); } [TestMethod] public void Basic_nhide057_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide057.testMethod()); } [TestMethod] public void Basic_nhide059_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("When a name in an inner scope hides a name"); - OutputHelper.WriteLine("in an outer scope, it hides all overloaded "); - OutputHelper.WriteLine("occurrences of that name."); + // Section 3.5.1 + // When a name in an inner scope hides a name + // in an outer scope, it hides all overloaded + // occurrences of that name. Assert.IsTrue(Basic_TestClass_nhide059.testMethod()); } [TestMethod] public void Basic_nhide061_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A constant, field, property, event or type introduced"); - OutputHelper.WriteLine("in a class or struct hides all base class members with the "); - OutputHelper.WriteLine("same name."); + // Section 3.5.1 + // A constant, field, property, event or type introduced + // in a class or struct hides all base class members with the + // same name. Assert.IsTrue(Basic_TestClass_nhide061.testMethod()); } [TestMethod] public void Basic_nhide062_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A constant, field, property, event or type introduced"); - OutputHelper.WriteLine("in a class or struct hides all base class members with the "); - OutputHelper.WriteLine("same name."); + // Section 3.5.1 + // A constant, field, property, event or type introduced + // in a class or struct hides all base class members with the + // same name. Assert.IsTrue(Basic_TestClass_nhide062.testMethod()); } [TestMethod] public void Basic_nhide063_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A constant, field, property, event or type introduced"); - OutputHelper.WriteLine("in a class or struct hides all base class members with the "); - OutputHelper.WriteLine("same name."); + // Section 3.5.1 + // A constant, field, property, event or type introduced + // in a class or struct hides all base class members with the + // same name. Assert.IsTrue(Basic_TestClass_nhide063.testMethod()); } [TestMethod] public void Basic_nhide064_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A constant, field, property, event or type introduced"); - OutputHelper.WriteLine("in a class or struct hides all base class members with the "); - OutputHelper.WriteLine("same name."); + // Section 3.5.1 + // A constant, field, property, event or type introduced + // in a class or struct hides all base class members with the + // same name. Assert.IsTrue(Basic_TestClass_nhide064.testMethod()); } [TestMethod] public void Basic_nhide067_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A constant, field, property, event or type introduced"); - OutputHelper.WriteLine("in a class or struct hides all base class members with the "); - OutputHelper.WriteLine("same name."); + // Section 3.5.1 + // A constant, field, property, event or type introduced + // in a class or struct hides all base class members with the + // same name. Assert.IsTrue(Basic_TestClass_nhide067.testMethod()); } [TestMethod] public void Basic_nhide068_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A constant, field, property, event or type introduced"); - OutputHelper.WriteLine("in a class or struct hides all base class members with the "); - OutputHelper.WriteLine("same name."); + // Section 3.5.1 + // A constant, field, property, event or type introduced + // in a class or struct hides all base class members with the + // same name. Assert.IsTrue(Basic_TestClass_nhide068.testMethod()); } [TestMethod] public void Basic_nhide071_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide071.testMethod()); } [TestMethod] public void Basic_nhide072_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide072.testMethod()); } [TestMethod] public void Basic_nhide075_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide075.testMethod()); } [TestMethod] public void Basic_nhide076_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide076.testMethod()); } [TestMethod] public void Basic_nhide077_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide077.testMethod()); } [TestMethod] public void Basic_nhide079_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide079.testMethod()); } [TestMethod] public void Basic_nhide081_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide081.testMethod()); } [TestMethod] public void Basic_nhide082_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide082.testMethod()); } [TestMethod] public void Basic_nhide085_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide085.testMethod()); } [TestMethod] public void Basic_nhide086_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide086.testMethod()); } [TestMethod] public void Basic_nhide087_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). Assert.IsTrue(Basic_TestClass_nhide087.testMethod()); } [TestMethod] public void Basic_nhide088_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A method introduced in a class or a struct"); - OutputHelper.WriteLine("hides all non-method base class members with"); - OutputHelper.WriteLine("the same name, and all base class methods"); - OutputHelper.WriteLine("with the same signature (method name and"); - OutputHelper.WriteLine("parameter count, modifiers, and types)."); - OutputHelper.WriteLine("This test passes in the baseline, but is an expected Fail"); - OutputHelper.WriteLine("See bug 16852 for more details"); + // Section 3.5.1 + // A method introduced in a class or a struct + // hides all non-method base class members with + // the same name, and all base class methods + // with the same signature (method name and + // parameter count, modifiers, and types). + // This test passes in the baseline, but is an expected Fail + // See bug 16852 for more details Assert.IsTrue(Basic_TestClass_nhide088.testMethod()); } [TestMethod] public void Basic_nhide089_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("An indexer introduced in a class or a struct"); - OutputHelper.WriteLine("hides all base class indexers with the same"); - OutputHelper.WriteLine("signature (parameter count and types)."); + // Section 3.5.1 + // An indexer introduced in a class or a struct + // hides all base class indexers with the same + // signature (parameter count and types). Assert.IsTrue(Basic_TestClass_nhide089.testMethod()); } [TestMethod] public void Basic_nhide090_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("An indexer introduced in a class or a struct"); - OutputHelper.WriteLine("hides all base class indexers with the same"); - OutputHelper.WriteLine("signature (parameter count and types)."); + // Section 3.5.1 + // An indexer introduced in a class or a struct + // hides all base class indexers with the same + // signature (parameter count and types). Assert.IsTrue(Basic_TestClass_nhide090.testMethod()); } [TestMethod] public void Basic_nhide091_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("Contrary to hiding a name from an outer scope,"); - OutputHelper.WriteLine("hding an accessible name from an inherited scope"); - OutputHelper.WriteLine("causes a warning to be reported."); + // Section 3.5.1 + // Contrary to hiding a name from an outer scope, + // hding an accessible name from an inherited scope + // causes a warning to be reported. Assert.IsTrue(Basic_TestClass_nhide091.testMethod()); } [TestMethod] public void Basic_nhide092_Test() { - OutputHelper.WriteLine("Section 3.5.1"); - OutputHelper.WriteLine("A declaration of a new member hides an inherited"); - OutputHelper.WriteLine("member only within the scope of the new member."); + // Section 3.5.1 + // A declaration of a new member hides an inherited + // member only within the scope of the new member. Assert.IsTrue(Basic_TestClass_nhide092.testMethod()); } [TestMethod] public void Basic_memac009_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Then, if M is public, the access is permitted."); + // Section 3.3 + // Then, if M is public, the access is permitted. Assert.IsTrue(Basic_TestClass_memac009.testMethod()); } [TestMethod] public void Basic_memac010_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Then, if M is public, the access is permitted."); + // Section 3.3 + // Then, if M is public, the access is permitted. Assert.IsTrue(Basic_TestClass_memac010.testMethod()); } [TestMethod] public void Basic_memac011_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected internal, the access"); - OutputHelper.WriteLine("is permitted if it occurs within the project in which"); - OutputHelper.WriteLine("M is declared, or if it occurs within a class derived "); - OutputHelper.WriteLine("from the class in which M is declared and takes place "); - OutputHelper.WriteLine("through the derived class type."); + // Section 3.3 + // Otherwise, if M is protected internal, the access + // is permitted if it occurs within the project in which + // M is declared, or if it occurs within a class derived + // from the class in which M is declared and takes place + // through the derived class type. Assert.IsTrue(Basic_TestClass_memac011.testMethod()); } [TestMethod] public void Basic_memac012_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected internal, the access"); - OutputHelper.WriteLine("is permitted if it occurs within the project in which"); - OutputHelper.WriteLine("M is declared, or if it occurs within a class derived "); - OutputHelper.WriteLine("from the class in which M is declared and takes place "); - OutputHelper.WriteLine("through the derived class type."); + // Section 3.3 + // Otherwise, if M is protected internal, the access + // is permitted if it occurs within the project in which + // M is declared, or if it occurs within a class derived + // from the class in which M is declared and takes place + // through the derived class type. Assert.IsTrue(Basic_TestClass_memac012.testMethod()); } /* @@ -1259,12 +1259,12 @@ public void Basic_memac012_Test() [TestMethod] public void Basic_memac013_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected internal, the access"); - OutputHelper.WriteLine("is permitted if it occurs within the project in which"); - OutputHelper.WriteLine("M is declared, or if it occurs within a class derived "); - OutputHelper.WriteLine("from the class in which M is declared and takes place "); - OutputHelper.WriteLine("through the derived class type."); + // Section 3.3 + // Otherwise, if M is protected internal, the access + // is permitted if it occurs within the project in which + // M is declared, or if it occurs within a class derived + // from the class in which M is declared and takes place + // through the derived class type. Assert.IsTrue(Basic_TestClass_memac013.testMethod()) { return MFTestResults.Pass; @@ -1274,12 +1274,12 @@ public void Basic_memac013_Test() [TestMethod] public void Basic_memac014_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected internal, the access"); - OutputHelper.WriteLine("is permitted if it occurs within the project in which"); - OutputHelper.WriteLine("M is declared, or if it occurs within a class derived "); - OutputHelper.WriteLine("from the class in which M is declared and takes place "); - OutputHelper.WriteLine("through the derived class type."); + // Section 3.3 + // Otherwise, if M is protected internal, the access + // is permitted if it occurs within the project in which + // M is declared, or if it occurs within a class derived + // from the class in which M is declared and takes place + // through the derived class type. Assert.IsTrue(Basic_TestClass_memac014.testMethod()) { return MFTestResults.Pass; @@ -1290,96 +1290,96 @@ public void Basic_memac014_Test() [TestMethod] public void Basic_memac019_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the class in which M is declared, or"); - OutputHelper.WriteLine("if it occurs within a class derived from the class in"); - OutputHelper.WriteLine("which M is delared and takes place through the derived class "); - OutputHelper.WriteLine("type."); + // Section 3.3 + // Otherwise, if M is protected, the access is permitted + // if it occurs within the class in which M is declared, or + // if it occurs within a class derived from the class in + // which M is delared and takes place through the derived class + // type. Assert.IsTrue(Basic_TestClass_memac019.testMethod()); } [TestMethod] public void Basic_memac020_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the class in which M is declared, or"); - OutputHelper.WriteLine("if it occurs within a class derived from the class in"); - OutputHelper.WriteLine("which M is delared and takes place through the derived class "); - OutputHelper.WriteLine("type."); + // Section 3.3 + // Otherwise, if M is protected, the access is permitted + // if it occurs within the class in which M is declared, or + // if it occurs within a class derived from the class in + // which M is delared and takes place through the derived class + // type. Assert.IsTrue(Basic_TestClass_memac020.testMethod()); } [TestMethod] public void Basic_memac021_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the class in which M is declared, or"); - OutputHelper.WriteLine("if it occurs within a class derived from the class in"); - OutputHelper.WriteLine("which M is delared and takes place through the derived class "); - OutputHelper.WriteLine("type."); + // Section 3.3 + // Otherwise, if M is protected, the access is permitted + // if it occurs within the class in which M is declared, or + // if it occurs within a class derived from the class in + // which M is delared and takes place through the derived class + // type. Assert.IsTrue(Basic_TestClass_memac021.testMethod()); } [TestMethod] public void Basic_memac022_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the class in which M is declared, or"); - OutputHelper.WriteLine("if it occurs within a class derived from the class in"); - OutputHelper.WriteLine("which M is delared and takes place through the derived class "); - OutputHelper.WriteLine("type."); + // Section 3.3 + // Otherwise, if M is protected, the access is permitted + // if it occurs within the class in which M is declared, or + // if it occurs within a class derived from the class in + // which M is delared and takes place through the derived class + // type. Assert.IsTrue(Basic_TestClass_memac022.testMethod()); } [TestMethod] public void Basic_memac025_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is protected, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the class in which M is declared, or"); - OutputHelper.WriteLine("if it occurs within a class derived from the class in"); - OutputHelper.WriteLine("which M is delared and takes place through the derived class "); - OutputHelper.WriteLine("type."); + // Section 3.3 + // Otherwise, if M is protected, the access is permitted + // if it occurs within the class in which M is declared, or + // if it occurs within a class derived from the class in + // which M is delared and takes place through the derived class + // type. Assert.IsTrue(Basic_TestClass_memac025.testMethod()); } [TestMethod] public void Basic_memac027_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is internal, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the project in which M is declared."); + // Section 3.3 + // Otherwise, if M is internal, the access is permitted + // if it occurs within the project in which M is declared. Assert.IsTrue(Basic_TestClass_memac027.testMethod()); } [TestMethod] public void Basic_memac029_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is internal, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the project in which M is declared."); + // Section 3.3 + // Otherwise, if M is internal, the access is permitted + // if it occurs within the project in which M is declared. Assert.IsTrue(Basic_TestClass_memac029.testMethod()); } [TestMethod] public void Basic_memac030_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is internal, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the project in which M is declared."); + // Section 3.3 + // Otherwise, if M is internal, the access is permitted + // if it occurs within the project in which M is declared. Assert.IsTrue(Basic_TestClass_memac030.testMethod()); } [TestMethod] public void Basic_memac033_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is private, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the type in which M is declared."); + // Section 3.3 + // Otherwise, if M is private, the access is permitted + // if it occurs within the type in which M is declared. Assert.IsTrue(Basic_TestClass_memac033.testMethod()); } [TestMethod] public void Basic_memac034_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("Otherwise, if M is private, the access is permitted"); - OutputHelper.WriteLine("if it occurs within the type in which M is declared."); + // Section 3.3 + // Otherwise, if M is private, the access is permitted + // if it occurs within the type in which M is declared. Assert.IsTrue(Basic_TestClass_memac034.testMethod()); } @@ -1389,7 +1389,7 @@ public void Basic_memac034_Test() [TestMethod] public void Basic_memac039_Test() { - OutputHelper.WriteLine("VS Bug 75548"); + // VS Bug 75548 Assert.IsTrue(Basic_TestClass_memac039.testMethod()) { return MFTestResults.Pass; @@ -1409,264 +1409,264 @@ public void Basic_memac041_Test() [TestMethod] public void Basic_memac042_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_memac042.testMethod()); } [TestMethod] public void Basic_memac043_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_memac043.testMethod()); } [TestMethod] public void Basic_memac044_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_memac044.testMethod()); } [TestMethod] public void Basic_memac045_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_memac045.testMethod()); } [TestMethod] public void Basic_memac046_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_memac046.testMethod()); } [TestMethod] public void Basic_memac047_Test() { - OutputHelper.WriteLine("Section 3.5"); + // Section 3.5 Assert.IsTrue(Basic_TestClass_memac047.testMethod()); } [TestMethod] public void Basic_accon001_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon001.testMethod()); } [TestMethod] public void Basic_accon003_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon003.testMethod()); } [TestMethod] public void Basic_accon005_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon005.testMethod()); } [TestMethod] public void Basic_accon007_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon007.testMethod()); } [TestMethod] public void Basic_accon009_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon009.testMethod()); } [TestMethod] public void Basic_accon011_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon011.testMethod()); } [TestMethod] public void Basic_accon013_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon013.testMethod()); } [TestMethod] public void Basic_accon015_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon015.testMethod()); } [TestMethod] public void Basic_accon019_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon019.testMethod()); } [TestMethod] public void Basic_accon021_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The direct base class of a class type must be"); - OutputHelper.WriteLine("at least as accessible as the class type itself."); + // Section 3.3 + // The direct base class of a class type must be + // at least as accessible as the class type itself. Assert.IsTrue(Basic_TestClass_accon021.testMethod()); } [TestMethod] public void Basic_accon023_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The explicit base interfaces of an interface "); - OutputHelper.WriteLine("type must be at least as accessible as the interface"); - OutputHelper.WriteLine("type itself."); + // Section 3.3 + // The explicit base interfaces of an interface + // type must be at least as accessible as the interface + // type itself. Assert.IsTrue(Basic_TestClass_accon023.testMethod()); } [TestMethod] public void Basic_accon025_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The explicit base interfaces of an interface "); - OutputHelper.WriteLine("type must be at least as accessible as the interface"); - OutputHelper.WriteLine("type itself."); + // Section 3.3 + // The explicit base interfaces of an interface + // type must be at least as accessible as the interface + // type itself. Assert.IsTrue(Basic_TestClass_accon025.testMethod()); } [TestMethod] public void Basic_accon027_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The explicit base interfaces of an interface "); - OutputHelper.WriteLine("type must be at least as accessible as the interface"); - OutputHelper.WriteLine("type itself."); + // Section 3.3 + // The explicit base interfaces of an interface + // type must be at least as accessible as the interface + // type itself. Assert.IsTrue(Basic_TestClass_accon027.testMethod()); } [TestMethod] public void Basic_accon029_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The explicit base interfaces of an interface "); - OutputHelper.WriteLine("type must be at least as accessible as the interface"); - OutputHelper.WriteLine("type itself."); + // Section 3.3 + // The explicit base interfaces of an interface + // type must be at least as accessible as the interface + // type itself. Assert.IsTrue(Basic_TestClass_accon029.testMethod()); } [TestMethod] public void Basic_accon031_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The explicit base interfaces of an interface "); - OutputHelper.WriteLine("type must be at least as accessible as the interface"); - OutputHelper.WriteLine("type itself."); + // Section 3.3 + // The explicit base interfaces of an interface + // type must be at least as accessible as the interface + // type itself. Assert.IsTrue(Basic_TestClass_accon031.testMethod()); } [TestMethod] public void Basic_accon033_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The return type and parameter types of a delegate"); - OutputHelper.WriteLine("type must be at least as accessible as the delegate"); - OutputHelper.WriteLine("ytpe itself."); + // Section 3.3 + // The return type and parameter types of a delegate + // type must be at least as accessible as the delegate + // ytpe itself. Assert.IsTrue(Basic_TestClass_accon033.testMethod()); } [TestMethod] public void Basic_accon035_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The return type and parameter types of a delegate"); - OutputHelper.WriteLine("type must be at least as accessible as the delegate"); - OutputHelper.WriteLine("ytpe itself."); + // Section 3.3 + // The return type and parameter types of a delegate + // type must be at least as accessible as the delegate + // ytpe itself. Assert.IsTrue(Basic_TestClass_accon035.testMethod()); } [TestMethod] public void Basic_accon037_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The type of a constant must be at least as"); - OutputHelper.WriteLine("accessible as the constant itself."); + // Section 3.3 + // The type of a constant must be at least as + // accessible as the constant itself. Assert.IsTrue(Basic_TestClass_accon037.testMethod()); } [TestMethod] public void Basic_accon039_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The type of a field must be at least as accessible"); - OutputHelper.WriteLine("as the field itself."); + // Section 3.3 + // The type of a field must be at least as accessible + // as the field itself. Assert.IsTrue(Basic_TestClass_accon039.testMethod()); } [TestMethod] public void Basic_accon041_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The return type and parameter types of a method"); - OutputHelper.WriteLine("must be at least asaccessible as the method itself."); + // Section 3.3 + // The return type and parameter types of a method + // must be at least asaccessible as the method itself. Assert.IsTrue(Basic_TestClass_accon041.testMethod()); } [TestMethod] public void Basic_accon043_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The return type and parameter types of a method"); - OutputHelper.WriteLine("must be at least asaccessible as the method itself."); + // Section 3.3 + // The return type and parameter types of a method + // must be at least asaccessible as the method itself. Assert.IsTrue(Basic_TestClass_accon043.testMethod()); } [TestMethod] public void Basic_accon045_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The type of a property must be at least as"); - OutputHelper.WriteLine("accessible as the property itself."); + // Section 3.3 + // The type of a property must be at least as + // accessible as the property itself. Assert.IsTrue(Basic_TestClass_accon045.testMethod()); } [TestMethod] public void Basic_accon047_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The return type and parameter types of an"); - OutputHelper.WriteLine("indexer must be at least as accessible as the"); - OutputHelper.WriteLine("indexer itself."); + // Section 3.3 + // The return type and parameter types of an + // indexer must be at least as accessible as the + // indexer itself. Assert.IsTrue(Basic_TestClass_accon047.testMethod()); } [TestMethod] public void Basic_accon049_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The return type and parameter types of an"); - OutputHelper.WriteLine("indexer must be at least as accessible as the"); - OutputHelper.WriteLine("indexer itself."); + // Section 3.3 + // The return type and parameter types of an + // indexer must be at least as accessible as the + // indexer itself. Assert.IsTrue(Basic_TestClass_accon049.testMethod()); } [TestMethod] public void Basic_accon051_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The return type and parameter types of an"); - OutputHelper.WriteLine("operator must be at least as accessible as"); - OutputHelper.WriteLine("the operator itself."); + // Section 3.3 + // The return type and parameter types of an + // operator must be at least as accessible as + // the operator itself. Assert.IsTrue(Basic_TestClass_accon051.testMethod()); } [TestMethod] public void Basic_accon053_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The return type and parameter types of an"); - OutputHelper.WriteLine("operator must be at least as accessible as"); - OutputHelper.WriteLine("the operator itself."); + // Section 3.3 + // The return type and parameter types of an + // operator must be at least as accessible as + // the operator itself. Assert.IsTrue(Basic_TestClass_accon053.testMethod()); } [TestMethod] public void Basic_accon055_Test() { - OutputHelper.WriteLine("Section 3.3"); - OutputHelper.WriteLine("The parameter types of a constructor must be at least"); - OutputHelper.WriteLine("as accessible as the constructor itself."); + // Section 3.3 + // The parameter types of a constructor must be at least + // as accessible as the constructor itself. Assert.IsTrue(Basic_TestClass_accon055.testMethod()); } @@ -2512,7 +2512,7 @@ public static int Main_old() { if (Basic_TestClass_nhide015_C1.Basic_TestClass_nhide015_I.intI == 2) { - OutputHelper.WriteLine("foo"); + // foo return 0; } else @@ -2722,7 +2722,7 @@ public static int Main_old() { if (Basic_TestClass_nhide022_C1.Basic_TestClass_nhide022_I.intI == 2) { - OutputHelper.WriteLine("foo"); + // foo return 0; } else @@ -2808,7 +2808,7 @@ public static int Main_old() { if (Basic_TestClass_nhide024_St1.Basic_TestClass_nhide024_I.intI == 2) { - OutputHelper.WriteLine("foo"); + // foo return 0; } else @@ -4733,7 +4733,7 @@ public static bool testMethod() public class Basic_TestClass_memac041_B : Basic_TestClass_memac041_A { protected override void f() - { OutputHelper.WriteLine("Basic_TestClass_memac041_B.f()"); } + { // Basic_TestClass_memac041_B.f() } static void Main_old() { Basic_TestClass_memac041_B b = new Basic_TestClass_memac041_B(); @@ -5861,7 +5861,7 @@ public static int Main_old() { if (Basic_TestClass_nhide008_C1.Basic_TestClass_nhide008_I.intI == 2) { - OutputHelper.WriteLine("foo"); + // foo return 0; } else @@ -5932,7 +5932,7 @@ public static int Main_old() { if (Basic_TestClass_nhide010_St1.Basic_TestClass_nhide010_I.intI == 2) { - OutputHelper.WriteLine("foo"); + // foo return 0; } else diff --git a/Tests/NFUnitTestBitConverter/BitConverter.cs b/Tests/NFUnitTestBitConverter/BitConverter.cs index d345b348..06d90a22 100644 --- a/Tests/NFUnitTestBitConverter/BitConverter.cs +++ b/Tests/NFUnitTestBitConverter/BitConverter.cs @@ -15,13 +15,13 @@ public class Test1 [Setup] public void Initialize() { - OutputHelper.WriteLine("BitConverter tests initialized."); + // BitConverter tests initialized. } [Cleanup] public void CleanUp() { - OutputHelper.WriteLine("Cleaning up after BitConverter tests."); + // Cleaning up after BitConverter tests. } //Test Case Calls diff --git a/Tests/NFUnitTestClasses/UnitTestConstructorTest.cs b/Tests/NFUnitTestClasses/UnitTestConstructorTest.cs index 15f1c3d9..155983bb 100644 --- a/Tests/NFUnitTestClasses/UnitTestConstructorTest.cs +++ b/Tests/NFUnitTestClasses/UnitTestConstructorTest.cs @@ -17,7 +17,7 @@ public class UnitTestConstructorTest [TestMethod] public void Constructors1_Test() { - OutputHelper.WriteLine("Tests if assignments in a constructor function."); + // Tests if assignments in a constructor function. Assert.IsTrue(ConstructorsTestClass1.testMethod()); } @@ -25,7 +25,7 @@ public void Constructors1_Test() public void Constructors2_Test() { //Ported from Const2.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is public."); + // Tests if assignments in a constructor function, when constructor is public. Assert.IsTrue(ConstructorsTestClass2.testMethod()); } @@ -33,7 +33,7 @@ public void Constructors2_Test() public void Constructors3_Test() { //Ported from Const3.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is protected."); + // Tests if assignments in a constructor function, when constructor is protected. Assert.IsTrue(ConstructorsTestClass3.testMethod()); } @@ -41,7 +41,7 @@ public void Constructors3_Test() public void Constructors5_Test() { //Ported from Const5.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is internal."); + // Tests if assignments in a constructor function, when constructor is internal. Assert.IsTrue(ConstructorsTestClass5.testMethod()); } @@ -49,7 +49,7 @@ public void Constructors5_Test() public void Constructors6_Test() { //Ported from Const6.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is private."); + // Tests if assignments in a constructor function, when constructor is private. Assert.IsTrue(ConstructorsTestClass6.testMethod()); } @@ -57,7 +57,7 @@ public void Constructors6_Test() public void Constructors8_Test() { //Ported from Const8.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor has one parameter."); + // Tests if assignments in a constructor function, when constructor has one parameter. Assert.IsTrue(ConstructorsTestClass8.testMethod()); } @@ -66,8 +66,8 @@ public void Constructors10_Test() { //Ported from Const10.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor is called with one parameter"); - OutputHelper.WriteLine("and is overloaded with an un-called zero parameter version"); + // Tests if assignments in a constructor function, when constructor is called with one parameter + // and is overloaded with an un-called zero parameter version Assert.IsTrue(ConstructorsTestClass10.testMethod()); } @@ -75,7 +75,7 @@ public void Constructors10_Test() public void Constructors11_Test() { //Ported from Const11.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor has two parameters."); + // Tests if assignments in a constructor function, when constructor has two parameters. Assert.IsTrue(ConstructorsTestClass11.testMethod()); } @@ -83,7 +83,7 @@ public void Constructors11_Test() public void Constructors13_Test() { //Ported from Const13.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when constructor has ten parameters."); + // Tests if assignments in a constructor function, when constructor has ten parameters. Assert.IsTrue(ConstructorsTestClass13.testMethod()); } @@ -91,9 +91,9 @@ public void Constructors13_Test() public void Constructors16_Test() { //Ported from Const16.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when test class inherits constructor"); + // Tests if assignments in a constructor function, when test class inherits constructor - OutputHelper.WriteLine("and extends it with base"); + // and extends it with base Assert.IsTrue(ConstructorsTestClass16.testMethod()); } @@ -101,8 +101,8 @@ public void Constructors16_Test() public void Constructors17_Test() { //Ported from Const17.cs - OutputHelper.WriteLine("Tests if assignments in a constructor function, when test class inherits 2 constructors"); - OutputHelper.WriteLine("and extends one of them with base"); + // Tests if assignments in a constructor function, when test class inherits 2 constructors + // and extends one of them with base Assert.IsTrue(ConstructorsTestClass17.testMethod()); } @@ -110,7 +110,7 @@ public void Constructors17_Test() public void Constructors20_Test() { //Ported from Const20.cs - OutputHelper.WriteLine("Tests if assignments in a constructor and its base are both functional"); + // Tests if assignments in a constructor and its base are both functional Assert.IsTrue(ConstructorsTestClass20.testMethod()); } @@ -118,7 +118,7 @@ public void Constructors20_Test() public void Constructors21_Test() { //Ported from Const21.cs - OutputHelper.WriteLine("Tests if assignments in a constructor and its base, and its base's base are all functional"); + // Tests if assignments in a constructor and its base, and its base's base are all functional Assert.IsTrue(ConstructorsTestClass21.testMethod()); } @@ -126,8 +126,8 @@ public void Constructors21_Test() public void Constructors22_Test() { //Ported from Const22.cs - OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a parametered constructor extends"); - OutputHelper.WriteLine("a not-parametered one with 'this'"); + // Tests if assignments in both a class' constructors are functional when a parametered constructor extends + // a not-parametered one with 'this' Assert.IsTrue(ConstructorsTestClass22.testMethod()); } @@ -135,8 +135,8 @@ public void Constructors22_Test() public void Constructors23_Test() { //Ported from Const23.cs - OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a not-parametered constructor extends"); - OutputHelper.WriteLine("a parametered one with 'this'"); + // Tests if assignments in both a class' constructors are functional when a not-parametered constructor extends + // a parametered one with 'this' Assert.IsTrue(ConstructorsTestClass23.testMethod()); } @@ -144,7 +144,7 @@ public void Constructors23_Test() public void Constructors24_Test() { //Ported from Const24.cs - OutputHelper.WriteLine("Tests if assignments in all a class' constructors are functional in a chain of extension using 'this'"); + // Tests if assignments in all a class' constructors are functional in a chain of extension using 'this' Assert.IsTrue(ConstructorsTestClass24.testMethod()); } @@ -153,8 +153,8 @@ public void Constructors25_Test() { //Ported from Const25.cs - OutputHelper.WriteLine("Tests if assignments in all a class' constructors are functional when a parametered one extends a"); - OutputHelper.WriteLine("not-parametered one, which in turn extends the class' base class constructor"); + // Tests if assignments in all a class' constructors are functional when a parametered one extends a + // not-parametered one, which in turn extends the class' base class constructor Assert.IsTrue(ConstructorsTestClass25.testMethod()); } @@ -162,8 +162,8 @@ public void Constructors25_Test() public void Constructors26_Test() { //Ported from Const26.cs - OutputHelper.WriteLine("Tests if assignments in all a class' constructors are functional when a not-parametered one extends a"); - OutputHelper.WriteLine("not-parametered one in its base class, which in turn extends a parametered one in the base class"); + // Tests if assignments in all a class' constructors are functional when a not-parametered one extends a + // not-parametered one in its base class, which in turn extends a parametered one in the base class Assert.IsTrue(ConstructorsTestClass26.testMethod()); } @@ -171,8 +171,8 @@ public void Constructors26_Test() public void Constructors27_Test() { //Ported from Const27.cs - OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a two-parametered constructor extends"); - OutputHelper.WriteLine("a one-parametered one with 'this'"); + // Tests if assignments in both a class' constructors are functional when a two-parametered constructor extends + // a one-parametered one with 'this' Assert.IsTrue(ConstructorsTestClass27.testMethod()); } @@ -180,8 +180,8 @@ public void Constructors27_Test() public void Constructors28_Test() { //Ported from Const28.cs - OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a two-parametered constructor extends"); - OutputHelper.WriteLine("a one-parametered one with 'this' and calls that constructor with a static arg"); + // Tests if assignments in both a class' constructors are functional when a two-parametered constructor extends + // a one-parametered one with 'this' and calls that constructor with a static arg Assert.IsTrue(ConstructorsTestClass28.testMethod()); } @@ -189,8 +189,8 @@ public void Constructors28_Test() public void Constructors31_Test() { //Ported from Const31.cs - OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a not-parametered constructor extends"); - OutputHelper.WriteLine("a two-parametered one with 'this'"); + // Tests if assignments in both a class' constructors are functional when a not-parametered constructor extends + // a two-parametered one with 'this' Assert.IsTrue(ConstructorsTestClass31.testMethod()); } @@ -199,8 +199,8 @@ public void Constructors32_Test() { //Ported from Const32.cs - OutputHelper.WriteLine("Tests if assignments in both a class' constructors are functional when a parametered constructor extends"); - OutputHelper.WriteLine("a not-parametered one that is private with 'this'"); + // Tests if assignments in both a class' constructors are functional when a parametered constructor extends + // a not-parametered one that is private with 'this' Assert.IsTrue(ConstructorsTestClass32.testMethod()); } @@ -209,7 +209,7 @@ public void Constructors33_Test() { //Ported from Const33.cs - OutputHelper.WriteLine("Tests if assignments in a class' constructor are functional when the constructor is static"); + // Tests if assignments in a class' constructor are functional when the constructor is static Assert.IsTrue(ConstructorsTestClass33.testMethod()); } @@ -217,8 +217,8 @@ public void Constructors33_Test() public void Constructors34_Test() { //Ported from Const34.cs - OutputHelper.WriteLine("Tests if assignments in a class' constructor are functional when one constructor is static"); - OutputHelper.WriteLine("and the other isn't"); + // Tests if assignments in a class' constructor are functional when one constructor is static + // and the other isn't Assert.IsTrue(ConstructorsTestClass34.testMethod()); } @@ -226,7 +226,7 @@ public void Constructors34_Test() public void Constructors35_Test() { //From Bug# 16354/16719 - OutputHelper.WriteLine("Tests if handled exceptions in constructors continues execution"); + // Tests if handled exceptions in constructors continues execution Assert.IsTrue(ConstructorsTestClass35.testMethod()); } @@ -234,11 +234,11 @@ public void Constructors35_Test() public void Constructors44_Test() { //Ported from Const44.cs - OutputHelper.WriteLine("Section 10.9.5"); - OutputHelper.WriteLine("When a class declares only private constructors it "); - OutputHelper.WriteLine("is not possible for other classes to derive from"); - OutputHelper.WriteLine("the class or create instances of the class (an System.Exception"); - OutputHelper.WriteLine("being classes nested within the class)."); + // Section 10.9.5 + // When a class declares only private constructors it + // is not possible for other classes to derive from + // the class or create instances of the class (an System.Exception + // being classes nested within the class). Assert.IsTrue(ConstructorsTestClass44.testMethod()); } @@ -246,10 +246,10 @@ public void Constructors44_Test() public void Constructors45_Test() { //Ported from Const45.cs - OutputHelper.WriteLine("Section 10.11."); - OutputHelper.WriteLine("It is possible to construct circular dependencies that"); - OutputHelper.WriteLine("allow static fields with variable initializers to be"); - OutputHelper.WriteLine("observed in their default value state."); + // Section 10.11. + // It is possible to construct circular dependencies that + // allow static fields with variable initializers to be + // observed in their default value state. Assert.IsTrue(ConstructorsTestClass45.testMethod()); } @@ -259,10 +259,10 @@ public void Constructors45_Test() //public void Constructors46_Test() //{ // //Ported from Const46.cs - // OutputHelper.WriteLine("Section 10.11."); - // OutputHelper.WriteLine("It is possible to construct circular dependencies that"); - // OutputHelper.WriteLine("allow static fields with variable initializers to be"); - // OutputHelper.WriteLine("observed in their default value state."); + // // Section 10.11. + // // It is possible to construct circular dependencies that + // // allow static fields with variable initializers to be + // // observed in their default value state. // Assert.IsTrue(ConstructorsTestClass46.testMethod()) // { // return MFTestResults.Pass; @@ -274,11 +274,11 @@ public void Constructors45_Test() //public void Constructors47_Test() //{ // //Ported from Const47.cs - // OutputHelper.WriteLine("Section 10.11."); - // OutputHelper.WriteLine("It is possible to construct circular dependencies that"); - // OutputHelper.WriteLine("allow static fields with variable initializers to be"); - // OutputHelper.WriteLine("observed in their default value state."); - // OutputHelper.WriteLine("This test is expected to fail."); + // // Section 10.11. + // // It is possible to construct circular dependencies that + // // allow static fields with variable initializers to be + // // observed in their default value state. + // // This test is expected to fail. // Assert.IsTrue(ConstructorsTestClass47.testMethod()) // { // return MFTestResults.Fail; @@ -290,11 +290,11 @@ public void Constructors45_Test() public void Constructors50_Test() { //Ported from Const50.cs - OutputHelper.WriteLine("The scope of the parameters given by the formal"); - OutputHelper.WriteLine("parameter list of a constructor includes the"); - OutputHelper.WriteLine("constructor initializer of that declaration."); - OutputHelper.WriteLine("Thus, a constructor initializer is permitted to"); - OutputHelper.WriteLine("access the parameters of the constructor."); + // The scope of the parameters given by the formal + // parameter list of a constructor includes the + // constructor initializer of that declaration. + // Thus, a constructor initializer is permitted to + // access the parameters of the constructor. Assert.IsTrue(ConstructorsTestClass50.testMethod()); } @@ -302,19 +302,19 @@ public void Constructors50_Test() public void Constructors51_Test() { //Ported from Const51.cs - OutputHelper.WriteLine("Section 10.9"); - OutputHelper.WriteLine("The scope of the parameters given by the formal"); - OutputHelper.WriteLine("parameter list of a constructor includes the"); - OutputHelper.WriteLine("constructor initializer of that declaration."); - OutputHelper.WriteLine("Thus, a constructor initializer is permitted to"); - OutputHelper.WriteLine("access the parameters of the constructor."); + // Section 10.9 + // The scope of the parameters given by the formal + // parameter list of a constructor includes the + // constructor initializer of that declaration. + // Thus, a constructor initializer is permitted to + // access the parameters of the constructor. Assert.IsTrue(ConstructorsTestClass51.testMethod()); } [TestMethod] public void Constructors52_Test() { - OutputHelper.WriteLine("Testing a constructor with a '(params int[] values)' prototype, called with 3 ints"); + // Testing a constructor with a '(params int[] values)' prototype, called with 3 ints //Ported from Const52.cs Assert.IsTrue(ConstructorsTestClass52.testMethod()); } @@ -323,7 +323,7 @@ public void Constructors52_Test() public void Constructors54_Test() { //Ported from Const54.cs - OutputHelper.WriteLine("Testing a constructor with a '(params int[] values)' prototype, called with 3 ints from its derived class"); + // Testing a constructor with a '(params int[] values)' prototype, called with 3 ints from its derived class Assert.IsTrue(ConstructorsTestClass54.testMethod()); } @@ -332,16 +332,16 @@ public void Constructors55_Test() { //Ported from Const55.cs - OutputHelper.WriteLine("Testing a constructor with a '(params int[] values)' prototype, called with 3 ints"); - OutputHelper.WriteLine(" from its derived class, and both constructors are 'protected internal'"); + // Testing a constructor with a '(params int[] values)' prototype, called with 3 ints + // from its derived class, and both constructors are 'protected internal' Assert.IsTrue(ConstructorsTestClass55.testMethod()); } [TestMethod] public void Constructors56_Test() { - OutputHelper.WriteLine("Testing a constructor with a '(params int[] values)' prototype, called with 3 ints"); - OutputHelper.WriteLine(" from its derived class implicitly, and both constructors are 'internal'"); + // Testing a constructor with a '(params int[] values)' prototype, called with 3 ints + // from its derived class implicitly, and both constructors are 'internal' //Ported from Const56.cs Assert.IsTrue(ConstructorsTestClass56.testMethod()); } @@ -350,7 +350,7 @@ public void Constructors56_Test() public void Constructors57_Test() { //Ported from Const57.cs - OutputHelper.WriteLine("Testing a 'private' constructor with a '(params int[] values)' prototype, called with 3 ints"); + // Testing a 'private' constructor with a '(params int[] values)' prototype, called with 3 ints Assert.IsTrue(ConstructorsTestClass57.testMethod()); } @@ -358,7 +358,7 @@ public void Constructors57_Test() public void Constructors64_Test() { //Ported from Const64.cs - OutputHelper.WriteLine("Instance constructors, destructors, and static constructors are not inherited"); + // Instance constructors, destructors, and static constructors are not inherited Assert.IsTrue(ConstructorsTestClass64.testMethod()); } @@ -483,7 +483,7 @@ public void ConstructorParametersInfo_01() // get ParameterInfo for 1st constructor ParameterInfo[] constructorParameters = constructors[0].GetParameters(); - OutputHelper.WriteLine("Checking parameters for 1st constructor of ClassWith3Constructors"); + // Checking parameters for 1st constructor of ClassWith3Constructors Assert.AreEqual(0, constructorParameters.Length, $"Expecting no parameters, got {constructorParameters.Length}."); // get ParameterInfo for 2nd constructor @@ -491,7 +491,7 @@ public void ConstructorParametersInfo_01() Assert.AreEqual(1, constructorParameters.Length, $"Expecting 1 parameter, got {constructorParameters.Length}."); - OutputHelper.WriteLine("Checking parameters for 2nd constructor of ClassWith3Constructors"); + // Checking parameters for 2nd constructor of ClassWith3Constructors Assert.AreEqual(constructorParameters[0].ParameterType.ToString(), $"{typeof(int)}", $"Expecting parameter of type {typeof(int)}, got {constructorParameters[0].ParameterType}."); // get ParameterInfo for 3rd constructor @@ -499,7 +499,7 @@ public void ConstructorParametersInfo_01() Assert.AreEqual(2, constructorParameters.Length, $"Expecting 2 parameters, got {constructorParameters.Length}."); - OutputHelper.WriteLine("Checking parameters for 3rd constructor of ClassWith3Constructors"); + // Checking parameters for 3rd constructor of ClassWith3Constructors Assert.AreEqual(constructorParameters[0].ParameterType.ToString(), $"{typeof(int)}", $"Expecting parameter of type {typeof(int)}, got {constructorParameters[0].ParameterType}."); Assert.AreEqual(constructorParameters[1].ParameterType.ToString(), $"{typeof(string)}", $"Expecting parameter of type {typeof(string)}, got {constructorParameters[0].ParameterType}."); } diff --git a/Tests/NFUnitTestClasses/UnitTestConstsTests.cs b/Tests/NFUnitTestClasses/UnitTestConstsTests.cs index 3e06bdb9..161c3d7f 100644 --- a/Tests/NFUnitTestClasses/UnitTestConstsTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestConstsTests.cs @@ -18,11 +18,11 @@ class UnitTestConstsTests public void Const1_Test() { //Ported from const1.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant-declaration may include a set of attributes,"); - OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); - OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); - OutputHelper.WriteLine("declared by the constant declaration."); + // Section 10.3 + // A constant-declaration may include a set of attributes, + // a new modifier, and one of four access modifiers. The + // attributes and modifiers apply to all of the members + // declared by the constant declaration. Assert.IsTrue(ConstTestClass1.test()); } @@ -30,11 +30,11 @@ public void Const1_Test() public void Const2_Test() { //Ported from const2.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant-declaration may include a set of attributes,"); - OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); - OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); - OutputHelper.WriteLine("declared by the constant declaration."); + // Section 10.3 + // A constant-declaration may include a set of attributes, + // a new modifier, and one of four access modifiers. The + // attributes and modifiers apply to all of the members + // declared by the constant declaration. Assert.IsTrue(ConstTestClass2.test()); } @@ -42,11 +42,11 @@ public void Const2_Test() public void Const3_Test() { //Ported from const3.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant-declaration may include a set of attributes,"); - OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); - OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); - OutputHelper.WriteLine("declared by the constant declaration."); + // Section 10.3 + // A constant-declaration may include a set of attributes, + // a new modifier, and one of four access modifiers. The + // attributes and modifiers apply to all of the members + // declared by the constant declaration. Assert.IsTrue(ConstTestClass3.test()); } @@ -55,11 +55,11 @@ public void Const3_Test() public void Const4_Test() { //Ported from const4.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant-declaration may include a set of attributes,"); - OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); - OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); - OutputHelper.WriteLine("declared by the constant declaration."); + // Section 10.3 + // A constant-declaration may include a set of attributes, + // a new modifier, and one of four access modifiers. The + // attributes and modifiers apply to all of the members + // declared by the constant declaration. Assert.IsTrue(ConstTestClass4.test()); } @@ -67,11 +67,11 @@ public void Const4_Test() public void Const5_Test() { //Ported from const5.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant-declaration may include a set of attributes,"); - OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); - OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); - OutputHelper.WriteLine("declared by the constant declaration."); + // Section 10.3 + // A constant-declaration may include a set of attributes, + // a new modifier, and one of four access modifiers. The + // attributes and modifiers apply to all of the members + // declared by the constant declaration. Assert.IsTrue(ConstTestClass5.test()); } @@ -79,11 +79,11 @@ public void Const5_Test() public void Const6_Test() { //Ported from const6.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant-declaration may include a set of attributes,"); - OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); - OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); - OutputHelper.WriteLine("declared by the constant declaration."); + // Section 10.3 + // A constant-declaration may include a set of attributes, + // a new modifier, and one of four access modifiers. The + // attributes and modifiers apply to all of the members + // declared by the constant declaration. Assert.IsTrue(ConstTestClass6.test()); } @@ -92,11 +92,11 @@ public void Const6_Test() public void Const9_Test() { //Ported from const9.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant-declaration may include a set of attributes,"); - OutputHelper.WriteLine("a new modifier, and one of four access modifiers. The"); - OutputHelper.WriteLine("attributes and modifiers apply to all of the members "); - OutputHelper.WriteLine("declared by the constant declaration."); + // Section 10.3 + // A constant-declaration may include a set of attributes, + // a new modifier, and one of four access modifiers. The + // attributes and modifiers apply to all of the members + // declared by the constant declaration. Assert.IsTrue(ConstTestClass9.test()); } @@ -104,14 +104,14 @@ public void Const9_Test() [TestMethod] public void Const11_Test() { - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. //Ported from const11.cs Assert.IsTrue(ConstTestClass11.test()); } @@ -120,14 +120,14 @@ public void Const11_Test() public void Const12_Test() { //Ported from const12.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass12.test()); } @@ -135,14 +135,14 @@ public void Const12_Test() public void Const13_Test() { //Ported from const13.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass13.test()); } @@ -150,14 +150,14 @@ public void Const13_Test() public void Const14_Test() { //Ported from const14.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass14.test()); } @@ -165,14 +165,14 @@ public void Const14_Test() public void Const15_Test() { //Ported from const15.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass15.test()); } @@ -180,14 +180,14 @@ public void Const15_Test() public void Const16_Test() { //Ported from const16.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass16.test()); } @@ -195,14 +195,14 @@ public void Const16_Test() public void Const17_Test() { //Ported from const17.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass17.test()); } @@ -210,14 +210,14 @@ public void Const17_Test() public void Const18_Test() { //Ported from const18.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass18.test()); } @@ -225,14 +225,14 @@ public void Const18_Test() public void Const19_Test() { //Ported from const19.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass19.test()); } @@ -240,14 +240,14 @@ public void Const19_Test() public void Const20_Test() { //Ported from const20.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass20.test()); } @@ -255,14 +255,14 @@ public void Const20_Test() public void Const21_Test() { //Ported from const21.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass21.test()); } @@ -270,14 +270,14 @@ public void Const21_Test() public void Const24_Test() { //Ported from const24.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass24.test()); } @@ -285,12 +285,12 @@ public void Const24_Test() public void Const25_Test() { //Ported from const25.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant itself can participate in a constant-expression."); - OutputHelper.WriteLine("Thus, a constant may be used in any construct that requires"); - OutputHelper.WriteLine("a constant-expression. Examples of such constructs include"); - OutputHelper.WriteLine("case labels, goto case statements, enum member declarations,"); - OutputHelper.WriteLine("attributes, and other constant declarations."); + // Section 10.3 + // A constant itself can participate in a constant-expression. + // Thus, a constant may be used in any construct that requires + // a constant-expression. Examples of such constructs include + // case labels, goto case statements, enum member declarations, + // attributes, and other constant declarations. Assert.IsTrue(ConstTestClass25.test()); } @@ -298,12 +298,12 @@ public void Const25_Test() public void Const26_Test() { //Ported from const26.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant itself can participate in a constant-expression."); - OutputHelper.WriteLine("Thus, a constant may be used in any construct that requires"); - OutputHelper.WriteLine("a constant-expression. Examples of such constructs include"); - OutputHelper.WriteLine("case labels, goto case statements, enum member declarations,"); - OutputHelper.WriteLine("attributes, and other constant declarations."); + // Section 10.3 + // A constant itself can participate in a constant-expression. + // Thus, a constant may be used in any construct that requires + // a constant-expression. Examples of such constructs include + // case labels, goto case statements, enum member declarations, + // attributes, and other constant declarations. Assert.IsTrue(ConstTestClass26.test()); } @@ -311,12 +311,12 @@ public void Const26_Test() public void Const27_Test() { //Ported from const27.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant itself can participate in a constant-expression."); - OutputHelper.WriteLine("Thus, a constant may be used in any construct that requires"); - OutputHelper.WriteLine("a constant-expression. Examples of such constructs include"); - OutputHelper.WriteLine("case labels, goto case statements, enum member declarations,"); - OutputHelper.WriteLine("attributes, and other constant declarations."); + // Section 10.3 + // A constant itself can participate in a constant-expression. + // Thus, a constant may be used in any construct that requires + // a constant-expression. Examples of such constructs include + // case labels, goto case statements, enum member declarations, + // attributes, and other constant declarations. Assert.IsTrue(ConstTestClass27.test()); } @@ -324,12 +324,12 @@ public void Const27_Test() public void Const28_Test() { //Ported from const28.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant itself can participate in a constant-expression."); - OutputHelper.WriteLine("Thus, a constant may be used in any construct that requires"); - OutputHelper.WriteLine("a constant-expression. Examples of such constructs include"); - OutputHelper.WriteLine("case labels, goto case statements, enum member declarations,"); - OutputHelper.WriteLine("attributes, and other constant declarations."); + // Section 10.3 + // A constant itself can participate in a constant-expression. + // Thus, a constant may be used in any construct that requires + // a constant-expression. Examples of such constructs include + // case labels, goto case statements, enum member declarations, + // attributes, and other constant declarations. Assert.IsTrue(ConstTestClass28.test()); } @@ -337,12 +337,12 @@ public void Const28_Test() public void Const30_Test() { //Ported from const30.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("Constants are permitted to depend on other constants"); - OutputHelper.WriteLine("within the same project as long as the dependencies"); - OutputHelper.WriteLine("are not of a circular nature. The compiler automatically"); - OutputHelper.WriteLine("arranges to evaluate the constant declarations in the"); - OutputHelper.WriteLine("appropriate order."); + // Section 10.3 + // Constants are permitted to depend on other constants + // within the same project as long as the dependencies + // are not of a circular nature. The compiler automatically + // arranges to evaluate the constant declarations in the + // appropriate order. Assert.IsTrue(ConstTestClass30.test()); } @@ -350,14 +350,14 @@ public void Const30_Test() public void Const32_Test() { //Ported from const32.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass32.test()); } @@ -365,14 +365,14 @@ public void Const32_Test() public void Const33_Test() { //Ported from const33.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass33.test()); } @@ -380,14 +380,14 @@ public void Const33_Test() public void Const34_Test() { //Ported from const34.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass34.test()); } @@ -395,14 +395,14 @@ public void Const34_Test() public void Const35_Test() { //Ported from const35.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type specified in a constant declaration"); - OutputHelper.WriteLine("must be byte, char, short, int, long, float,"); - OutputHelper.WriteLine("double, double, bool, string, an enum-type,"); - OutputHelper.WriteLine("or a reference type. Each constant-expression"); - OutputHelper.WriteLine("must yield a value of the target type or of a "); - OutputHelper.WriteLine("type that can be converted to the target type"); - OutputHelper.WriteLine("by implicit conversion."); + // Section 10.3 + // The type specified in a constant declaration + // must be byte, char, short, int, long, float, + // double, double, bool, string, an enum-type, + // or a reference type. Each constant-expression + // must yield a value of the target type or of a + // type that can be converted to the target type + // by implicit conversion. Assert.IsTrue(ConstTestClass35.test()); } @@ -410,14 +410,14 @@ public void Const35_Test() public void Const42_Test() { //Ported from const42.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant declarator introduces a new member"); - OutputHelper.WriteLine("This test is expected to fail"); + // Section 10.3 + // A constant declarator introduces a new member + // This test is expected to fail Assert.IsFalse(ConstTestClass42.test()); { - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 17246"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 17246 + // The Test owner needs to verify that the change was intentional and remove the known failure. } } @@ -425,14 +425,14 @@ public void Const42_Test() public void Const43_Test() { //Ported from const43.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant declarator introduces a new member"); - OutputHelper.WriteLine("This test is expected to fail"); + // Section 10.3 + // A constant declarator introduces a new member + // This test is expected to fail Assert.IsFalse(ConstTestClass43.test()); { - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 17246"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 17246 + // The Test owner needs to verify that the change was intentional and remove the known failure. } } @@ -440,8 +440,8 @@ public void Const43_Test() public void Const44_Test() { //Ported from const44.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("The type of a constant must be at least as acccessible as the constant itself."); + // Section 10.3 + // The type of a constant must be at least as acccessible as the constant itself. Assert.IsTrue(ConstTestClass44.test()); } @@ -450,9 +450,9 @@ public void Const44_Test() public void Const56_Test() { //Ported from const56.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("...the only possible value for constants of reference-types other than "); - OutputHelper.WriteLine("string is null"); + // Section 10.3 + // ...the only possible value for constants of reference-types other than + // string is null Assert.IsTrue(ConstTestClass56.test()); } @@ -460,10 +460,10 @@ public void Const56_Test() public void Const57_Test() { //Ported from const57.cs - OutputHelper.WriteLine("Section 10.3"); - OutputHelper.WriteLine("A constant declaration that declares multiple constants is equivalent to "); - OutputHelper.WriteLine("multiple declarations of single constants with the same attributes, "); - OutputHelper.WriteLine("modifiers, and type. "); + // Section 10.3 + // A constant declaration that declares multiple constants is equivalent to + // multiple declarations of single constants with the same attributes, + // modifiers, and type. Assert.IsTrue(ConstTestClass57.test()); } diff --git a/Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs b/Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs index 28b50922..315eae1c 100644 --- a/Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestDeclarationTests.cs @@ -16,7 +16,7 @@ class UnitTestDeclarationTests [TestMethod] public void BaseClass1_Test() { - OutputHelper.WriteLine("Tests an int declaration with assignment in a base class"); + // Tests an int declaration with assignment in a base class Assert.IsTrue(BaseClassTestClass1.testMethod()); } @@ -24,8 +24,8 @@ public void BaseClass1_Test() public void BaseClass2_Test() { - OutputHelper.WriteLine("Tests a function declaration in a implementing class still"); - OutputHelper.WriteLine("works after child is cast as an implemented interface"); + // Tests a function declaration in a implementing class still + // works after child is cast as an implemented interface Assert.IsTrue(BaseClassTestClass2.testMethod()); } @@ -33,52 +33,52 @@ public void BaseClass2_Test() public void BaseClass3_Test() { - OutputHelper.WriteLine("Tests a function declaration in an implementing class still works after child is cast as"); - OutputHelper.WriteLine("each of two implemented interfaces"); + // Tests a function declaration in an implementing class still works after child is cast as + // each of two implemented interfaces Assert.IsTrue(BaseClassTestClass3.testMethod()); } [TestMethod] public void BaseClass4_Test() { - OutputHelper.WriteLine("Tests a function declaration in a child class still works after child is cast as"); - OutputHelper.WriteLine("its parent class and an interface it implements"); + // Tests a function declaration in a child class still works after child is cast as + // its parent class and an interface it implements Assert.IsTrue(BaseClassTestClass4.testMethod()); } [TestMethod] public void BaseClass10_Test() { - OutputHelper.WriteLine("Section 10.1"); - OutputHelper.WriteLine("The base classes of a class are the direct base"); - OutputHelper.WriteLine("class and its base classes. In other words, the"); - OutputHelper.WriteLine("set of base classes is the transitive closure of the "); - OutputHelper.WriteLine("direct base class relatationship."); + // Section 10.1 + // The base classes of a class are the direct base + // class and its base classes. In other words, the + // set of base classes is the transitive closure of the + // direct base class relatationship. Assert.IsTrue(BaseClassTestClass10.testMethod()); } [TestMethod] public void BaseClass13_Test() { - OutputHelper.WriteLine("Section 10.1"); - OutputHelper.WriteLine("Note that a class does not depend on the"); - OutputHelper.WriteLine("classes that are nested within it. "); + // Section 10.1 + // Note that a class does not depend on the + // classes that are nested within it. Assert.IsTrue(BaseClassTestClass13.testMethod()); } [TestMethod] public void BaseClass25_Test() { - OutputHelper.WriteLine("10.1.2.1 "); - OutputHelper.WriteLine("inheriting from nested types"); + // 10.1.2.1 + // inheriting from nested types Assert.IsTrue(BaseClassTestClass25.testMethod()); } [TestMethod] public void BaseClass29_Test() { - OutputHelper.WriteLine("10.1.2.1 "); - OutputHelper.WriteLine("inheriting from nested types"); + // 10.1.2.1 + // inheriting from nested types Assert.IsTrue(BaseClassTestClass29.testMethod()); } @@ -86,7 +86,7 @@ public void BaseClass29_Test() [TestMethod] public void Modifiers2_Test() { - OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'new' "); + // Testing a public int inside an inner class with modifier 'new' Assert.IsTrue(ModifiersTestClass2.testMethod()); } @@ -95,7 +95,7 @@ public void Modifiers2_Test() public void Modifiers3_Test() { - OutputHelper.WriteLine("Testing a public int directly inside a public class"); + // Testing a public int directly inside a public class Assert.IsTrue(ModifiersTestClass3.testMethod()); } @@ -103,7 +103,7 @@ public void Modifiers3_Test() public void Modifiers4_Test() { - OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'public' "); + // Testing a public int inside an inner class with modifier 'public' Assert.IsTrue(ModifiersTestClass4.testMethod()); } @@ -111,7 +111,7 @@ public void Modifiers4_Test() public void Modifiers6_Test() { - OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'protected' "); + // Testing a public int inside an inner class with modifier 'protected' Assert.IsTrue(ModifiersTestClass6.testMethod()); } @@ -119,14 +119,14 @@ public void Modifiers6_Test() public void Modifiers7_Test() { - OutputHelper.WriteLine("Testing a public int directly inside an internal class"); + // Testing a public int directly inside an internal class Assert.IsTrue(ModifiersTestClass7.testMethod()); } [TestMethod] public void Modifiers8_Test() { - OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'internal' "); + // Testing a public int inside an inner class with modifier 'internal' Assert.IsTrue(ModifiersTestClass8.testMethod()); } @@ -134,7 +134,7 @@ public void Modifiers8_Test() public void Modifiers10_Test() { - OutputHelper.WriteLine("Testing a public int inside an inner class with modifier 'private' "); + // Testing a public int inside an inner class with modifier 'private' Assert.IsTrue(ModifiersTestClass10.testMethod()); } @@ -142,7 +142,7 @@ public void Modifiers10_Test() public void Modifiers11_Test() { - OutputHelper.WriteLine("Testing a public int inside an abstract class that is implemented"); + // Testing a public int inside an abstract class that is implemented Assert.IsTrue(ModifiersTestClass11.testMethod()); } @@ -150,14 +150,14 @@ public void Modifiers11_Test() public void Modifiers12_Test() { - OutputHelper.WriteLine("Testing a public int inside an inner abstract class that is implemented"); + // Testing a public int inside an inner abstract class that is implemented Assert.IsTrue(ModifiersTestClass12.testMethod()); } [TestMethod] public void Modifiers13_Test() { - OutputHelper.WriteLine("Testing a public int directly inside a sealed class"); + // Testing a public int directly inside a sealed class Assert.IsTrue(ModifiersTestClass13.testMethod()); } @@ -165,51 +165,51 @@ public void Modifiers13_Test() public void Modifiers14_Test() { - OutputHelper.WriteLine("Testing a public int inside an inner sealed class"); + // Testing a public int inside an inner sealed class Assert.IsTrue(ModifiersTestClass14.testMethod()); } [TestMethod] public void Modifiers23_Test() { - OutputHelper.WriteLine("An abstract class cannot be instantiated, and it is"); - OutputHelper.WriteLine("an error to use the new operator on an abstract class."); - OutputHelper.WriteLine("While it is possible to have variables and values whose"); - OutputHelper.WriteLine("compile-time types are abstract, such variables and values"); - OutputHelper.WriteLine("will necessarily either be null or contain references"); - OutputHelper.WriteLine("to instances of non-abstract classes derived from the "); - OutputHelper.WriteLine("abstract types."); + // An abstract class cannot be instantiated, and it is + // an error to use the new operator on an abstract class. + // While it is possible to have variables and values whose + // compile-time types are abstract, such variables and values + // will necessarily either be null or contain references + // to instances of non-abstract classes derived from the + // abstract types. Assert.IsTrue(ModifiersTestClass23.testMethod()); } [TestMethod] public void Modifiers24_Test() { - OutputHelper.WriteLine("An abstract class cannot be instantiated, and it is"); - OutputHelper.WriteLine("an error to use the new operator on an abstract class."); - OutputHelper.WriteLine("While it is possible to have variables and values whose"); - OutputHelper.WriteLine("compile-time types are abstract, such variables and values"); - OutputHelper.WriteLine("will necessarily either be null or contain references"); - OutputHelper.WriteLine("to instances of non-abstract classes derived from the "); - OutputHelper.WriteLine("abstract types."); + // An abstract class cannot be instantiated, and it is + // an error to use the new operator on an abstract class. + // While it is possible to have variables and values whose + // compile-time types are abstract, such variables and values + // will necessarily either be null or contain references + // to instances of non-abstract classes derived from the + // abstract types. Assert.IsTrue(ModifiersTestClass24.testMethod()); } [TestMethod] public void Modifiers25_Test() { - OutputHelper.WriteLine("Section 10.1"); - OutputHelper.WriteLine("An abstract class is permitted (but not required)"); - OutputHelper.WriteLine("to contain abstract methods and accessors."); + // Section 10.1 + // An abstract class is permitted (but not required) + // to contain abstract methods and accessors. Assert.IsTrue(ModifiersTestClass25.testMethod()); } [TestMethod] public void Modifiers26_Test() { - OutputHelper.WriteLine("Section 10.1"); - OutputHelper.WriteLine("An abstract class is permitted (but not required)"); - OutputHelper.WriteLine("to contain abstract methods and accessors."); + // Section 10.1 + // An abstract class is permitted (but not required) + // to contain abstract methods and accessors. Assert.IsTrue(ModifiersTestClass26.testMethod()); } @@ -217,13 +217,13 @@ public void Modifiers26_Test() public void Modifiers31_Test() { - OutputHelper.WriteLine("Section 10.1"); - OutputHelper.WriteLine("When a non-abstract class is derived from"); - OutputHelper.WriteLine("an abstract class, the non-abstract class must"); - OutputHelper.WriteLine("be include actual implementations of all inherited "); - OutputHelper.WriteLine("abstract methods and accessors. Such implementations"); - OutputHelper.WriteLine("are provided by overriding the abstract methods"); - OutputHelper.WriteLine("and accessors."); + // Section 10.1 + // When a non-abstract class is derived from + // an abstract class, the non-abstract class must + // be include actual implementations of all inherited + // abstract methods and accessors. Such implementations + // are provided by overriding the abstract methods + // and accessors. Assert.IsTrue(ModifiersTestClass31.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestDestructorTests.cs b/Tests/NFUnitTestClasses/UnitTestDestructorTests.cs index 22984d48..97d94e48 100644 --- a/Tests/NFUnitTestClasses/UnitTestDestructorTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestDestructorTests.cs @@ -19,11 +19,11 @@ class UnitTestDestructorTests //public void Destructors3_Test() //{ // //Ported from Destructors3.cs - // OutputHelper.WriteLine(" Section 10.11"); - // OutputHelper.WriteLine(" Destructors implement the actions required to "); - // OutputHelper.WriteLine(" destruct the instances of a class."); - // OutputHelper.WriteLine(""); - // OutputHelper.WriteLine("Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs"); + // // Section 10.11 + // // Destructors implement the actions required to + // // destruct the instances of a class. + // // + // // Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs // Assert.IsTrue(DestructorsTestClass3.testMethod()); //} @@ -31,11 +31,11 @@ class UnitTestDestructorTests //public void Destructors4_Test() //{ // //Ported from Destructors4.cs - // OutputHelper.WriteLine(" Section 10.11"); - // OutputHelper.WriteLine(" Destructors implement the actions required to "); - // OutputHelper.WriteLine(" destruct the instances of a class."); - // OutputHelper.WriteLine(""); - // OutputHelper.WriteLine("Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs"); + // // Section 10.11 + // // Destructors implement the actions required to + // // destruct the instances of a class. + // // + // // Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs // Assert.IsTrue(DestructorsTestClass4.testMethod()); //} @@ -44,12 +44,12 @@ class UnitTestDestructorTests //public void Destructors7_Test() //{ // //Ported from Destructors7.cs - // OutputHelper.WriteLine(" Section 10.12"); - // OutputHelper.WriteLine(" Destructors are not inherited. Thus, a class"); - // OutputHelper.WriteLine(" has no other destructors than those that are "); - // OutputHelper.WriteLine(" actually declared in the class."); - // OutputHelper.WriteLine(""); - // OutputHelper.WriteLine("Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs"); + // // Section 10.12 + // // Destructors are not inherited. Thus, a class + // // has no other destructors than those that are + // // actually declared in the class. + // // + // // Note: This test may fail due to lengthy garbage collection, look for Destructor messages in later logs // Assert.IsTrue(DestructorsTestClass7.testMethod()); //} @@ -60,7 +60,7 @@ class UnitTestDestructorTests // ~DestructorsTestClass3() // { - // //OutputHelper.WriteLine("Calling Destructor for Test Class 3"); + // // Calling Destructor for Test Class 3 // intI = 2; // } @@ -76,7 +76,7 @@ class UnitTestDestructorTests // System.Threading.Thread.Sleep(10); // slept += 10; // } - // OutputHelper.WriteLine("Thread has slept for"); + // // Thread has slept for // OutputHelper.WriteLine(slept.ToString()); // if (intI == 2) // { @@ -96,7 +96,7 @@ class DestructorsTestClass4_Base ~DestructorsTestClass4_Base() { intI = intI * 2; - //OutputHelper.WriteLine("Calling Destructor for Test Class 4 Base"); + // Calling Destructor for Test Class 4 Base } } @@ -106,7 +106,7 @@ class DestructorsTestClass4 : DestructorsTestClass4_Base ~DestructorsTestClass4() { intI = intI + 2; - //OutputHelper.WriteLine("Calling Destructor for Test Class 4"); + // Calling Destructor for Test Class 4 } public static bool testMethod() @@ -121,7 +121,7 @@ public static bool testMethod() System.Threading.Thread.Sleep(10); slept += 10; } - OutputHelper.WriteLine("Thread has slept for"); + // Thread has slept for OutputHelper.WriteLine(slept.ToString()); if (intI == 8) { @@ -145,7 +145,7 @@ class DestructorsTestClass7 : DestructorsTestClass7_Base ~DestructorsTestClass7() { intI = 3; - //OutputHelper.WriteLine("Calling Destructor for Test Class 7"); + // Calling Destructor for Test Class 7 } public static bool testMethod() @@ -160,7 +160,7 @@ public static bool testMethod() System.Threading.Thread.Sleep(10); slept += 10; } - OutputHelper.WriteLine("Thread has slept for"); + // Thread has slept for OutputHelper.WriteLine(slept.ToString()); if (intI == 3) { diff --git a/Tests/NFUnitTestClasses/UnitTestEventTests.cs b/Tests/NFUnitTestClasses/UnitTestEventTests.cs index 63a8da7c..83494f3d 100644 --- a/Tests/NFUnitTestClasses/UnitTestEventTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestEventTests.cs @@ -16,7 +16,7 @@ class UnitTestEventTests [TestMethod] public void Events1_Test() { - OutputHelper.WriteLine("This is testing an obsolete event structure, but should pass."); + // This is testing an obsolete event structure, but should pass. Assert.IsTrue(EventsTestClass1.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestFieldTests.cs b/Tests/NFUnitTestClasses/UnitTestFieldTests.cs index f5a82332..9df7b797 100644 --- a/Tests/NFUnitTestClasses/UnitTestFieldTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestFieldTests.cs @@ -16,379 +16,379 @@ class UnitTestFieldTests [TestMethod] public void Fields1_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. Assert.IsTrue(FieldsTestClass1.testMethod()); } [TestMethod] public void Fields2_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. Assert.IsTrue(FieldsTestClass2.testMethod()); } [TestMethod] public void Fields3_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. Assert.IsTrue(FieldsTestClass3.testMethod()); } [TestMethod] public void Fields4_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. Assert.IsTrue(FieldsTestClass4.testMethod()); } [TestMethod] public void Fields5_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. Assert.IsTrue(FieldsTestClass5.testMethod()); } [TestMethod] public void Fields6_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. Assert.IsTrue(FieldsTestClass6.testMethod()); } [TestMethod] public void Fields7_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. Assert.IsTrue(FieldsTestClass7.testMethod()); } [TestMethod] public void Fields8_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. Assert.IsTrue(FieldsTestClass8.testMethod()); } [TestMethod] public void Fields13_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A field-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers, a"); - OutputHelper.WriteLine(" static modifier, and a readonly modifier. The "); - OutputHelper.WriteLine(" attributes and modifiers apply to all of the "); - OutputHelper.WriteLine(" members declared by the field-declaration."); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" A field declaration that declares multiple fields"); - OutputHelper.WriteLine(" is equivalent to multiple declarations of single "); - OutputHelper.WriteLine(" fields with the same attributes, modifiers, and type."); + // Section 10.4 + // A field-declaration may include set of attributes, + // a new modifier, one of four access modifiers, a + // static modifier, and a readonly modifier. The + // attributes and modifiers apply to all of the + // members declared by the field-declaration. + // + // A field declaration that declares multiple fields + // is equivalent to multiple declarations of single + // fields with the same attributes, modifiers, and type. Assert.IsTrue(FieldsTestClass13.testMethod()); } [TestMethod] public void Fields14_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A static field identifies exactly on storage location."); - OutputHelper.WriteLine(" No matter how many instances of a class are created,"); - OutputHelper.WriteLine(" there is only ever one copy of a static field."); + // Section 10.4 + // A static field identifies exactly on storage location. + // No matter how many instances of a class are created, + // there is only ever one copy of a static field. Assert.IsTrue(FieldsTestClass14.testMethod()); } [TestMethod] public void Fields15_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A static field comes into existence when the "); - OutputHelper.WriteLine(" type in which it is declared is loaded, and "); - OutputHelper.WriteLine(" ceases to exist when the type in which it "); - OutputHelper.WriteLine(" is declared in unloaded."); + // Section 10.4 + // A static field comes into existence when the + // type in which it is declared is loaded, and + // ceases to exist when the type in which it + // is declared in unloaded. Assert.IsTrue(FieldsTestClass15.testMethod()); } [TestMethod] public void Fields16_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" Every instance of a class contains a separate copy"); - OutputHelper.WriteLine(" of all instance fields of the class. An instance "); - OutputHelper.WriteLine(" field comes into existence when a new instance of "); - OutputHelper.WriteLine(" its class is created, and ceases to exist when there "); - OutputHelper.WriteLine(" are no references to that instance and the destructor"); - OutputHelper.WriteLine(" of the instance has executed."); + // Section 10.4 + // Every instance of a class contains a separate copy + // of all instance fields of the class. An instance + // field comes into existence when a new instance of + // its class is created, and ceases to exist when there + // are no references to that instance and the destructor + // of the instance has executed. Assert.IsTrue(FieldsTestClass16.testMethod()); } [TestMethod] public void Fields17_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" Every instance of a class contains a separate copy"); - OutputHelper.WriteLine(" of all instance fields of the class. An instance "); - OutputHelper.WriteLine(" field comes into existence when a new instance of "); - OutputHelper.WriteLine(" its class is created, and ceases to exist when there "); - OutputHelper.WriteLine(" are no references to that instance and the destructor"); - OutputHelper.WriteLine(" of the instance has executed."); + // Section 10.4 + // Every instance of a class contains a separate copy + // of all instance fields of the class. An instance + // field comes into existence when a new instance of + // its class is created, and ceases to exist when there + // are no references to that instance and the destructor + // of the instance has executed. Assert.IsTrue(FieldsTestClass17.testMethod()); } [TestMethod] public void Fields18_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" When a field is referenced in a member-access of"); - OutputHelper.WriteLine(" the form E.M, if M is a static field, E must denote"); - OutputHelper.WriteLine(" a type, and if M is an instance field, E must "); - OutputHelper.WriteLine(" denote an instance."); + // Section 10.4 + // When a field is referenced in a member-access of + // the form E.M, if M is a static field, E must denote + // a type, and if M is an instance field, E must + // denote an instance. Assert.IsTrue(FieldsTestClass18.testMethod()); } [TestMethod] public void Fields20_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" When a field is referenced in a member-access of"); - OutputHelper.WriteLine(" the form E.M, if M is a static field, E must denote"); - OutputHelper.WriteLine(" a type, and if M is an instance field, E must "); - OutputHelper.WriteLine(" denote an instance."); + // Section 10.4 + // When a field is referenced in a member-access of + // the form E.M, if M is a static field, E must denote + // a type, and if M is an instance field, E must + // denote an instance. Assert.IsTrue(FieldsTestClass20.testMethod()); } [TestMethod] public void Fields22_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" When a field-declaration includes a readonly"); - OutputHelper.WriteLine(" modifier, assignments to the fields introduced"); - OutputHelper.WriteLine(" by the declaration can only occur as part of"); - OutputHelper.WriteLine(" the declaration or in a constructor in the"); - OutputHelper.WriteLine(" same class."); + // Section 10.4 + // When a field-declaration includes a readonly + // modifier, assignments to the fields introduced + // by the declaration can only occur as part of + // the declaration or in a constructor in the + // same class. Assert.IsTrue(FieldsTestClass22.testMethod()); } [TestMethod] public void Fields23_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" When a field-declaration includes a readonly"); - OutputHelper.WriteLine(" modifier, assignments to the fields introduced"); - OutputHelper.WriteLine(" by the declaration can only occur as part of"); - OutputHelper.WriteLine(" the declaration or in a constructor in the"); - OutputHelper.WriteLine(" same class."); + // Section 10.4 + // When a field-declaration includes a readonly + // modifier, assignments to the fields introduced + // by the declaration can only occur as part of + // the declaration or in a constructor in the + // same class. Assert.IsTrue(FieldsTestClass23.testMethod()); } [TestMethod] public void Fields24_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" When a field-declaration includes a readonly"); - OutputHelper.WriteLine(" modifier, assignments to the fields introduced"); - OutputHelper.WriteLine(" by the declaration can only occur as part of"); - OutputHelper.WriteLine(" the declaration or in a constructor in the"); - OutputHelper.WriteLine(" same class."); + // Section 10.4 + // When a field-declaration includes a readonly + // modifier, assignments to the fields introduced + // by the declaration can only occur as part of + // the declaration or in a constructor in the + // same class. Assert.IsTrue(FieldsTestClass24.testMethod()); } [TestMethod] public void Fields41_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" A static readonly field is useful when a symbolic"); - OutputHelper.WriteLine(" name for a constant value is desired, but when the "); - OutputHelper.WriteLine(" type of the value is not permitted in a const declaration"); - OutputHelper.WriteLine(" or when the value cannot be computed at compile-time"); - OutputHelper.WriteLine(" by a constant expression."); + // Section 10.4 + // A static readonly field is useful when a symbolic + // name for a constant value is desired, but when the + // type of the value is not permitted in a const declaration + // or when the value cannot be computed at compile-time + // by a constant expression. Assert.IsTrue(FieldsTestClass41.testMethod()); } [TestMethod] public void Fields42_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" Field declarations may include variable-initializers."); - OutputHelper.WriteLine(" For static fields, varaible initializers correspond to"); - OutputHelper.WriteLine(" assignment statements that are executed when the class"); - OutputHelper.WriteLine(" is loaded. For instance fields, variable initializers"); - OutputHelper.WriteLine(" correspond to assignment statements that are executed"); - OutputHelper.WriteLine(" when an instance of the class is created."); - OutputHelper.WriteLine("This test has been rewritten to avoid use of the Math.Abs function which the MF does not support"); + // Section 10.4 + // Field declarations may include variable-initializers. + // For static fields, varaible initializers correspond to + // assignment statements that are executed when the class + // is loaded. For instance fields, variable initializers + // correspond to assignment statements that are executed + // when an instance of the class is created. + // This test has been rewritten to avoid use of the Math.Abs function which the MF does not support Assert.IsTrue(FieldsTestClass42.testMethod()); } [TestMethod] public void Fields43_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" The static field variable initializers of a class"); - OutputHelper.WriteLine(" correspond to a sequence of assignments that are "); - OutputHelper.WriteLine(" executed immediately upon entry to the static"); - OutputHelper.WriteLine(" constructor of a class. The variable initializers"); - OutputHelper.WriteLine(" are executed in the textual order they appear"); - OutputHelper.WriteLine(" in the class declaration."); + // Section 10.4 + // The static field variable initializers of a class + // correspond to a sequence of assignments that are + // executed immediately upon entry to the static + // constructor of a class. The variable initializers + // are executed in the textual order they appear + // in the class declaration. Assert.IsTrue(FieldsTestClass43.testMethod()); } [TestMethod] public void Fields44_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" The static field variable initializers of a class"); - OutputHelper.WriteLine(" correspond to a sequence of assignments that are "); - OutputHelper.WriteLine(" executed immediately upon entry to the static"); - OutputHelper.WriteLine(" constructor of a class. The variable initializers"); - OutputHelper.WriteLine(" are executed in the textual order they appear"); - OutputHelper.WriteLine(" in the class declaration."); + // Section 10.4 + // The static field variable initializers of a class + // correspond to a sequence of assignments that are + // executed immediately upon entry to the static + // constructor of a class. The variable initializers + // are executed in the textual order they appear + // in the class declaration. Assert.IsTrue(FieldsTestClass44.testMethod()); } [TestMethod] public void Fields45_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" The static field variable initializers of a class"); - OutputHelper.WriteLine(" correspond to a sequence of assignments that are "); - OutputHelper.WriteLine(" executed immediately upon entry to the static"); - OutputHelper.WriteLine(" constructor of a class. The variable initializers"); - OutputHelper.WriteLine(" are executed in the textual order they appear"); - OutputHelper.WriteLine(" in the class declaration."); + // Section 10.4 + // The static field variable initializers of a class + // correspond to a sequence of assignments that are + // executed immediately upon entry to the static + // constructor of a class. The variable initializers + // are executed in the textual order they appear + // in the class declaration. Assert.IsTrue(FieldsTestClass45.testMethod()); } [TestMethod] public void Fields46_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" The instance field variable initializers of a class"); - OutputHelper.WriteLine(" correspond to a sequence of assignments that are "); - OutputHelper.WriteLine(" executed immediately upon entry to one of the instance"); - OutputHelper.WriteLine(" constructors of the class."); + // Section 10.4 + // The instance field variable initializers of a class + // correspond to a sequence of assignments that are + // executed immediately upon entry to one of the instance + // constructors of the class. Assert.IsTrue(FieldsTestClass46.testMethod()); } [TestMethod] public void Fields49_testMethod() { - OutputHelper.WriteLine(" A variable initializer for an instance field"); - OutputHelper.WriteLine(" cannot reference the instance being created."); - OutputHelper.WriteLine(" Thus, it is an error to reference this in a "); - OutputHelper.WriteLine(" variable initializer, as it is an error for"); - OutputHelper.WriteLine(" a variable initialzer to reference any instance"); - OutputHelper.WriteLine(" member through a simple-name."); + // A variable initializer for an instance field + // cannot reference the instance being created. + // Thus, it is an error to reference this in a + // variable initializer, as it is an error for + // a variable initialzer to reference any instance + // member through a simple-name. Assert.IsTrue(FieldsTestClass49.testMethod()); } [TestMethod] public void Fields51_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" Specifically, assignments to a readonly field"); - OutputHelper.WriteLine(" are permitted only in the following context."); - OutputHelper.WriteLine(" ..."); - OutputHelper.WriteLine(" For an instance field, in the instance constructors"); - OutputHelper.WriteLine(" of the class that contains the field declaration, or"); - OutputHelper.WriteLine(" for a static field, in the static constructor of the"); - OutputHelper.WriteLine(" class the contains the field declaration. These are also"); - OutputHelper.WriteLine(" contexts in which it is valid to pass a readonly field"); - OutputHelper.WriteLine(" as an out or ref parameter."); + // Section 10.4 + // Specifically, assignments to a readonly field + // are permitted only in the following context. + // ... + // For an instance field, in the instance constructors + // of the class that contains the field declaration, or + // for a static field, in the static constructor of the + // class the contains the field declaration. These are also + // contexts in which it is valid to pass a readonly field + // as an out or ref parameter. Assert.IsTrue(FieldsTestClass51.testMethod()); } [TestMethod] public void Fields52_testMethod() { - OutputHelper.WriteLine(" Section 10.4"); - OutputHelper.WriteLine(" Specifically, assignments to a readonly field"); - OutputHelper.WriteLine(" are permitted only in the following context."); - OutputHelper.WriteLine(" ..."); - OutputHelper.WriteLine(" For an instance field, in the instance constructors"); - OutputHelper.WriteLine(" of the class that contains the field declaration, or"); - OutputHelper.WriteLine(" for a static field, in the static constructor of the"); - OutputHelper.WriteLine(" class the contains the field declaration. These are also"); - OutputHelper.WriteLine(" contexts in which it is valid to pass a readonly field"); - OutputHelper.WriteLine(" as an out or ref parameter."); + // Section 10.4 + // Specifically, assignments to a readonly field + // are permitted only in the following context. + // ... + // For an instance field, in the instance constructors + // of the class that contains the field declaration, or + // for a static field, in the static constructor of the + // class the contains the field declaration. These are also + // contexts in which it is valid to pass a readonly field + // as an out or ref parameter. Assert.IsTrue(FieldsTestClass52.testMethod()); } [TestMethod] public void Fields53_testMethod() { - OutputHelper.WriteLine("Testing bools assigned with (x == y)"); + // Testing bools assigned with (x == y) Assert.IsTrue(FieldsTestClass53.testMethod()); } [TestMethod] public void Fields54_testMethod() { - OutputHelper.WriteLine("Testing bools assigned with function calls"); + // Testing bools assigned with function calls Assert.IsTrue(FieldsTestClass54.testMethod()); } [TestMethod] public void Fields55_testMethod() { - OutputHelper.WriteLine("Testing bools assigned with conditionals"); + // Testing bools assigned with conditionals Assert.IsTrue(FieldsTestClass55.testMethod()); } [TestMethod] public void Fields56_testMethod() { - OutputHelper.WriteLine("Testing ints assigned with function calls"); + // Testing ints assigned with function calls Assert.IsTrue(FieldsTestClass56.testMethod()); } [TestMethod] public void Fields57_testMethod() { - OutputHelper.WriteLine("Testing strings assigned with \"x\" + \"y\""); + // Testing strings assigned with \"x\" + \"y\" Assert.IsTrue(FieldsTestClass57.testMethod()); } [TestMethod] public void Fields58_testMethod() { - OutputHelper.WriteLine("Testing strings assigned with function calls"); + // Testing strings assigned with function calls Assert.IsTrue(FieldsTestClass58.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestIndexerTests.cs b/Tests/NFUnitTestClasses/UnitTestIndexerTests.cs index 3a09359c..89710ef5 100644 --- a/Tests/NFUnitTestClasses/UnitTestIndexerTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestIndexerTests.cs @@ -16,30 +16,30 @@ class UnitTestIndexerTests [TestMethod] public void Indexers1_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" An indexer-declaration may include set of"); - OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); - OutputHelper.WriteLine(" of the four access modifiers."); + // Section 10.8 + // An indexer-declaration may include set of + // attributes, a new modifier, and a valid combination + // of the four access modifiers. Assert.IsTrue(IndexersTestClass1.testMethod()); } [TestMethod] public void Indexers2_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" An indexer-declaration may include set of"); - OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); - OutputHelper.WriteLine(" of the four access modifiers."); + // Section 10.8 + // An indexer-declaration may include set of + // attributes, a new modifier, and a valid combination + // of the four access modifiers. Assert.IsTrue(IndexersTestClass2.testMethod()); } [TestMethod] public void Indexers3_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" An indexer-declaration may include set of"); - OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); - OutputHelper.WriteLine(" of the four access modifiers."); + // Section 10.8 + // An indexer-declaration may include set of + // attributes, a new modifier, and a valid combination + // of the four access modifiers. Assert.IsTrue(IndexersTestClass3.testMethod()); } @@ -47,257 +47,257 @@ public void Indexers3_Test() [TestMethod] public void Indexers4_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" An indexer-declaration may include set of"); - OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); - OutputHelper.WriteLine(" of the four access modifiers."); + // Section 10.8 + // An indexer-declaration may include set of + // attributes, a new modifier, and a valid combination + // of the four access modifiers. Assert.IsTrue(IndexersTestClass4.testMethod()); } [TestMethod] public void Indexers5_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" An indexer-declaration may include set of"); - OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); - OutputHelper.WriteLine(" of the four access modifiers."); + // Section 10.8 + // An indexer-declaration may include set of + // attributes, a new modifier, and a valid combination + // of the four access modifiers. Assert.IsTrue(IndexersTestClass5.testMethod()); } [TestMethod] public void Indexers6_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" An indexer-declaration may include set of"); - OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); - OutputHelper.WriteLine(" of the four access modifiers."); + // Section 10.8 + // An indexer-declaration may include set of + // attributes, a new modifier, and a valid combination + // of the four access modifiers. Assert.IsTrue(IndexersTestClass6.testMethod()); } [TestMethod] public void Indexers10_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" An indexer-declaration may include set of"); - OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); - OutputHelper.WriteLine(" of the four access modifiers."); + // Section 10.8 + // An indexer-declaration may include set of + // attributes, a new modifier, and a valid combination + // of the four access modifiers. Assert.IsTrue(IndexersTestClass10.testMethod()); } [TestMethod] public void Indexers11_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" An indexer-declaration may include set of"); - OutputHelper.WriteLine(" attributes, a new modifier, and a valid combination"); - OutputHelper.WriteLine(" of the four access modifiers."); + // Section 10.8 + // An indexer-declaration may include set of + // attributes, a new modifier, and a valid combination + // of the four access modifiers. Assert.IsTrue(IndexersTestClass11.testMethod()); } [TestMethod] public void Indexers12_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" The type on an indexer declaration specifies"); - OutputHelper.WriteLine(" the element type of the indexer introduced"); - OutputHelper.WriteLine(" by the declaration"); + // Section 10.8 + // The type on an indexer declaration specifies + // the element type of the indexer introduced + // by the declaration Assert.IsTrue(IndexersTestClass12.testMethod()); } [TestMethod] public void Indexers14_Test() { - OutputHelper.WriteLine(" Unless the indexer is an explicit interface"); - OutputHelper.WriteLine(" member implementation, the type is followed"); - OutputHelper.WriteLine(" by the keyword this. For an explicit "); - OutputHelper.WriteLine(" interface member implementation, the type is "); - OutputHelper.WriteLine(" followed by an interface-type, a . and the "); - OutputHelper.WriteLine(" keyword this."); - OutputHelper.WriteLine("This is currently an expected fail, but is resolved in 3.0 see Bug 16341 for details"); + // Unless the indexer is an explicit interface + // member implementation, the type is followed + // by the keyword this. For an explicit + // interface member implementation, the type is + // followed by an interface-type, a . and the + // keyword this. + // This is currently an expected fail, but is resolved in 3.0 see Bug 16341 for details Assert.IsTrue(IndexersTestClass14.testMethod()); } [TestMethod] public void Indexers18_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" The formal-index-parameter-list specifies"); - OutputHelper.WriteLine(" the parameters of the indexer. The formal"); - OutputHelper.WriteLine(" parameter list of an indexer corresponds"); - OutputHelper.WriteLine(" to that of a method, except that at least"); - OutputHelper.WriteLine(" one parameter must be specified, and that the"); - OutputHelper.WriteLine(" ref and out parameter modifiers are not"); - OutputHelper.WriteLine(" permitted."); + // Section 10.8 + // The formal-index-parameter-list specifies + // the parameters of the indexer. The formal + // parameter list of an indexer corresponds + // to that of a method, except that at least + // one parameter must be specified, and that the + // ref and out parameter modifiers are not + // permitted. Assert.IsTrue(IndexersTestClass18.testMethod()); } [TestMethod] public void Indexers23_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" The type of an indexer declaration and each "); - OutputHelper.WriteLine(" of the types referenced in the formal-index"); - OutputHelper.WriteLine(" parameter list must be at least as accessible"); - OutputHelper.WriteLine(" as the indexer itself."); + // Section 10.8 + // The type of an indexer declaration and each + // of the types referenced in the formal-index + // parameter list must be at least as accessible + // as the indexer itself. Assert.IsTrue(IndexersTestClass23.testMethod()); } [TestMethod] public void Indexers29_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" The formal parameter list of an indexer defines"); - OutputHelper.WriteLine(" the signature of the indexer. Specifically, the"); - OutputHelper.WriteLine(" signature of an indexer consists of the number and"); - OutputHelper.WriteLine(" types of its formal parameters. The element type"); - OutputHelper.WriteLine(" is not a part of an index signature, nor are the"); - OutputHelper.WriteLine(" names of the formal parameters."); + // Section 10.8 + // The formal parameter list of an indexer defines + // the signature of the indexer. Specifically, the + // signature of an indexer consists of the number and + // types of its formal parameters. The element type + // is not a part of an index signature, nor are the + // names of the formal parameters. Assert.IsTrue(IndexersTestClass29.testMethod()); } [TestMethod] public void Indexers32_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" The formal parameter list of an indexer defines"); - OutputHelper.WriteLine(" the signature of the indexer. Specifically, the"); - OutputHelper.WriteLine(" signature of an indexer consists of the number and"); - OutputHelper.WriteLine(" types of its formal parameters. The element type"); - OutputHelper.WriteLine(" is not a part of an index signature, nor are the"); - OutputHelper.WriteLine(" names of the formal parameters."); + // Section 10.8 + // The formal parameter list of an indexer defines + // the signature of the indexer. Specifically, the + // signature of an indexer consists of the number and + // types of its formal parameters. The element type + // is not a part of an index signature, nor are the + // names of the formal parameters. Assert.IsTrue(IndexersTestClass32.testMethod()); } [TestMethod] public void Indexers33_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" The formal parameter list of an indexer defines"); - OutputHelper.WriteLine(" the signature of the indexer. Specifically, the"); - OutputHelper.WriteLine(" signature of an indexer consists of the number and"); - OutputHelper.WriteLine(" types of its formal parameters. The element type"); - OutputHelper.WriteLine(" is not a part of an index signature, nor are the"); - OutputHelper.WriteLine(" names of the formal parameters."); + // Section 10.8 + // The formal parameter list of an indexer defines + // the signature of the indexer. Specifically, the + // signature of an indexer consists of the number and + // types of its formal parameters. The element type + // is not a part of an index signature, nor are the + // names of the formal parameters. Assert.IsTrue(IndexersTestClass33.testMethod()); } [TestMethod] public void Indexers37_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" With these differences in mind, all rules"); - OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); - OutputHelper.WriteLine(" accessors as well as property accessors."); + // Section 10.8 + // With these differences in mind, all rules + // defined in 10.6.2 and 10.6.3 apply to indexer + // accessors as well as property accessors. Assert.IsTrue(IndexersTestClass37.testMethod()); } [TestMethod] public void Indexers38_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" With these differences in mind, all rules"); - OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); - OutputHelper.WriteLine(" accessors as well as property accessors."); + // Section 10.8 + // With these differences in mind, all rules + // defined in 10.6.2 and 10.6.3 apply to indexer + // accessors as well as property accessors. Assert.IsTrue(IndexersTestClass38.testMethod()); } [TestMethod] public void Indexers39_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" With these differences in mind, all rules"); - OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); - OutputHelper.WriteLine(" accessors as well as property accessors."); + // Section 10.8 + // With these differences in mind, all rules + // defined in 10.6.2 and 10.6.3 apply to indexer + // accessors as well as property accessors. Assert.IsTrue(IndexersTestClass39.testMethod()); } [TestMethod] public void Indexers42_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" With these differences in mind, all rules"); - OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); - OutputHelper.WriteLine(" accessors as well as property accessors."); + // Section 10.8 + // With these differences in mind, all rules + // defined in 10.6.2 and 10.6.3 apply to indexer + // accessors as well as property accessors. Assert.IsTrue(IndexersTestClass42.testMethod()); } [TestMethod] public void Indexers43_Test() { - OutputHelper.WriteLine(" Section 10.8"); - OutputHelper.WriteLine(" With these differences in mind, all rules"); - OutputHelper.WriteLine(" defined in 10.6.2 and 10.6.3 apply to indexer"); - OutputHelper.WriteLine(" accessors as well as property accessors."); + // Section 10.8 + // With these differences in mind, all rules + // defined in 10.6.2 and 10.6.3 apply to indexer + // accessors as well as property accessors. Assert.IsTrue(IndexersTestClass43.testMethod()); } [TestMethod] public void Indexers46_Test() { - OutputHelper.WriteLine("Testing multiple comma seperated indexers"); + // Testing multiple comma seperated indexers Assert.IsTrue(IndexersTestClass46.testMethod()); } [TestMethod] public void Indexers47_Test() { - OutputHelper.WriteLine("Testing multiple comma seperated indexers to a public variable"); + // Testing multiple comma seperated indexers to a public variable Assert.IsTrue(IndexersTestClass47.testMethod()); } [TestMethod] public void Indexers48_Test() { - OutputHelper.WriteLine("Testing multiple comma seperated indexers with a protected internal get and set"); + // Testing multiple comma seperated indexers with a protected internal get and set Assert.IsTrue(IndexersTestClass48.testMethod()); } [TestMethod] public void Indexers49_Test() { - OutputHelper.WriteLine("Testing multiple comma seperated indexers with an internal get and set"); + // Testing multiple comma seperated indexers with an internal get and set Assert.IsTrue(IndexersTestClass49.testMethod()); } [TestMethod] public void Indexers50_Test() { - OutputHelper.WriteLine("Testing multiple comma seperated indexers with a private get and set"); + // Testing multiple comma seperated indexers with a private get and set Assert.IsTrue(IndexersTestClass50.testMethod()); } [TestMethod] public void Indexers51_Test() { - OutputHelper.WriteLine("Testing multiple comma seperated indexers with a public virtual get and set"); + // Testing multiple comma seperated indexers with a public virtual get and set Assert.IsTrue(IndexersTestClass51.testMethod()); } [TestMethod] public void Indexers52_Test() { - OutputHelper.WriteLine("Testing multiple comma seperated indexers with an overridden public virtual get and set"); - OutputHelper.WriteLine("This test is expected to fail"); + // Testing multiple comma seperated indexers with an overridden public virtual get and set + // This test is expected to fail Assert.IsFalse(IndexersTestClass52.testMethod()); } [TestMethod] public void Indexers53_Test() { - OutputHelper.WriteLine("Testing multiple comma seperated indexers with an overridden public abstract get and set"); + // Testing multiple comma seperated indexers with an overridden public abstract get and set Assert.IsTrue(IndexersTestClass53.testMethod()); } [TestMethod] public void Indexers55_Test() { - OutputHelper.WriteLine("Testing 10 explicitly specified indexers"); + // Testing 10 explicitly specified indexers Assert.IsTrue(IndexersTestClass55.testMethod()); } [TestMethod] public void Indexers56_Test() { - OutputHelper.WriteLine("Testing a single indexers with an overridden public abstract get"); + // Testing a single indexers with an overridden public abstract get Assert.IsTrue(IndexersTestClass56.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestMembersTests.cs b/Tests/NFUnitTestClasses/UnitTestMembersTests.cs index eb163a14..3118ab4f 100644 --- a/Tests/NFUnitTestClasses/UnitTestMembersTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestMembersTests.cs @@ -10,72 +10,72 @@ class UnitTestMembersTests [TestMethod] public void Members23_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" The inherited members of a class are specifically"); - OutputHelper.WriteLine(" not part of the declaration space of a class. Thus, a "); - OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); - OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); - OutputHelper.WriteLine(" hides the inherited member)."); + // Section 10.2 + // The inherited members of a class are specifically + // not part of the declaration space of a class. Thus, a + // derived class is allowed to declare a member with the same + // name or signature as an inherited member (which in effect + // hides the inherited member). Assert.IsTrue(MembersTestClass023.testMethod()); } [TestMethod] public void Members24_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" The inherited members of a class are specifically"); - OutputHelper.WriteLine(" not part of the declaration space of a class. Thus, a "); - OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); - OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); - OutputHelper.WriteLine(" hides the inherited member)."); + // Section 10.2 + // The inherited members of a class are specifically + // not part of the declaration space of a class. Thus, a + // derived class is allowed to declare a member with the same + // name or signature as an inherited member (which in effect + // hides the inherited member). Assert.IsTrue(MembersTestClass024.testMethod()); } [TestMethod] public void Members25_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" The inherited members of a class are specifically"); - OutputHelper.WriteLine(" not part of the declaration space of a class. Thus, a "); - OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); - OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); - OutputHelper.WriteLine(" hides the inherited member)."); + // Section 10.2 + // The inherited members of a class are specifically + // not part of the declaration space of a class. Thus, a + // derived class is allowed to declare a member with the same + // name or signature as an inherited member (which in effect + // hides the inherited member). Assert.IsTrue(MembersTestClass025.testMethod()); } [TestMethod] public void Members26_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" The inherited members of a class are specifically"); - OutputHelper.WriteLine(" not part of the declaration space of a class. Thus, a "); - OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); - OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); - OutputHelper.WriteLine(" hides the inherited member)."); + // Section 10.2 + // The inherited members of a class are specifically + // not part of the declaration space of a class. Thus, a + // derived class is allowed to declare a member with the same + // name or signature as an inherited member (which in effect + // hides the inherited member). Assert.IsTrue(MembersTestClass026.testMethod()); } [TestMethod] public void Members27_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" The inherited members of a class are specifically"); - OutputHelper.WriteLine(" not part of the declaration space of a class. Thus, a "); - OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); - OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); - OutputHelper.WriteLine(" hides the inherited member)."); + // Section 10.2 + // The inherited members of a class are specifically + // not part of the declaration space of a class. Thus, a + // derived class is allowed to declare a member with the same + // name or signature as an inherited member (which in effect + // hides the inherited member). Assert.IsTrue(MembersTestClass027.testMethod()); } [TestMethod] public void Members28_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" The inherited members of a class are specifically"); - OutputHelper.WriteLine(" not part of the declaration space of a class. Thus, a "); - OutputHelper.WriteLine(" derived class is allowed to declare a member with the same "); - OutputHelper.WriteLine(" name or signature as an inherited member (which in effect"); - OutputHelper.WriteLine(" hides the inherited member)."); + // Section 10.2 + // The inherited members of a class are specifically + // not part of the declaration space of a class. Thus, a + // derived class is allowed to declare a member with the same + // name or signature as an inherited member (which in effect + // hides the inherited member). Assert.IsTrue(MembersTestClass028.testMethod()); } @@ -83,436 +83,436 @@ public void Members28_Test() [TestMethod] public void MembersInheritance001_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); - OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); - OutputHelper.WriteLine(" members declared in B as well as the members"); + // Section 10.2 + // Inheritance is transitive. If C is derived from + // B, and B is derived from A, then C inherits the + // members declared in B as well as the members Assert.IsTrue(MembersInheritanceTestClass001.testMethod()); } [TestMethod] public void MembersInheritance002_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); - OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); - OutputHelper.WriteLine(" members declared in B as well as the members"); + // Section 10.2 + // Inheritance is transitive. If C is derived from + // B, and B is derived from A, then C inherits the + // members declared in B as well as the members Assert.IsTrue(MembersInheritanceTestClass002.testMethod()); } [TestMethod] public void MembersInheritance003_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); - OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); - OutputHelper.WriteLine(" members declared in B as well as the members"); + // Section 10.2 + // Inheritance is transitive. If C is derived from + // B, and B is derived from A, then C inherits the + // members declared in B as well as the members Assert.IsTrue(MembersInheritanceTestClass003.testMethod()); } [TestMethod] public void MembersInheritance004_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); - OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); - OutputHelper.WriteLine(" members declared in B as well as the members"); + // Section 10.2 + // Inheritance is transitive. If C is derived from + // B, and B is derived from A, then C inherits the + // members declared in B as well as the members Assert.IsTrue(MembersInheritanceTestClass004.testMethod()); } [TestMethod] public void MembersInheritance005_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); - OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); - OutputHelper.WriteLine(" members declared in B as well as the members"); + // Section 10.2 + // Inheritance is transitive. If C is derived from + // B, and B is derived from A, then C inherits the + // members declared in B as well as the members Assert.IsTrue(MembersInheritanceTestClass005.testMethod()); } [TestMethod] public void MembersInheritance006_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); - OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); - OutputHelper.WriteLine(" members declared in B as well as the members"); + // Section 10.2 + // Inheritance is transitive. If C is derived from + // B, and B is derived from A, then C inherits the + // members declared in B as well as the members Assert.IsTrue(MembersInheritanceTestClass006.testMethod()); } [TestMethod] public void MembersInheritance007_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); - OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); - OutputHelper.WriteLine(" members declared in B as well as the members"); + // Section 10.2 + // Inheritance is transitive. If C is derived from + // B, and B is derived from A, then C inherits the + // members declared in B as well as the members Assert.IsTrue(MembersInheritanceTestClass007.testMethod()); } [TestMethod] public void MembersInheritance008_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Inheritance is transitive. If C is derived from"); - OutputHelper.WriteLine(" B, and B is derived from A, then C inherits the"); - OutputHelper.WriteLine(" members declared in B as well as the members"); + // Section 10.2 + // Inheritance is transitive. If C is derived from + // B, and B is derived from A, then C inherits the + // members declared in B as well as the members Assert.IsTrue(MembersInheritanceTestClass008.testMethod()); } [TestMethod] public void MembersInheritance018_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Constructors and destructors are not inherited, but all"); - OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); - OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); - OutputHelper.WriteLine(" members may not be accessible in the derived class."); + // Section 10.2 + // Constructors and destructors are not inherited, but all + // other members are, regardless of their declared accessibility. + // However, depending on their declared accessibility, inherited + // members may not be accessible in the derived class. Assert.IsTrue(MembersInheritanceTestClass018.testMethod()); } [TestMethod] public void MembersInheritance019_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Constructors and destructors are not inherited, but all"); - OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); - OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); - OutputHelper.WriteLine(" members may not be accessible in the derived class."); + // Section 10.2 + // Constructors and destructors are not inherited, but all + // other members are, regardless of their declared accessibility. + // However, depending on their declared accessibility, inherited + // members may not be accessible in the derived class. Assert.IsTrue(MembersInheritanceTestClass019.testMethod()); } [TestMethod] public void MembersInheritance020_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Constructors and destructors are not inherited, but all"); - OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); - OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); - OutputHelper.WriteLine(" members may not be accessible in the derived class."); + // Section 10.2 + // Constructors and destructors are not inherited, but all + // other members are, regardless of their declared accessibility. + // However, depending on their declared accessibility, inherited + // members may not be accessible in the derived class. Assert.IsTrue(MembersInheritanceTestClass020.testMethod()); } [TestMethod] public void MembersInheritance021_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Constructors and destructors are not inherited, but all"); - OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); - OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); - OutputHelper.WriteLine(" members may not be accessible in the derived class."); + // Section 10.2 + // Constructors and destructors are not inherited, but all + // other members are, regardless of their declared accessibility. + // However, depending on their declared accessibility, inherited + // members may not be accessible in the derived class. Assert.IsTrue(MembersInheritanceTestClass021.testMethod()); } [TestMethod] public void MembersInheritance022_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Constructors and destructors are not inherited, but all"); - OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); - OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); - OutputHelper.WriteLine(" members may not be accessible in the derived class."); + // Section 10.2 + // Constructors and destructors are not inherited, but all + // other members are, regardless of their declared accessibility. + // However, depending on their declared accessibility, inherited + // members may not be accessible in the derived class. Assert.IsTrue(MembersInheritanceTestClass022.testMethod()); } [TestMethod] public void MembersInheritance023_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Constructors and destructors are not inherited, but all"); - OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); - OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); - OutputHelper.WriteLine(" members may not be accessible in the derived class."); + // Section 10.2 + // Constructors and destructors are not inherited, but all + // other members are, regardless of their declared accessibility. + // However, depending on their declared accessibility, inherited + // members may not be accessible in the derived class. Assert.IsTrue(MembersInheritanceTestClass023.testMethod()); } [TestMethod] public void MembersInheritance024_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Constructors and destructors are not inherited, but all"); - OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); - OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); - OutputHelper.WriteLine(" members may not be accessible in the derived class."); + // Section 10.2 + // Constructors and destructors are not inherited, but all + // other members are, regardless of their declared accessibility. + // However, depending on their declared accessibility, inherited + // members may not be accessible in the derived class. Assert.IsTrue(MembersInheritanceTestClass024.testMethod()); } [TestMethod] public void MembersInheritance025_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" Constructors and destructors are not inherited, but all"); - OutputHelper.WriteLine(" other members are, regardless of their declared accessibility."); - OutputHelper.WriteLine(" However, depending on their declared accessibility, inherited"); - OutputHelper.WriteLine(" members may not be accessible in the derived class."); + // Section 10.2 + // Constructors and destructors are not inherited, but all + // other members are, regardless of their declared accessibility. + // However, depending on their declared accessibility, inherited + // members may not be accessible in the derived class. Assert.IsTrue(MembersInheritanceTestClass025.testMethod()); } [TestMethod] public void MembersInheritance026_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" An instance of a class contains a copy of all instance fields"); - OutputHelper.WriteLine(" declared in the class and its base classes, and an implicit"); - OutputHelper.WriteLine(" conversion exists from a derived class type to any of its base "); - OutputHelper.WriteLine(" class types. Thus, a reference to a derived class instance"); - OutputHelper.WriteLine(" can be treated as a reference to a base class instance."); + // Section 10.2 + // An instance of a class contains a copy of all instance fields + // declared in the class and its base classes, and an implicit + // conversion exists from a derived class type to any of its base + // class types. Thus, a reference to a derived class instance + // can be treated as a reference to a base class instance. Assert.IsTrue(MembersInheritanceTestClass026.testMethod()); } [TestMethod] public void MembersInheritance027_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" An instance of a class contains a copy of all instance fields"); - OutputHelper.WriteLine(" declared in the class and its base classes, and an implicit"); - OutputHelper.WriteLine(" conversion exists from a derived class type to any of its base "); - OutputHelper.WriteLine(" class types. Thus, a reference to a derived class instance"); - OutputHelper.WriteLine(" can be treated as a reference to a base class instance."); + // Section 10.2 + // An instance of a class contains a copy of all instance fields + // declared in the class and its base classes, and an implicit + // conversion exists from a derived class type to any of its base + // class types. Thus, a reference to a derived class instance + // can be treated as a reference to a base class instance. Assert.IsTrue(MembersInheritanceTestClass027.testMethod()); } [TestMethod] public void MembersInheritance028_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsTrue(MembersInheritanceTestClass028.testMethod()); } [TestMethod] public void MembersInheritance029_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsTrue(MembersInheritanceTestClass029.testMethod()); } [TestMethod] public void MembersInheritance030_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsTrue(MembersInheritanceTestClass030.testMethod()); } [TestMethod] public void MembersInheritance031_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsTrue(MembersInheritanceTestClass031.testMethod()); } [TestMethod] public void MembersInheritance032_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsFalse(MembersInheritanceTestClass032.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21562"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21562 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void MembersInheritance033_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsTrue(MembersInheritanceTestClass033.testMethod()); } [TestMethod] public void MembersInheritance034_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsTrue(MembersInheritanceTestClass034.testMethod()); } [TestMethod] public void MembersInheritance035_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsTrue(MembersInheritanceTestClass035.testMethod()); } [TestMethod] public void MembersInheritance036_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class can declare virtual methods, properties,"); - OutputHelper.WriteLine(" and indexers, and derived classes can override the "); - OutputHelper.WriteLine(" implementation of these function members. This enables"); - OutputHelper.WriteLine(" classes to exhibit polymorphic behavior wherein the "); - OutputHelper.WriteLine(" actions performed by a function member invocation"); - OutputHelper.WriteLine(" varies depending on the run-time type of the instance"); - OutputHelper.WriteLine(" through which the member is invoked."); + // Section 10.2 + // A class can declare virtual methods, properties, + // and indexers, and derived classes can override the + // implementation of these function members. This enables + // classes to exhibit polymorphic behavior wherein the + // actions performed by a function member invocation + // varies depending on the run-time type of the instance + // through which the member is invoked. Assert.IsFalse(MembersInheritanceTestClass036.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21562"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21562 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void MembersInheritance037_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration is permitted to declare"); - OutputHelper.WriteLine(" a member with the same name or signature as an "); - OutputHelper.WriteLine(" inherited member. When this occurs, the derived"); - OutputHelper.WriteLine(" class member is said to hide the base class member."); + // Section 10.2 + // A class-member-declaration is permitted to declare + // a member with the same name or signature as an + // inherited member. When this occurs, the derived + // class member is said to hide the base class member. Assert.IsTrue(MembersInheritanceTestClass037.testMethod()); } [TestMethod] public void MembersInheritance038_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration is permitted to declare"); - OutputHelper.WriteLine(" a member with the same name or signature as an "); - OutputHelper.WriteLine(" inherited member. When this occurs, the derived"); - OutputHelper.WriteLine(" class member is said to hide the base class member."); + // Section 10.2 + // A class-member-declaration is permitted to declare + // a member with the same name or signature as an + // inherited member. When this occurs, the derived + // class member is said to hide the base class member. Assert.IsTrue(MembersInheritanceTestClass038.testMethod()); } [TestMethod] public void MembersInheritance039_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration is permitted to declare"); - OutputHelper.WriteLine(" a member with the same name or signature as an "); - OutputHelper.WriteLine(" inherited member. When this occurs, the derived"); - OutputHelper.WriteLine(" class member is said to hide the base class member."); + // Section 10.2 + // A class-member-declaration is permitted to declare + // a member with the same name or signature as an + // inherited member. When this occurs, the derived + // class member is said to hide the base class member. Assert.IsTrue(MembersInheritanceTestClass039.testMethod()); } [TestMethod] public void MembersInheritance040_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration is permitted to declare"); - OutputHelper.WriteLine(" a member with the same name or signature as an "); - OutputHelper.WriteLine(" inherited member. When this occurs, the derived"); - OutputHelper.WriteLine(" class member is said to hide the base class member."); + // Section 10.2 + // A class-member-declaration is permitted to declare + // a member with the same name or signature as an + // inherited member. When this occurs, the derived + // class member is said to hide the base class member. Assert.IsTrue(MembersInheritanceTestClass040.testMethod()); } [TestMethod] public void MembersInheritance041_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" If a new modifier is included in a declaration"); - OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); - OutputHelper.WriteLine(" is issued to that effect."); + // Section 10.2 + // If a new modifier is included in a declaration + // that doesn't hide an inherited member, a warning + // is issued to that effect. Assert.IsTrue(MembersInheritanceTestClass041.testMethod()); } [TestMethod] public void MembersInheritance042_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" If a new modifier is included in a declaration"); - OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); - OutputHelper.WriteLine(" is issued to that effect."); + // Section 10.2 + // If a new modifier is included in a declaration + // that doesn't hide an inherited member, a warning + // is issued to that effect. Assert.IsTrue(MembersInheritanceTestClass042.testMethod()); } [TestMethod] public void MembersInheritance043_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" If a new modifier is included in a declaration"); - OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); - OutputHelper.WriteLine(" is issued to that effect."); + // Section 10.2 + // If a new modifier is included in a declaration + // that doesn't hide an inherited member, a warning + // is issued to that effect. Assert.IsTrue(MembersInheritanceTestClass043.testMethod()); } [TestMethod] public void MembersInheritance044_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" If a new modifier is included in a declaration"); - OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); - OutputHelper.WriteLine(" is issued to that effect."); + // Section 10.2 + // If a new modifier is included in a declaration + // that doesn't hide an inherited member, a warning + // is issued to that effect. Assert.IsTrue(MembersInheritanceTestClass044.testMethod()); } [TestMethod] public void MembersInheritance045_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" If a new modifier is included in a declaration"); - OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); - OutputHelper.WriteLine(" is issued to that effect."); + // Section 10.2 + // If a new modifier is included in a declaration + // that doesn't hide an inherited member, a warning + // is issued to that effect. Assert.IsTrue(MembersInheritanceTestClass045.testMethod()); } [TestMethod] public void MembersInheritance046_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" If a new modifier is included in a declaration"); - OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); - OutputHelper.WriteLine(" is issued to that effect."); + // Section 10.2 + // If a new modifier is included in a declaration + // that doesn't hide an inherited member, a warning + // is issued to that effect. Assert.IsTrue(MembersInheritanceTestClass046.testMethod()); } [TestMethod] public void MembersInheritance047_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" If a new modifier is included in a declaration"); - OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); - OutputHelper.WriteLine(" is issued to that effect."); + // Section 10.2 + // If a new modifier is included in a declaration + // that doesn't hide an inherited member, a warning + // is issued to that effect. Assert.IsTrue(MembersInheritanceTestClass047.testMethod()); } [TestMethod] public void MembersInheritance053_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" If a new modifier is included in a declaration"); - OutputHelper.WriteLine(" that doesn't hide an inherited member, a warning "); - OutputHelper.WriteLine(" is issued to that effect."); + // Section 10.2 + // If a new modifier is included in a declaration + // that doesn't hide an inherited member, a warning + // is issued to that effect. Assert.IsTrue(MembersInheritanceTestClass053.testMethod()); } [TestMethod] public void MembersInheritance054_Test() { - OutputHelper.WriteLine("Testing that protected members can be passed to a grandchild class"); + // Testing that protected members can be passed to a grandchild class Assert.IsTrue(MembersInheritanceTestClass054.testMethod()); } [TestMethod] public void MembersInheritance057_Test() { - OutputHelper.WriteLine("Testing that you can inherit from a member class"); + // Testing that you can inherit from a member class Assert.IsTrue(MembersInheritanceTestClass057.testMethod()); } [TestMethod] public void MembersInheritance058_Test() { - OutputHelper.WriteLine("Testing that you can inherit from a class declared later in the file"); + // Testing that you can inherit from a class declared later in the file Assert.IsTrue(MembersInheritanceTestClass058.testMethod()); } [TestMethod] public void MembersInheritance059_Test() { - OutputHelper.WriteLine("Testing that an inner class inherit from another class"); + // Testing that an inner class inherit from another class Assert.IsTrue(MembersInheritanceTestClass059.testMethod()); } @@ -520,109 +520,109 @@ public void MembersInheritance059_Test() [TestMethod] public void MembersModifiers01_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass01.testMethod()); } [TestMethod] public void MembersModifiers02_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass02.testMethod()); } [TestMethod] public void MembersModifiers03_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass03.testMethod()); } [TestMethod] public void MembersModifiers04_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass04.testMethod()); } [TestMethod] public void MembersModifiers05_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass05.testMethod()); } [TestMethod] public void MembersModifiers06_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass06.testMethod()); } [TestMethod] public void MembersModifiers07_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass07.testMethod()); } [TestMethod] public void MembersModifiers08_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass08.testMethod()); } [TestMethod] public void MembersModifiers12_Test() { - OutputHelper.WriteLine(" Section 10.2"); - OutputHelper.WriteLine(" A class-member-declaration may include one of the "); - OutputHelper.WriteLine(" four access modifiers: public, protected, internal,"); - OutputHelper.WriteLine(" or private. It is an error to specify more than one"); - OutputHelper.WriteLine(" access modifier. When a class-member-declaration "); - OutputHelper.WriteLine(" does not include an access modifier, the declaration"); - OutputHelper.WriteLine(" defaults to private."); + // Section 10.2 + // A class-member-declaration may include one of the + // four access modifiers: public, protected, internal, + // or private. It is an error to specify more than one + // access modifier. When a class-member-declaration + // does not include an access modifier, the declaration + // defaults to private. Assert.IsTrue(MembersModifiersTestClass12.testMethod()); } [TestMethod] diff --git a/Tests/NFUnitTestClasses/UnitTestMethodsTests.cs b/Tests/NFUnitTestClasses/UnitTestMethodsTests.cs index c8da8afa..03619587 100644 --- a/Tests/NFUnitTestClasses/UnitTestMethodsTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestMethodsTests.cs @@ -10,527 +10,527 @@ class UnitTestMethodsTests [TestMethod] public void Methods1_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass1.testMethod()); } [TestMethod] public void Methods2_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass2.testMethod()); } [TestMethod] public void Methods3_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass3.testMethod()); } [TestMethod] public void Methods4_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass4.testMethod()); } [TestMethod] public void Methods6_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass6.testMethod()); } [TestMethod] public void Methods7_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass7.testMethod()); } [TestMethod] public void Methods9_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass9.testMethod()); } [TestMethod] public void Methods10_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass10.testMethod()); } [TestMethod] public void Methods11_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsFalse(MethodsTestClass11.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21563 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void Methods13_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass13.testMethod()); } [TestMethod] public void Methods17_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass17.testMethod()); } [TestMethod] public void Methods19_Test() { - OutputHelper.WriteLine(" The return-type of a method declaration specifies"); - OutputHelper.WriteLine(" the type of the value computed and returned by the"); - OutputHelper.WriteLine(" method. The return type is void if the method does"); - OutputHelper.WriteLine(" not return a value."); + // The return-type of a method declaration specifies + // the type of the value computed and returned by the + // method. The return type is void if the method does + // not return a value. Assert.IsTrue(MethodsTestClass19.testMethod()); } [TestMethod] public void Methods20_Test() { - OutputHelper.WriteLine(" The return-type of a method declaration specifies"); - OutputHelper.WriteLine(" the type of the value computed and returned by the"); - OutputHelper.WriteLine(" method. The return type is void if the method does"); - OutputHelper.WriteLine(" not return a value."); + // The return-type of a method declaration specifies + // the type of the value computed and returned by the + // method. The return type is void if the method does + // not return a value. Assert.IsTrue(MethodsTestClass20.testMethod()); } [TestMethod] public void Methods22_Test() { - OutputHelper.WriteLine(" The return-type of a method declaration specifies"); - OutputHelper.WriteLine(" the type of the value computed and returned by the"); - OutputHelper.WriteLine(" method. The return type is void if the method does"); - OutputHelper.WriteLine(" not return a value."); + // The return-type of a method declaration specifies + // the type of the value computed and returned by the + // method. The return type is void if the method does + // not return a value. Assert.IsTrue(MethodsTestClass22.testMethod()); } [TestMethod] public void Methods23_Test() { - OutputHelper.WriteLine(" The return-type of a method declaration specifies"); - OutputHelper.WriteLine(" the type of the value computed and returned by the"); - OutputHelper.WriteLine(" method. The return type is void if the method does"); - OutputHelper.WriteLine(" not return a value."); + // The return-type of a method declaration specifies + // the type of the value computed and returned by the + // method. The return type is void if the method does + // not return a value. Assert.IsTrue(MethodsTestClass23.testMethod()); } [TestMethod] public void Methods24_Test() { - OutputHelper.WriteLine(" The return-type of a method declaration specifies"); - OutputHelper.WriteLine(" the type of the value computed and returned by the"); - OutputHelper.WriteLine(" method. The return type is void if the method does"); - OutputHelper.WriteLine(" not return a value."); + // The return-type of a method declaration specifies + // the type of the value computed and returned by the + // method. The return type is void if the method does + // not return a value. Assert.IsTrue(MethodsTestClass24.testMethod()); } [TestMethod] public void Methods25_Test() { - OutputHelper.WriteLine(" The return-type of a method declaration specifies"); - OutputHelper.WriteLine(" the type of the value computed and returned by the"); - OutputHelper.WriteLine(" method. The return type is void if the method does"); - OutputHelper.WriteLine(" not return a value."); + // The return-type of a method declaration specifies + // the type of the value computed and returned by the + // method. The return type is void if the method does + // not return a value. Assert.IsTrue(MethodsTestClass25.testMethod()); } [TestMethod] public void Methods26_Test() { - OutputHelper.WriteLine(" The return-type of a method declaration specifies"); - OutputHelper.WriteLine(" the type of the value computed and returned by the"); - OutputHelper.WriteLine(" method. The return type is void if the method does"); - OutputHelper.WriteLine(" not return a value."); + // The return-type of a method declaration specifies + // the type of the value computed and returned by the + // method. The return type is void if the method does + // not return a value. Assert.IsTrue(MethodsTestClass26.testMethod()); } [TestMethod] public void Methods29_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" The member-name specifies the name of the method."); - OutputHelper.WriteLine(" Unless the method is an explicit interface member"); - OutputHelper.WriteLine(" implementation, the member-name is simply an "); - OutputHelper.WriteLine(" identifier. For an explicit interface member "); - OutputHelper.WriteLine(" implementation, the member-name consists of an"); - OutputHelper.WriteLine(" interface-type followed by a . and an identifier."); + // Section 10.5 + // The member-name specifies the name of the method. + // Unless the method is an explicit interface member + // implementation, the member-name is simply an + // identifier. For an explicit interface member + // implementation, the member-name consists of an + // interface-type followed by a . and an identifier. Assert.IsTrue(MethodsTestClass29.testMethod()); } [TestMethod] public void Methods30_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" The member-name specifies the name of the method."); - OutputHelper.WriteLine(" Unless the method is an explicit interface member"); - OutputHelper.WriteLine(" implementation, the member-name is simply an "); - OutputHelper.WriteLine(" identifier. For an explicit interface member "); - OutputHelper.WriteLine(" implementation, the member-name consists of an"); - OutputHelper.WriteLine(" interface-type followed by a . and an identifier."); + // Section 10.5 + // The member-name specifies the name of the method. + // Unless the method is an explicit interface member + // implementation, the member-name is simply an + // identifier. For an explicit interface member + // implementation, the member-name consists of an + // interface-type followed by a . and an identifier. Assert.IsTrue(MethodsTestClass30.testMethod()); } [TestMethod] public void Methods33_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" The optional formal-parameter-list specifies"); - OutputHelper.WriteLine(" the parameters of the method."); + // Section 10.5 + // The optional formal-parameter-list specifies + // the parameters of the method. Assert.IsTrue(MethodsTestClass33.testMethod()); } [TestMethod] public void Methods34_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" The optional formal-parameter-list specifies"); - OutputHelper.WriteLine(" the parameters of the method."); + // Section 10.5 + // The optional formal-parameter-list specifies + // the parameters of the method. Assert.IsTrue(MethodsTestClass34.testMethod()); } [TestMethod] public void Methods35_Test() { - OutputHelper.WriteLine("Testing method call with 10 parameters"); + // Testing method call with 10 parameters Assert.IsTrue(MethodsTestClass35.testMethod()); } [TestMethod] public void Methods56_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method declaration creates a separate space"); - OutputHelper.WriteLine(" for parameters and local variables. Names are introduced"); - OutputHelper.WriteLine(" into this declaration space by the formal parameter"); - OutputHelper.WriteLine(" list of the method and by the local variable declarations"); - OutputHelper.WriteLine(" in the block of the method. All names in the declaration"); - OutputHelper.WriteLine(" space of a method must be unique. Thus it is an error"); - OutputHelper.WriteLine(" for a parameter or local variable to have the same name"); - OutputHelper.WriteLine(" as another parameter or local variable."); + // Section 10.5 + // A method declaration creates a separate space + // for parameters and local variables. Names are introduced + // into this declaration space by the formal parameter + // list of the method and by the local variable declarations + // in the block of the method. All names in the declaration + // space of a method must be unique. Thus it is an error + // for a parameter or local variable to have the same name + // as another parameter or local variable. Assert.IsTrue(MethodsTestClass56.testMethod()); } [TestMethod] public void Methods57_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method declaration creates a separate space"); - OutputHelper.WriteLine(" for parameters and local variables. Names are introduced"); - OutputHelper.WriteLine(" into this declaration space by the formal parameter"); - OutputHelper.WriteLine(" list of the method and by the local variable declarations"); - OutputHelper.WriteLine(" in the block of the method. All names in the declaration"); - OutputHelper.WriteLine(" space of a method must be unique. Thus it is an error"); - OutputHelper.WriteLine(" for a parameter or local variable to have the same name"); - OutputHelper.WriteLine(" as another parameter or local variable."); + // Section 10.5 + // A method declaration creates a separate space + // for parameters and local variables. Names are introduced + // into this declaration space by the formal parameter + // list of the method and by the local variable declarations + // in the block of the method. All names in the declaration + // space of a method must be unique. Thus it is an error + // for a parameter or local variable to have the same name + // as another parameter or local variable. Assert.IsTrue(MethodsTestClass57.testMethod()); } [TestMethod] public void Methods58_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When a formal parameter is a value parameter,"); - OutputHelper.WriteLine(" the corresponding argument in the method invocation"); - OutputHelper.WriteLine(" must be an expression of a type that is implicitly"); - OutputHelper.WriteLine(" convertible to the formal parameter type."); + // Section 10.5 + // When a formal parameter is a value parameter, + // the corresponding argument in the method invocation + // must be an expression of a type that is implicitly + // convertible to the formal parameter type. Assert.IsTrue(MethodsTestClass58.testMethod()); } [TestMethod] public void Methods59_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When a formal parameter is a value parameter,"); - OutputHelper.WriteLine(" the corresponding argument in the method invocation"); - OutputHelper.WriteLine(" must be an expression of a type that is implicitly"); - OutputHelper.WriteLine(" convertible to the formal parameter type."); + // Section 10.5 + // When a formal parameter is a value parameter, + // the corresponding argument in the method invocation + // must be an expression of a type that is implicitly + // convertible to the formal parameter type. Assert.IsTrue(MethodsTestClass59.testMethod()); } [TestMethod] public void Methods60_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When a formal parameter is a value parameter,"); - OutputHelper.WriteLine(" the corresponding argument in the method invocation"); - OutputHelper.WriteLine(" must be an expression of a type that is implicitly"); - OutputHelper.WriteLine(" convertible to the formal parameter type."); + // Section 10.5 + // When a formal parameter is a value parameter, + // the corresponding argument in the method invocation + // must be an expression of a type that is implicitly + // convertible to the formal parameter type. Assert.IsTrue(MethodsTestClass60.testMethod()); } [TestMethod] public void Methods61_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When a formal parameter is a value parameter,"); - OutputHelper.WriteLine(" the corresponding argument in the method invocation"); - OutputHelper.WriteLine(" must be an expression of a type that is implicitly"); - OutputHelper.WriteLine(" convertible to the formal parameter type."); + // Section 10.5 + // When a formal parameter is a value parameter, + // the corresponding argument in the method invocation + // must be an expression of a type that is implicitly + // convertible to the formal parameter type. Assert.IsTrue(MethodsTestClass61.testMethod()); } [TestMethod] public void Methods66_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method is permitted to assign new values to "); - OutputHelper.WriteLine(" a value parameter. Such assignments only affect"); - OutputHelper.WriteLine(" the local storage location represented by the "); - OutputHelper.WriteLine(" value parameter--they have no effect on the actual "); - OutputHelper.WriteLine(" argument given in the method invocation."); + // Section 10.5 + // A method is permitted to assign new values to + // a value parameter. Such assignments only affect + // the local storage location represented by the + // value parameter--they have no effect on the actual + // argument given in the method invocation. Assert.IsTrue(MethodsTestClass66.testMethod()); } [TestMethod] public void Methods67_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method is permitted to assign new values to "); - OutputHelper.WriteLine(" a value parameter. Such assignments only affect"); - OutputHelper.WriteLine(" the local storage location represented by the "); - OutputHelper.WriteLine(" value parameter--they have no effect on the actual "); - OutputHelper.WriteLine(" argument given in the method invocation."); + // Section 10.5 + // A method is permitted to assign new values to + // a value parameter. Such assignments only affect + // the local storage location represented by the + // value parameter--they have no effect on the actual + // argument given in the method invocation. Assert.IsTrue(MethodsTestClass67.testMethod()); } [TestMethod] public void Methods68_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method is permitted to assign new values to "); - OutputHelper.WriteLine(" a value parameter. Such assignments only affect"); - OutputHelper.WriteLine(" the local storage location represented by the "); - OutputHelper.WriteLine(" value parameter--they have no effect on the actual "); - OutputHelper.WriteLine(" argument given in the method invocation."); + // Section 10.5 + // A method is permitted to assign new values to + // a value parameter. Such assignments only affect + // the local storage location represented by the + // value parameter--they have no effect on the actual + // argument given in the method invocation. Assert.IsTrue(MethodsTestClass68.testMethod()); } [TestMethod] public void Methods69_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A parameter declared with a ref modifier is a "); - OutputHelper.WriteLine(" reference parameter. Unlike a value parameter,"); - OutputHelper.WriteLine(" a reference parameter does not create a new "); - OutputHelper.WriteLine(" storage location. Instead, a reference parameter"); - OutputHelper.WriteLine(" represents the same storage location as the"); - OutputHelper.WriteLine(" variable given as the argument in the method"); - OutputHelper.WriteLine(" invocation."); + // Section 10.5 + // A parameter declared with a ref modifier is a + // reference parameter. Unlike a value parameter, + // a reference parameter does not create a new + // storage location. Instead, a reference parameter + // represents the same storage location as the + // variable given as the argument in the method + // invocation. Assert.IsTrue(MethodsTestClass69.testMethod()); } [TestMethod] public void Methods70_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A parameter declared with a ref modifier is a "); - OutputHelper.WriteLine(" reference parameter. Unlike a value parameter,"); - OutputHelper.WriteLine(" a reference parameter does not create a new "); - OutputHelper.WriteLine(" storage location. Instead, a reference parameter"); - OutputHelper.WriteLine(" represents the same storage location as the"); - OutputHelper.WriteLine(" variable given as the argument in the method"); - OutputHelper.WriteLine(" invocation."); + // Section 10.5 + // A parameter declared with a ref modifier is a + // reference parameter. Unlike a value parameter, + // a reference parameter does not create a new + // storage location. Instead, a reference parameter + // represents the same storage location as the + // variable given as the argument in the method + // invocation. Assert.IsTrue(MethodsTestClass70.testMethod()); } [TestMethod] public void Methods71_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A parameter declared with a ref modifier is a "); - OutputHelper.WriteLine(" reference parameter. Unlike a value parameter,"); - OutputHelper.WriteLine(" a reference parameter does not create a new "); - OutputHelper.WriteLine(" storage location. Instead, a reference parameter"); - OutputHelper.WriteLine(" represents the same storage location as the"); - OutputHelper.WriteLine(" variable given as the argument in the method"); - OutputHelper.WriteLine(" invocation."); + // Section 10.5 + // A parameter declared with a ref modifier is a + // reference parameter. Unlike a value parameter, + // a reference parameter does not create a new + // storage location. Instead, a reference parameter + // represents the same storage location as the + // variable given as the argument in the method + // invocation. Assert.IsTrue(MethodsTestClass71.testMethod()); } [TestMethod] public void Methods75_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When a formal parameter is a reference parameter,"); - OutputHelper.WriteLine(" the corresponding argument in a method invocation"); - OutputHelper.WriteLine(" must consist of the keyword ref followed by a "); - OutputHelper.WriteLine(" variable-reference of the same type as the formal"); - OutputHelper.WriteLine(" parameter. A variable must be definitely assigned"); - OutputHelper.WriteLine(" before it can be passed as a reference parameter."); + // Section 10.5 + // When a formal parameter is a reference parameter, + // the corresponding argument in a method invocation + // must consist of the keyword ref followed by a + // variable-reference of the same type as the formal + // parameter. A variable must be definitely assigned + // before it can be passed as a reference parameter. Assert.IsTrue(MethodsTestClass75.testMethod()); } [TestMethod] public void Methods78_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A parameter declared with an out modifier is an output"); - OutputHelper.WriteLine(" parameter. Similar to a reference parameter, an output"); - OutputHelper.WriteLine(" parameter does not create a new storage location. Instead,"); - OutputHelper.WriteLine(" an output parameter represents the same storage location"); - OutputHelper.WriteLine(" as the variable given as the argument in the method invocation."); + // Section 10.5 + // A parameter declared with an out modifier is an output + // parameter. Similar to a reference parameter, an output + // parameter does not create a new storage location. Instead, + // an output parameter represents the same storage location + // as the variable given as the argument in the method invocation. Assert.IsTrue(MethodsTestClass78.testMethod()); } [TestMethod] public void Methods79_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A parameter declared with an out modifier is an output"); - OutputHelper.WriteLine(" parameter. Similar to a reference parameter, an output"); - OutputHelper.WriteLine(" parameter does not create a new storage location. Instead,"); - OutputHelper.WriteLine(" an output parameter represents the same storage location"); - OutputHelper.WriteLine(" as the variable given as the argument in the method invocation."); + // Section 10.5 + // A parameter declared with an out modifier is an output + // parameter. Similar to a reference parameter, an output + // parameter does not create a new storage location. Instead, + // an output parameter represents the same storage location + // as the variable given as the argument in the method invocation. Assert.IsTrue(MethodsTestClass79.testMethod()); } [TestMethod] public void Methods80_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A parameter declared with an out modifier is an output"); - OutputHelper.WriteLine(" parameter. Similar to a reference parameter, an output"); - OutputHelper.WriteLine(" parameter does not create a new storage location. Instead,"); - OutputHelper.WriteLine(" an output parameter represents the same storage location"); - OutputHelper.WriteLine(" as the variable given as the argument in the method invocation."); + // Section 10.5 + // A parameter declared with an out modifier is an output + // parameter. Similar to a reference parameter, an output + // parameter does not create a new storage location. Instead, + // an output parameter represents the same storage location + // as the variable given as the argument in the method invocation. Assert.IsTrue(MethodsTestClass80.testMethod()); } [TestMethod] public void Methods84_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When a formal parameter is an output parameter,"); - OutputHelper.WriteLine(" the corresponding argument in a method invocation"); - OutputHelper.WriteLine(" must consist of the keyword out followed by a "); - OutputHelper.WriteLine(" variable-reference of the same type as the formal "); - OutputHelper.WriteLine(" parameter. A variable need not be definitely"); - OutputHelper.WriteLine(" assigned before it can be passed as an output"); - OutputHelper.WriteLine(" parameter, but following an invocation where a "); - OutputHelper.WriteLine(" variable was passed as an output parameter, the"); - OutputHelper.WriteLine(" variable is considered definitely assigned."); + // Section 10.5 + // When a formal parameter is an output parameter, + // the corresponding argument in a method invocation + // must consist of the keyword out followed by a + // variable-reference of the same type as the formal + // parameter. A variable need not be definitely + // assigned before it can be passed as an output + // parameter, but following an invocation where a + // variable was passed as an output parameter, the + // variable is considered definitely assigned. Assert.IsTrue(MethodsTestClass84.testMethod()); } [TestMethod] public void Methods85_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When a formal parameter is an output parameter,"); - OutputHelper.WriteLine(" the corresponding argument in a method invocation"); - OutputHelper.WriteLine(" must consist of the keyword out followed by a "); - OutputHelper.WriteLine(" variable-reference of the same type as the formal "); - OutputHelper.WriteLine(" parameter. A variable need not be definitely"); - OutputHelper.WriteLine(" assigned before it can be passed as an output"); - OutputHelper.WriteLine(" parameter, but following an invocation where a "); - OutputHelper.WriteLine(" variable was passed as an output parameter, the"); - OutputHelper.WriteLine(" variable is considered definitely assigned."); + // Section 10.5 + // When a formal parameter is an output parameter, + // the corresponding argument in a method invocation + // must consist of the keyword out followed by a + // variable-reference of the same type as the formal + // parameter. A variable need not be definitely + // assigned before it can be passed as an output + // parameter, but following an invocation where a + // variable was passed as an output parameter, the + // variable is considered definitely assigned. Assert.IsTrue(MethodsTestClass85.testMethod()); } [TestMethod] public void Methods92_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" Every output parameter of a method must be"); - OutputHelper.WriteLine(" definitely assigned before the method returns."); + // Section 10.5 + // Every output parameter of a method must be + // definitely assigned before the method returns. Assert.IsTrue(MethodsTestClass92.testMethod()); } [TestMethod] public void Methods93_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" Every output parameter of a method must be"); - OutputHelper.WriteLine(" definitely assigned before the method returns."); + // Section 10.5 + // Every output parameter of a method must be + // definitely assigned before the method returns. Assert.IsTrue(MethodsTestClass93.testMethod()); } [TestMethod] public void Methods94_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" Every output parameter of a method must be"); - OutputHelper.WriteLine(" definitely assigned before the method returns."); + // Section 10.5 + // Every output parameter of a method must be + // definitely assigned before the method returns. Assert.IsTrue(MethodsTestClass94.testMethod()); } [TestMethod] public void Methods95_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" Every output parameter of a method must be"); - OutputHelper.WriteLine(" definitely assigned before the method returns."); + // Section 10.5 + // Every output parameter of a method must be + // definitely assigned before the method returns. Assert.IsTrue(MethodsTestClass95.testMethod()); } [TestMethod] public void Methods103_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" The implementation of a non-virtual method"); - OutputHelper.WriteLine(" is invariant: The implementation is the same "); - OutputHelper.WriteLine(" whether the method is invoked on an instance"); - OutputHelper.WriteLine(" of the class in which it is declared or an "); - OutputHelper.WriteLine(" instance of the derived class."); + // Section 10.5 + // The implementation of a non-virtual method + // is invariant: The implementation is the same + // whether the method is invoked on an instance + // of the class in which it is declared or an + // instance of the derived class. Assert.IsTrue(MethodsTestClass103.testMethod()); } @@ -538,17 +538,17 @@ public void Methods103_Test() [TestMethod] public void Methods104_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" The implementation of a non-virtual method"); - OutputHelper.WriteLine(" is invariant: The implementation is the same "); - OutputHelper.WriteLine(" whether the method is invoked on an instance"); - OutputHelper.WriteLine(" of the class in which it is declared or an "); - OutputHelper.WriteLine(" instance of the derived class."); + // Section 10.5 + // The implementation of a non-virtual method + // is invariant: The implementation is the same + // whether the method is invoked on an instance + // of the class in which it is declared or an + // instance of the derived class. Assert.IsFalse(MethodsTestClass104.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21563 + // The Test owner needs to verify that the change was intentional and remove the known failure. } @@ -556,283 +556,283 @@ public void Methods104_Test() [TestMethod] public void Methods105_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" The implementation of a non-virtual method"); - OutputHelper.WriteLine(" is invariant: The implementation is the same "); - OutputHelper.WriteLine(" whether the method is invoked on an instance"); - OutputHelper.WriteLine(" of the class in which it is declared or an "); - OutputHelper.WriteLine(" instance of the derived class."); + // Section 10.5 + // The implementation of a non-virtual method + // is invariant: The implementation is the same + // whether the method is invoked on an instance + // of the class in which it is declared or an + // instance of the derived class. Assert.IsTrue(MethodsTestClass105.testMethod()); } [TestMethod] public void Methods106_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For every virtual method declaration of M,"); - OutputHelper.WriteLine(" there exists a most derived implementation"); - OutputHelper.WriteLine(" of the method with respect to the class."); - OutputHelper.WriteLine(" The most derived implementation of a "); - OutputHelper.WriteLine(" virtual method M with respectto a class"); - OutputHelper.WriteLine(" R is determined as follows:"); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" If R contains the introducing virtual"); - OutputHelper.WriteLine(" declaration of M, then this is the most"); - OutputHelper.WriteLine(" derived implementation of M."); + // Section 10.5 + // For every virtual method declaration of M, + // there exists a most derived implementation + // of the method with respect to the class. + // The most derived implementation of a + // virtual method M with respectto a class + // R is determined as follows: + // + // If R contains the introducing virtual + // declaration of M, then this is the most + // derived implementation of M. Assert.IsTrue(MethodsTestClass106.testMethod()); } [TestMethod] public void Methods107_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For every virtual method declaration of M,"); - OutputHelper.WriteLine(" there exists a most derived implementation"); - OutputHelper.WriteLine(" of the method with respect to the class."); - OutputHelper.WriteLine(" The most derived implementation of a "); - OutputHelper.WriteLine(" virtual method M with respectto a class"); - OutputHelper.WriteLine(" R is determined as follows:"); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" If R contains the introducing virtual"); - OutputHelper.WriteLine(" declaration of M, then this is the most"); - OutputHelper.WriteLine(" derived implementation of M."); + // Section 10.5 + // For every virtual method declaration of M, + // there exists a most derived implementation + // of the method with respect to the class. + // The most derived implementation of a + // virtual method M with respectto a class + // R is determined as follows: + // + // If R contains the introducing virtual + // declaration of M, then this is the most + // derived implementation of M. Assert.IsFalse(MethodsTestClass107.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21563 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void Methods108_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For every virtual method declaration of M,"); - OutputHelper.WriteLine(" there exists a most derived implementation"); - OutputHelper.WriteLine(" of the method with respect to the class."); - OutputHelper.WriteLine(" The most derived implementation of a "); - OutputHelper.WriteLine(" virtual method M with respectto a class"); - OutputHelper.WriteLine(" R is determined as follows:"); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" If R contains the introducing virtual"); - OutputHelper.WriteLine(" declaration of M, then this is the most"); - OutputHelper.WriteLine(" derived implementation of M."); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" Otherwise, if R contains an override of M,"); - OutputHelper.WriteLine(" then this is the most derived implementation"); - OutputHelper.WriteLine(" of M."); + // Section 10.5 + // For every virtual method declaration of M, + // there exists a most derived implementation + // of the method with respect to the class. + // The most derived implementation of a + // virtual method M with respectto a class + // R is determined as follows: + // + // If R contains the introducing virtual + // declaration of M, then this is the most + // derived implementation of M. + // + // Otherwise, if R contains an override of M, + // then this is the most derived implementation + // of M. Assert.IsTrue(MethodsTestClass108.testMethod()); } [TestMethod] public void Methods109_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For every virtual method declaration of M,"); - OutputHelper.WriteLine(" there exists a most derived implementation"); - OutputHelper.WriteLine(" of the method with respect to the class."); - OutputHelper.WriteLine(" The most derived implementation of a "); - OutputHelper.WriteLine(" virtual method M with respectto a class"); - OutputHelper.WriteLine(" R is determined as follows:"); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" If R contains the introducing virtual"); - OutputHelper.WriteLine(" declaration of M, then this is the most"); - OutputHelper.WriteLine(" derived implementation of M."); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" Otherwise, if R contains an override of M,"); - OutputHelper.WriteLine(" then this is the most derived implementation"); - OutputHelper.WriteLine(" of M."); + // Section 10.5 + // For every virtual method declaration of M, + // there exists a most derived implementation + // of the method with respect to the class. + // The most derived implementation of a + // virtual method M with respectto a class + // R is determined as follows: + // + // If R contains the introducing virtual + // declaration of M, then this is the most + // derived implementation of M. + // + // Otherwise, if R contains an override of M, + // then this is the most derived implementation + // of M. Assert.IsTrue(MethodsTestClass109.testMethod()); } [TestMethod] public void Methods110_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For every virtual method declaration of M,"); - OutputHelper.WriteLine(" there exists a most derived implementation"); - OutputHelper.WriteLine(" of the method with respect to the class."); - OutputHelper.WriteLine(" The most derived implementation of a "); - OutputHelper.WriteLine(" virtual method M with respectto a class"); - OutputHelper.WriteLine(" R is determined as follows:"); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" If R contains the introducing virtual"); - OutputHelper.WriteLine(" declaration of M, then this is the most"); - OutputHelper.WriteLine(" derived implementation of M."); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" Otherwise, if R contains an override of M,"); - OutputHelper.WriteLine(" then this is the most derived implementation"); - OutputHelper.WriteLine(" of M."); + // Section 10.5 + // For every virtual method declaration of M, + // there exists a most derived implementation + // of the method with respect to the class. + // The most derived implementation of a + // virtual method M with respectto a class + // R is determined as follows: + // + // If R contains the introducing virtual + // declaration of M, then this is the most + // derived implementation of M. + // + // Otherwise, if R contains an override of M, + // then this is the most derived implementation + // of M. Assert.IsFalse(MethodsTestClass110.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21563 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void Methods111_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For every virtual method declaration of M,"); - OutputHelper.WriteLine(" there exists a most derived implementation"); - OutputHelper.WriteLine(" of the method with respect to the class."); - OutputHelper.WriteLine(" The most derived implementation of a "); - OutputHelper.WriteLine(" virtual method M with respectto a class"); - OutputHelper.WriteLine(" R is determined as follows:"); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" If R contains the introducing virtual"); - OutputHelper.WriteLine(" declaration of M, then this is the most"); - OutputHelper.WriteLine(" derived implementation of M."); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" Otherwise, if R contains an override of M,"); - OutputHelper.WriteLine(" then this is the most derived implementation"); - OutputHelper.WriteLine(" of M."); + // Section 10.5 + // For every virtual method declaration of M, + // there exists a most derived implementation + // of the method with respect to the class. + // The most derived implementation of a + // virtual method M with respectto a class + // R is determined as follows: + // + // If R contains the introducing virtual + // declaration of M, then this is the most + // derived implementation of M. + // + // Otherwise, if R contains an override of M, + // then this is the most derived implementation + // of M. Assert.IsTrue(MethodsTestClass111.testMethod()); } [TestMethod] public void Methods112_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" Because methods are allowed to hide inherited"); - OutputHelper.WriteLine(" methods, it is possible for a class to contain"); - OutputHelper.WriteLine(" several virtual methods with the same signature."); - OutputHelper.WriteLine(" This does not provide an ambiguity problem, since"); - OutputHelper.WriteLine(" all but the most derived method are hidden."); + // Section 10.5 + // Because methods are allowed to hide inherited + // methods, it is possible for a class to contain + // several virtual methods with the same signature. + // This does not provide an ambiguity problem, since + // all but the most derived method are hidden. Assert.IsFalse(MethodsTestClass112.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21563 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void Methods116_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" It is an error for an override method declaration"); - OutputHelper.WriteLine(" to include any one of the new, static, virtual, or "); - OutputHelper.WriteLine(" abstract modifiers."); + // Section 10.5 + // It is an error for an override method declaration + // to include any one of the new, static, virtual, or + // abstract modifiers. Assert.IsTrue(MethodsTestClass116.testMethod()); } [TestMethod] public void Methods117_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For purposes of locating the overridden base"); - OutputHelper.WriteLine(" method, a method is considered accessible if "); - OutputHelper.WriteLine(" it is public, if it is protected, if it is "); - OutputHelper.WriteLine(" internal and declared in the same project as "); - OutputHelper.WriteLine(" C, or if it is private and declared in a class"); - OutputHelper.WriteLine(" containing the declaration of C."); + // Section 10.5 + // For purposes of locating the overridden base + // method, a method is considered accessible if + // it is public, if it is protected, if it is + // internal and declared in the same project as + // C, or if it is private and declared in a class + // containing the declaration of C. Assert.IsTrue(MethodsTestClass117.testMethod()); } [TestMethod] public void Methods119_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For purposes of locating the overridden base"); - OutputHelper.WriteLine(" method, a method is considered accessible if "); - OutputHelper.WriteLine(" it is public, if it is protected, if it is "); - OutputHelper.WriteLine(" internal and declared in the same project as "); - OutputHelper.WriteLine(" C, or if it is private and declared in a class"); - OutputHelper.WriteLine(" containing the declaration of C."); + // Section 10.5 + // For purposes of locating the overridden base + // method, a method is considered accessible if + // it is public, if it is protected, if it is + // internal and declared in the same project as + // C, or if it is private and declared in a class + // containing the declaration of C. Assert.IsTrue(MethodsTestClass119.testMethod()); } [TestMethod] public void Methods120_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For purposes of locating the overridden base"); - OutputHelper.WriteLine(" method, a method is considered accessible if "); - OutputHelper.WriteLine(" it is public, if it is protected, if it is "); - OutputHelper.WriteLine(" internal and declared in the same project as "); - OutputHelper.WriteLine(" C, or if it is private and declared in a class"); - OutputHelper.WriteLine(" containing the declaration of C."); + // Section 10.5 + // For purposes of locating the overridden base + // method, a method is considered accessible if + // it is public, if it is protected, if it is + // internal and declared in the same project as + // C, or if it is private and declared in a class + // containing the declaration of C. Assert.IsTrue(MethodsTestClass120.testMethod()); } [TestMethod] public void Methods121_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" For purposes of locating the overridden base"); - OutputHelper.WriteLine(" method, a method is considered accessible if "); - OutputHelper.WriteLine(" it is public, if it is protected, if it is "); - OutputHelper.WriteLine(" internal and declared in the same project as "); - OutputHelper.WriteLine(" C, or if it is private and declared in a class"); - OutputHelper.WriteLine(" containing the declaration of C."); + // Section 10.5 + // For purposes of locating the overridden base + // method, a method is considered accessible if + // it is public, if it is protected, if it is + // internal and declared in the same project as + // C, or if it is private and declared in a class + // containing the declaration of C. Assert.IsTrue(MethodsTestClass121.testMethod()); } [TestMethod] public void Methods124_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A compile time-error occurs unless all"); - OutputHelper.WriteLine(" of the following are true for an override"); - OutputHelper.WriteLine(" declaration:"); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" An overriddden base method can be located"); - OutputHelper.WriteLine(" as described above."); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" The overridden base method is virtual,"); - OutputHelper.WriteLine(" abstract, or override method. In other"); - OutputHelper.WriteLine(" words, the overridden base method cannot"); - OutputHelper.WriteLine(" be static or non-virtual."); + // Section 10.5 + // A compile time-error occurs unless all + // of the following are true for an override + // declaration: + // + // An overriddden base method can be located + // as described above. + // + // The overridden base method is virtual, + // abstract, or override method. In other + // words, the overridden base method cannot + // be static or non-virtual. Assert.IsTrue(MethodsTestClass124.testMethod()); } [TestMethod] public void Methods125_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A compile time-error occurs unless all"); - OutputHelper.WriteLine(" of the following are true for an override"); - OutputHelper.WriteLine(" declaration:"); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" An overriddden base method can be located"); - OutputHelper.WriteLine(" as described above."); - OutputHelper.WriteLine(""); - OutputHelper.WriteLine(" The overridden base method is virtual,"); - OutputHelper.WriteLine(" abstract, or override method. In other"); - OutputHelper.WriteLine(" words, the overridden base method cannot"); - OutputHelper.WriteLine(" be static or non-virtual."); + // Section 10.5 + // A compile time-error occurs unless all + // of the following are true for an override + // declaration: + // + // An overriddden base method can be located + // as described above. + // + // The overridden base method is virtual, + // abstract, or override method. In other + // words, the overridden base method cannot + // be static or non-virtual. Assert.IsTrue(MethodsTestClass125.testMethod()); } [TestMethod] public void Methods132_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" An override declaration can access the overridden "); - OutputHelper.WriteLine(" base method using a base-access."); + // Section 10.5 + // An override declaration can access the overridden + // base method using a base-access. Assert.IsTrue(MethodsTestClass132.testMethod()); } [TestMethod] public void Methods133_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" An override declaration can access the overridden "); - OutputHelper.WriteLine(" base method using a base-access."); + // Section 10.5 + // An override declaration can access the overridden + // base method using a base-access. Assert.IsTrue(MethodsTestClass133.testMethod()); } [TestMethod] public void Methods134_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" Only by including an override modifier can"); - OutputHelper.WriteLine(" a method override another method. In all other"); - OutputHelper.WriteLine(" cases, a method with the same signature as an"); - OutputHelper.WriteLine(" inherited method simply hides the inherited "); - OutputHelper.WriteLine(" member."); + // Section 10.5 + // Only by including an override modifier can + // a method override another method. In all other + // cases, a method with the same signature as an + // inherited method simply hides the inherited + // member. Assert.IsFalse(MethodsTestClass134.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21563 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] @@ -844,489 +844,489 @@ public void Methods142_Test() [TestMethod] public void Methods148_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" If execution of the method body of a void"); - OutputHelper.WriteLine(" method completes normally (that is, if control"); - OutputHelper.WriteLine(" flows off the end of the method body), the "); - OutputHelper.WriteLine(" method simply returns to the caller."); + // Section 10.5 + // If execution of the method body of a void + // method completes normally (that is, if control + // flows off the end of the method body), the + // method simply returns to the caller. Assert.IsTrue(MethodsTestClass148.testMethod()); } [TestMethod] public void Methods149_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When the return type of a method is not void,"); - OutputHelper.WriteLine(" each return statement in the method body must"); - OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); - OutputHelper.WriteLine(" covertable to the return type."); + // Section 10.5 + // When the return type of a method is not void, + // each return statement in the method body must + // specify an expression of a type that is implicitly + // covertable to the return type. Assert.IsTrue(MethodsTestClass149.testMethod()); } [TestMethod] public void Methods150_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When the return type of a method is not void,"); - OutputHelper.WriteLine(" each return statement in the method body must"); - OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); - OutputHelper.WriteLine(" covertable to the return type."); + // Section 10.5 + // When the return type of a method is not void, + // each return statement in the method body must + // specify an expression of a type that is implicitly + // covertable to the return type. Assert.IsTrue(MethodsTestClass150.testMethod()); } [TestMethod] public void Methods154_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When the return type of a method is not void,"); - OutputHelper.WriteLine(" each return statement in the method body must"); - OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); - OutputHelper.WriteLine(" covertable to the return type."); + // Section 10.5 + // When the return type of a method is not void, + // each return statement in the method body must + // specify an expression of a type that is implicitly + // covertable to the return type. Assert.IsTrue(MethodsTestClass154.testMethod()); } [TestMethod] public void Methods159_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When the return type of a method is not void,"); - OutputHelper.WriteLine(" each return statement in the method body must"); - OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); - OutputHelper.WriteLine(" covertable to the return type. Execution of the "); - OutputHelper.WriteLine(" method body of a value returning method is required"); - OutputHelper.WriteLine(" to terminate in a return statement that specifies"); - OutputHelper.WriteLine(" an expression or in a throw statement that throws"); - OutputHelper.WriteLine(" an System.Exception."); + // Section 10.5 + // When the return type of a method is not void, + // each return statement in the method body must + // specify an expression of a type that is implicitly + // covertable to the return type. Execution of the + // method body of a value returning method is required + // to terminate in a return statement that specifies + // an expression or in a throw statement that throws + // an System.Exception. Assert.IsTrue(MethodsTestClass159.testMethod()); } [TestMethod] public void Methods160_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When the return type of a method is not void,"); - OutputHelper.WriteLine(" each return statement in the method body must"); - OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); - OutputHelper.WriteLine(" covertable to the return type. Execution of the "); - OutputHelper.WriteLine(" method body of a value returning method is required"); - OutputHelper.WriteLine(" to terminate in a return statement that specifies"); - OutputHelper.WriteLine(" an expression or in a throw statement that throws"); - OutputHelper.WriteLine(" an System.Exception."); + // Section 10.5 + // When the return type of a method is not void, + // each return statement in the method body must + // specify an expression of a type that is implicitly + // covertable to the return type. Execution of the + // method body of a value returning method is required + // to terminate in a return statement that specifies + // an expression or in a throw statement that throws + // an System.Exception. Assert.IsTrue(MethodsTestClass160.testMethod()); } [TestMethod] public void Methods161_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" When the return type of a method is not void,"); - OutputHelper.WriteLine(" each return statement in the method body must"); - OutputHelper.WriteLine(" specify an expression of a type that is implicitly"); - OutputHelper.WriteLine(" covertable to the return type. Execution of the "); - OutputHelper.WriteLine(" method body of a value returning method is required"); - OutputHelper.WriteLine(" to terminate in a return statement that specifies"); - OutputHelper.WriteLine(" an expression or in a throw statement that throws"); - OutputHelper.WriteLine(" an System.Exception."); + // Section 10.5 + // When the return type of a method is not void, + // each return statement in the method body must + // specify an expression of a type that is implicitly + // covertable to the return type. Execution of the + // method body of a value returning method is required + // to terminate in a return statement that specifies + // an expression or in a throw statement that throws + // an System.Exception. Assert.IsTrue(MethodsTestClass161.testMethod()); } [TestMethod] public void Methods163_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A parameter declared with a params modifier is"); - OutputHelper.WriteLine(" a params parameter. A params parameter must be"); - OutputHelper.WriteLine(" the last parameter in the formal parameter list,"); - OutputHelper.WriteLine(" and the type of a params parameter must be a "); - OutputHelper.WriteLine(" single-dimension array type. For example, the"); - OutputHelper.WriteLine(" types int[] and int[][] can be used as the type of"); - OutputHelper.WriteLine(" a params parameter, but the type int[,] cannot be"); - OutputHelper.WriteLine(" used in this way."); + // Section 10.5 + // A parameter declared with a params modifier is + // a params parameter. A params parameter must be + // the last parameter in the formal parameter list, + // and the type of a params parameter must be a + // single-dimension array type. For example, the + // types int[] and int[][] can be used as the type of + // a params parameter, but the type int[,] cannot be + // used in this way. Assert.IsTrue(MethodsTestClass163.testMethod()); } [TestMethod] public void Methods164_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A parameter declared with a params modifier is"); - OutputHelper.WriteLine(" a params parameter. A params parameter must be"); - OutputHelper.WriteLine(" the last parameter in the formal parameter list,"); - OutputHelper.WriteLine(" and the type of a params parameter must be a "); - OutputHelper.WriteLine(" single-dimension array type. For example, the"); - OutputHelper.WriteLine(" types int[] and int[][] can be used as the type of"); - OutputHelper.WriteLine(" a params parameter, but the type int[,] cannot be"); - OutputHelper.WriteLine(" used in this way."); + // Section 10.5 + // A parameter declared with a params modifier is + // a params parameter. A params parameter must be + // the last parameter in the formal parameter list, + // and the type of a params parameter must be a + // single-dimension array type. For example, the + // types int[] and int[][] can be used as the type of + // a params parameter, but the type int[,] cannot be + // used in this way. Assert.IsTrue(MethodsTestClass164.testMethod()); } [TestMethod] public void Methods169_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" The caller may specify an expression of a type that"); - OutputHelper.WriteLine(" is implicitly convertible to the formal parameter type."); - OutputHelper.WriteLine(" In this case, the params parameter acts precisely like"); - OutputHelper.WriteLine(" a value parameter."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // The caller may specify an expression of a type that + // is implicitly convertible to the formal parameter type. + // In this case, the params parameter acts precisely like + // a value parameter. Assert.IsTrue(MethodsTestClass169.testMethod()); } [TestMethod] public void Methods172_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass172.testMethod()); } [TestMethod] public void Methods173_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass173.testMethod()); } [TestMethod] public void Methods174_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass174.testMethod()); } [TestMethod] public void Methods175_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass175.testMethod()); } [TestMethod] public void Methods179_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass179.testMethod()); } [TestMethod] public void Methods180_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass180.testMethod()); } [TestMethod] public void Methods181_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass181.testMethod()); } [TestMethod] public void Methods182_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass182.testMethod()); } [TestMethod] public void Methods183_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass183.testMethod()); } [TestMethod] public void Methods184_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter enables a caller to supply values"); - OutputHelper.WriteLine(" in one of two ways."); - OutputHelper.WriteLine(" Alternately, the caller may specify zero or more expressions,"); - OutputHelper.WriteLine(" where the type of each expression is implicitly convertible"); - OutputHelper.WriteLine(" to the element type of the formal parameter type. In this case,"); - OutputHelper.WriteLine(" params parameter is initialized with an array fo the formal"); - OutputHelper.WriteLine(" parameter type that contains the value or values provided by"); - OutputHelper.WriteLine(" the caller."); + // Section 10.5 + // A params parameter enables a caller to supply values + // in one of two ways. + // Alternately, the caller may specify zero or more expressions, + // where the type of each expression is implicitly convertible + // to the element type of the formal parameter type. In this case, + // params parameter is initialized with an array fo the formal + // parameter type that contains the value or values provided by + // the caller. Assert.IsTrue(MethodsTestClass184.testMethod()); } [TestMethod] public void Methods185_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method is permitted to assign new values"); - OutputHelper.WriteLine(" to a params parameter. Such assignments only"); - OutputHelper.WriteLine(" affect the local storage location represented"); - OutputHelper.WriteLine(" by the params parameter."); + // Section 10.5 + // A method is permitted to assign new values + // to a params parameter. Such assignments only + // affect the local storage location represented + // by the params parameter. Assert.IsTrue(MethodsTestClass185.testMethod()); } [TestMethod] public void Methods186_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter can be passed along to another"); - OutputHelper.WriteLine(" params parameter."); + // Section 10.5 + // A params parameter can be passed along to another + // params parameter. Assert.IsTrue(MethodsTestClass186.testMethod()); } [TestMethod] public void Methods187_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A params parameter can be passed along to another"); - OutputHelper.WriteLine(" params parameter."); + // Section 10.5 + // A params parameter can be passed along to another + // params parameter. Assert.IsTrue(MethodsTestClass187.testMethod()); } [TestMethod] public void Methods188_Test() { - OutputHelper.WriteLine("Testing explicit base method call to a child class whose parent implements"); + // Testing explicit base method call to a child class whose parent implements Assert.IsTrue(MethodsTestClass188.testMethod()); } [TestMethod] public void Methods190_Test() { - OutputHelper.WriteLine("Testing implicit base method calls to protected methods in parent class"); + // Testing implicit base method calls to protected methods in parent class Assert.IsTrue(MethodsTestClass190.testMethod()); } [TestMethod] public void Methods191_Test() { - OutputHelper.WriteLine("Testing implicit base method calls to internal methods in parent class"); + // Testing implicit base method calls to internal methods in parent class Assert.IsTrue(MethodsTestClass191.testMethod()); } [TestMethod] public void Methods192_Test() { - OutputHelper.WriteLine("Testing implicit base method calls to protected internal methods in parent class"); + // Testing implicit base method calls to protected internal methods in parent class Assert.IsTrue(MethodsTestClass192.testMethod()); } [TestMethod] public void Methods193_Test() { - OutputHelper.WriteLine("Testing implicit base method calls to private methods in parent class"); + // Testing implicit base method calls to private methods in parent class Assert.IsTrue(MethodsTestClass193.testMethod()); } [TestMethod] public void Methods194_Test() { - OutputHelper.WriteLine("Testing implicit base method calls to public virtual methods in parent class"); + // Testing implicit base method calls to public virtual methods in parent class Assert.IsTrue(MethodsTestClass194.testMethod()); } [TestMethod] public void Methods195_Test() { - OutputHelper.WriteLine("Tests if a new method does not overwrite a virtual method in a base class"); + // Tests if a new method does not overwrite a virtual method in a base class Assert.IsFalse(MethodsTestClass195.testMethod()); - OutputHelper.WriteLine("This failure indicates a test is now passing that previously failed by design."); - OutputHelper.WriteLine("It previously marked as known failure because of bug # 21563"); - OutputHelper.WriteLine("The Test owner needs to verify that the change was intentional and remove the known failure."); + // This failure indicates a test is now passing that previously failed by design. + // It previously marked as known failure because of bug # 21563 + // The Test owner needs to verify that the change was intentional and remove the known failure. } [TestMethod] public void Methods196_Test() { - OutputHelper.WriteLine("Tests if a new method does overwrite an abstract method in a base class"); + // Tests if a new method does overwrite an abstract method in a base class Assert.IsTrue(MethodsTestClass196.testMethod()); } [TestMethod] public void Methods197_Test() { - OutputHelper.WriteLine("Tests the calling of an empty delegate"); + // Tests the calling of an empty delegate Assert.IsTrue(MethodsTestClass197.testMethod()); } [TestMethod] public void Methods199_Test() { - OutputHelper.WriteLine("Tests if a sealed method overwrites a virtual method in a base class"); + // Tests if a sealed method overwrites a virtual method in a base class Assert.IsTrue(MethodsTestClass199.testMethod()); } [TestMethod] public void Methods200_Test() { - OutputHelper.WriteLine("Tests large number of assignments inside a public method"); + // Tests large number of assignments inside a public method Assert.IsTrue(MethodsTestClass200.testMethod()); } [TestMethod] public void Methods201_Test() { - OutputHelper.WriteLine("Tests large number of assignments inside a public static method"); + // Tests large number of assignments inside a public static method Assert.IsTrue(MethodsTestClass201.testMethod()); } [TestMethod] public void Methods204_Test() { - OutputHelper.WriteLine("Tests a method with explicit, params signature"); + // Tests a method with explicit, params signature Assert.IsTrue(MethodsTestClass204.testMethod()); } [TestMethod] public void Methods205_Test() { - OutputHelper.WriteLine("Tests a method with a mixed explicit and params signature"); + // Tests a method with a mixed explicit and params signature Assert.IsTrue(MethodsTestClass205.testMethod()); } [TestMethod] public void Methods206_Test() { - OutputHelper.WriteLine("Tests method overloading between params and explicit signatures (static)"); + // Tests method overloading between params and explicit signatures (static) Assert.IsTrue(MethodsTestClass206.testMethod()); } [TestMethod] public void Methods207_Test() { - OutputHelper.WriteLine("Tests method overloading between params and explicit signatures"); + // Tests method overloading between params and explicit signatures Assert.IsTrue(MethodsTestClass207.testMethod()); } [TestMethod] public void Methods210_Test() { - OutputHelper.WriteLine(" Section 10.5 If the declaration includes the sealed modifier, then the "); - OutputHelper.WriteLine(" declaration must also include the override modifier."); + // Section 10.5 If the declaration includes the sealed modifier, then the + // declaration must also include the override modifier. Assert.IsTrue(MethodsTestClass210.testMethod()); } [TestMethod] public void Methods223_Test() { - OutputHelper.WriteLine(" Section 10.5 The ref and out parameters are part of a method's signature, but the params modifier is not."); + // Section 10.5 The ref and out parameters are part of a method's signature, but the params modifier is not. Assert.IsTrue(MethodsTestClass223.testMethod()); } [TestMethod] public void Methods224_Test() { - OutputHelper.WriteLine(" Section 10.5 The ref and out parameters are part of a method's signature, but the params modifier is not."); + // Section 10.5 The ref and out parameters are part of a method's signature, but the params modifier is not. Assert.IsTrue(MethodsTestClass224.testMethod()); } [TestMethod] public void Methods229_Test() { - OutputHelper.WriteLine(" error CS0114: 'function1' hides inherited member 'function2'."); - OutputHelper.WriteLine(" To make the current method override that implementation, add "); - OutputHelper.WriteLine(" the override keyword. Otherwise add the new keyword."); + // error CS0114: 'function1' hides inherited member 'function2'. + // To make the current method override that implementation, add + // the override keyword. Otherwise add the new keyword. Assert.IsTrue(MethodsTestClass229.testMethod()); } [TestMethod] public void Methods230_Test() { - OutputHelper.WriteLine(" error CS0114: 'function1' hides inherited member 'function2'."); - OutputHelper.WriteLine(" To make the current method override that implementation, add "); - OutputHelper.WriteLine(" the override keyword. Otherwise add the new keyword."); + // error CS0114: 'function1' hides inherited member 'function2'. + // To make the current method override that implementation, add + // the override keyword. Otherwise add the new keyword. Assert.IsTrue(MethodsTestClass230.testMethod()); } [TestMethod] public void Methods231_Test() { - OutputHelper.WriteLine(" error CS0114: 'function1' hides inherited member 'function2'."); - OutputHelper.WriteLine(" To make the current method override that implementation, add "); - OutputHelper.WriteLine(" the override keyword. Otherwise add the new keyword."); + // error CS0114: 'function1' hides inherited member 'function2'. + // To make the current method override that implementation, add + // the override keyword. Otherwise add the new keyword. Assert.IsTrue(MethodsTestClass231.testMethod()); } [TestMethod] public void Methods232_Test() { - OutputHelper.WriteLine(" error CS0114: 'function1' hides inherited member 'function2'."); - OutputHelper.WriteLine(" To make the current method override that implementation, add "); - OutputHelper.WriteLine(" the override keyword. Otherwise add the new keyword."); + // error CS0114: 'function1' hides inherited member 'function2'. + // To make the current method override that implementation, add + // the override keyword. Otherwise add the new keyword. Assert.IsTrue(MethodsTestClass232.testMethod()); } [TestMethod] public void Methods233_Test() { - OutputHelper.WriteLine(" Section 10.5"); - OutputHelper.WriteLine(" A method-declaration may include set of attributes,"); - OutputHelper.WriteLine(" a new modifier, one of four access modifiers,"); - OutputHelper.WriteLine(" one of the static, virtual, override, or abstract "); - OutputHelper.WriteLine(" modifiers, and an extern modifier."); + // Section 10.5 + // A method-declaration may include set of attributes, + // a new modifier, one of four access modifiers, + // one of the static, virtual, override, or abstract + // modifiers, and an extern modifier. Assert.IsTrue(MethodsTestClass233.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestOperatorTests.cs b/Tests/NFUnitTestClasses/UnitTestOperatorTests.cs index 93e3e106..cb342d1e 100644 --- a/Tests/NFUnitTestClasses/UnitTestOperatorTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestOperatorTests.cs @@ -16,280 +16,280 @@ class UnitTestOperatorTests [TestMethod] public void Operators1_Test() { - OutputHelper.WriteLine("Tests overriding unary plus"); + // Tests overriding unary plus Assert.IsTrue(OperatorsTestClass1.testMethod()); } [TestMethod] public void Operators2_Test() { - OutputHelper.WriteLine("Tests overriding unary minus"); + // Tests overriding unary minus Assert.IsTrue(OperatorsTestClass2.testMethod()); } [TestMethod] public void Operators3_Test() { - OutputHelper.WriteLine("Tests overriding tilde"); + // Tests overriding tilde Assert.IsTrue(OperatorsTestClass3.testMethod()); } [TestMethod] public void Operators4_Test() { - OutputHelper.WriteLine("Tests overriding increment prefix"); + // Tests overriding increment prefix Assert.IsTrue(OperatorsTestClass4.testMethod()); } [TestMethod] public void Operators5_Test() { - OutputHelper.WriteLine("Tests overriding increment suffix"); + // Tests overriding increment suffix Assert.IsTrue(OperatorsTestClass5.testMethod()); } [TestMethod] public void Operators6_Test() { - OutputHelper.WriteLine("Tests overriding decrement prefix"); + // Tests overriding decrement prefix Assert.IsTrue(OperatorsTestClass6.testMethod()); } [TestMethod] public void Operators7_Test() { - OutputHelper.WriteLine("Tests overriding decrement suffix"); + // Tests overriding decrement suffix Assert.IsTrue(OperatorsTestClass7.testMethod()); } [TestMethod] public void Operators13_Test() { - OutputHelper.WriteLine("Tests overriding binary plus"); + // Tests overriding binary plus Assert.IsTrue(OperatorsTestClass13.testMethod()); } [TestMethod] public void Operators14_Test() { - OutputHelper.WriteLine("Tests overriding binary minus"); + // Tests overriding binary minus Assert.IsTrue(OperatorsTestClass14.testMethod()); } [TestMethod] public void Operators15_Test() { - OutputHelper.WriteLine("Tests overriding asterisk (multiply)"); + // Tests overriding asterisk (multiply) Assert.IsTrue(OperatorsTestClass15.testMethod()); } [TestMethod] public void Operators16_Test() { - OutputHelper.WriteLine("Tests overriding slash (division)"); + // Tests overriding slash (division) Assert.IsTrue(OperatorsTestClass16.testMethod()); } [TestMethod] public void Operators17_Test() { - OutputHelper.WriteLine("Tests overriding percent (modulus)"); + // Tests overriding percent (modulus) Assert.IsTrue(OperatorsTestClass17.testMethod()); } [TestMethod] public void Operators18_Test() { - OutputHelper.WriteLine("Tests overriding caret (xor)"); + // Tests overriding caret (xor) Assert.IsTrue(OperatorsTestClass18.testMethod()); } [TestMethod] public void Operators19_Test() { - OutputHelper.WriteLine("Tests overriding ampersand"); + // Tests overriding ampersand Assert.IsTrue(OperatorsTestClass19.testMethod()); } [TestMethod] public void Operators20_Test() { - OutputHelper.WriteLine("Tests overriding pipe (or)"); + // Tests overriding pipe (or) Assert.IsTrue(OperatorsTestClass20.testMethod()); } [TestMethod] public void Operators21_Test() { - OutputHelper.WriteLine("Tests overriding double less-than (left shift)"); + // Tests overriding double less-than (left shift) Assert.IsTrue(OperatorsTestClass21.testMethod()); } [TestMethod] public void Operators22_Test() { - OutputHelper.WriteLine("Tests overriding double greater-than (right shift)"); + // Tests overriding double greater-than (right shift) Assert.IsTrue(OperatorsTestClass22.testMethod()); } [TestMethod] public void Operators23_Test() { - OutputHelper.WriteLine("Tests overriding binary plus with 1 int parameter"); + // Tests overriding binary plus with 1 int parameter Assert.IsTrue(OperatorsTestClass23.testMethod()); } [TestMethod] public void Operators24_Test() { - OutputHelper.WriteLine("Tests overriding double equals (equality comparison) and exclamation-equals (non-equality comparison)"); + // Tests overriding double equals (equality comparison) and exclamation-equals (non-equality comparison) Assert.IsTrue(OperatorsTestClass24.testMethod()); } [TestMethod] public void Operators38_Test() { - OutputHelper.WriteLine("Tests overriding binary plus with 1 int parameter"); + // Tests overriding binary plus with 1 int parameter Assert.IsTrue(OperatorsTestClass38.testMethod()); } [TestMethod] public void Operators39_Test() { - OutputHelper.WriteLine("Tests overriding binary minus with 1 int parameter"); + // Tests overriding binary minus with 1 int parameter Assert.IsTrue(OperatorsTestClass39.testMethod()); } [TestMethod] public void Operators40_Test() { - OutputHelper.WriteLine("Tests overriding asterisk (multiply) with 1 int parameter"); + // Tests overriding asterisk (multiply) with 1 int parameter Assert.IsTrue(OperatorsTestClass40.testMethod()); } [TestMethod] public void Operators41_Test() { - OutputHelper.WriteLine("Tests overriding slash (divide) with 1 int parameter"); + // Tests overriding slash (divide) with 1 int parameter Assert.IsTrue(OperatorsTestClass41.testMethod()); } [TestMethod] public void Operators42_Test() { - OutputHelper.WriteLine("Tests overriding percent (modulus) with 1 int parameter"); + // Tests overriding percent (modulus) with 1 int parameter Assert.IsTrue(OperatorsTestClass42.testMethod()); } [TestMethod] public void Operators43_Test() { - OutputHelper.WriteLine("Tests overriding caret (xor) with 1 int parameter"); + // Tests overriding caret (xor) with 1 int parameter Assert.IsTrue(OperatorsTestClass43.testMethod()); } [TestMethod] public void Operators44_Test() { - OutputHelper.WriteLine("Tests overriding ampersand with 1 int parameter"); + // Tests overriding ampersand with 1 int parameter Assert.IsTrue(OperatorsTestClass44.testMethod()); } [TestMethod] public void Operators45_Test() { - OutputHelper.WriteLine("Tests overriding pipe (or) with 1 int parameter"); + // Tests overriding pipe (or) with 1 int parameter Assert.IsTrue(OperatorsTestClass45.testMethod()); } [TestMethod] public void Operators46_Test() { - OutputHelper.WriteLine("Tests overriding double equals (equality comparison) and exclamation-equals "); - OutputHelper.WriteLine("(non-equality comparison) with 1 int"); + // Tests overriding double equals (equality comparison) and exclamation-equals + // (non-equality comparison) with 1 int Assert.IsTrue(OperatorsTestClass46.testMethod()); } [TestMethod] public void Operators67_Test() { - OutputHelper.WriteLine("Tests overriding unary exclamation (not)"); + // Tests overriding unary exclamation (not) Assert.IsTrue(OperatorsTestClass67.testMethod()); } [TestMethod] public void Operators68_Test() { - OutputHelper.WriteLine("Tests overriding true and false"); + // Tests overriding true and false Assert.IsTrue(OperatorsTestClass68.testMethod()); } [TestMethod] public void Operators69_Test() { - OutputHelper.WriteLine("Tests overriding true and false and ampersand"); + // Tests overriding true and false and ampersand Assert.IsTrue(OperatorsTestClass69.testMethod()); } [TestMethod] public void Operators88_Test() { - OutputHelper.WriteLine("Tests true and false with ampersand"); + // Tests true and false with ampersand Assert.IsTrue(OperatorsTestClass88.testMethod()); } [TestMethod] public void Operators89_Test() { - OutputHelper.WriteLine("Tests true and false with double ampersand"); + // Tests true and false with double ampersand Assert.IsTrue(OperatorsTestClass89.testMethod()); } [TestMethod] public void Operators90_Test() { - OutputHelper.WriteLine("Tests true and false with pipe (or)"); + // Tests true and false with pipe (or) Assert.IsTrue(OperatorsTestClass90.testMethod()); } [TestMethod] public void Operators91_Test() { - OutputHelper.WriteLine("Tests true and false with double pipe (or)"); + // Tests true and false with double pipe (or) Assert.IsTrue(OperatorsTestClass91.testMethod()); } [TestMethod] public void Operators92_Test() { - OutputHelper.WriteLine("Tests true and false with caret (xor)"); + // Tests true and false with caret (xor) Assert.IsTrue(OperatorsTestClass92.testMethod()); } [TestMethod] public void Operators93_Test() { - OutputHelper.WriteLine("Tests numerical types with plus"); + // Tests numerical types with plus Assert.IsTrue(OperatorsTestClass93.testMethod()); } [TestMethod] public void Operators94_Test() { - OutputHelper.WriteLine("Tests numerical types with minus"); + // Tests numerical types with minus Assert.IsTrue(OperatorsTestClass94.testMethod()); } [TestMethod] public void Operators95_Test() { - OutputHelper.WriteLine("Tests numerical types with asterisk (multiply)"); + // Tests numerical types with asterisk (multiply) Assert.IsTrue(OperatorsTestClass95.testMethod()); } [TestMethod] public void Operators96_Test() { - OutputHelper.WriteLine("Tests numerical types with slash (divide)"); + // Tests numerical types with slash (divide) Assert.IsTrue(OperatorsTestClass96.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs b/Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs index 1fcdd2f4..82b51aac 100644 --- a/Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestPropertiesTests.cs @@ -16,446 +16,446 @@ class UnitTestPropertiesTests [TestMethod] public void Properties003_Test() { - OutputHelper.WriteLine("Section 10.6"); - OutputHelper.WriteLine("A property declaration may include set of"); - OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); - OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); + // Section 10.6 + // A property declaration may include set of + // attributes, a new modifier, a valid combination + // nof the four access modifiers, and a static modifier. Assert.IsTrue(PropertiesTestClass003.testMethod()); } [TestMethod] public void Properties004_Test() { - OutputHelper.WriteLine("Section 10.6"); - OutputHelper.WriteLine("A property declaration may include set of"); - OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); - OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); + // Section 10.6 + // A property declaration may include set of + // attributes, a new modifier, a valid combination + // nof the four access modifiers, and a static modifier. Assert.IsTrue(PropertiesTestClass004.testMethod()); } [TestMethod] public void Properties005_Test() { - OutputHelper.WriteLine("Section 10.6"); - OutputHelper.WriteLine("A property declaration may include set of"); - OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); - OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); + // Section 10.6 + // A property declaration may include set of + // attributes, a new modifier, a valid combination + // nof the four access modifiers, and a static modifier. Assert.IsTrue(PropertiesTestClass005.testMethod()); } [TestMethod] public void Properties006_Test() { - OutputHelper.WriteLine("Section 10.6"); - OutputHelper.WriteLine("A property declaration may include set of"); - OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); - OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); + // Section 10.6 + // A property declaration may include set of + // attributes, a new modifier, a valid combination + // nof the four access modifiers, and a static modifier. Assert.IsTrue(PropertiesTestClass006.testMethod()); } [TestMethod] public void Properties007_Test() { - OutputHelper.WriteLine("Section 10.6"); - OutputHelper.WriteLine("A property declaration may include set of"); - OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); - OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); + // Section 10.6 + // A property declaration may include set of + // attributes, a new modifier, a valid combination + // nof the four access modifiers, and a static modifier. Assert.IsTrue(PropertiesTestClass007.testMethod()); } [TestMethod] public void Properties008_Test() { - OutputHelper.WriteLine("Section 10.6"); - OutputHelper.WriteLine("A property declaration may include set of"); - OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); - OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); + // Section 10.6 + // A property declaration may include set of + // attributes, a new modifier, a valid combination + // nof the four access modifiers, and a static modifier. Assert.IsTrue(PropertiesTestClass008.testMethod()); } [TestMethod] public void Properties009_Test() { - OutputHelper.WriteLine("Section 10.6"); - OutputHelper.WriteLine("A property declaration may include set of"); - OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); - OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); + // Section 10.6 + // A property declaration may include set of + // attributes, a new modifier, a valid combination + // nof the four access modifiers, and a static modifier. Assert.IsTrue(PropertiesTestClass009.testMethod()); } [TestMethod] public void Properties010_Test() { - OutputHelper.WriteLine("Section 10.6"); - OutputHelper.WriteLine("A property declaration may include set of"); - OutputHelper.WriteLine("attributes, a new modifier, a valid combination"); - OutputHelper.WriteLine("nof the four access modifiers, and a static modifier."); + // Section 10.6 + // A property declaration may include set of + // attributes, a new modifier, a valid combination + // nof the four access modifiers, and a static modifier. Assert.IsTrue(PropertiesTestClass010.testMethod()); } [TestMethod] public void Properties011_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("The type of a property declaration specifies"); - OutputHelper.WriteLine("the type of the property introduced by the"); - OutputHelper.WriteLine("declaration, and the member-name specifies"); - OutputHelper.WriteLine("the name of the property. Unless the property"); - OutputHelper.WriteLine("is an explicit interface member implementation,"); - OutputHelper.WriteLine("the member name is simply an identifier. For an"); - OutputHelper.WriteLine("explicit interface member implementation, the"); - OutputHelper.WriteLine("member name consists of an interface-type followed"); - OutputHelper.WriteLine("by a . and an identifier."); - OutputHelper.WriteLine("This is currently an expected fail, but is resolved in 3.0 see Bug 16341 for details"); + // Section 10.6 + // The type of a property declaration specifies + // the type of the property introduced by the + // declaration, and the member-name specifies + // the name of the property. Unless the property + // is an explicit interface member implementation, + // the member name is simply an identifier. For an + // explicit interface member implementation, the + // member name consists of an interface-type followed + // by a . and an identifier. + // This is currently an expected fail, but is resolved in 3.0 see Bug 16341 for details Assert.IsTrue(PropertiesTestClass011.testMethod()); } [TestMethod] public void Properties024_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("An instance property is associated with"); - OutputHelper.WriteLine("a given instance of a class, and this instance"); - OutputHelper.WriteLine("can be accessed as this in the accessors of"); - OutputHelper.WriteLine("the property."); + // Section 10.6 + // An instance property is associated with + // a given instance of a class, and this instance + // can be accessed as this in the accessors of + // the property. Assert.IsTrue(PropertiesTestClass024.testMethod()); } [TestMethod] public void Properties025_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("An instance property is associated with"); - OutputHelper.WriteLine("a given instance of a class, and this instance"); - OutputHelper.WriteLine("can be accessed as this in the accessors of"); - OutputHelper.WriteLine("the property."); + // Section 10.6 + // An instance property is associated with + // a given instance of a class, and this instance + // can be accessed as this in the accessors of + // the property. Assert.IsTrue(PropertiesTestClass025.testMethod()); } [TestMethod] public void Properties026_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("When a property is referenced in a member-access"); - OutputHelper.WriteLine("of the form E.M, if M is a static property, E must"); - OutputHelper.WriteLine("denote a type, and if M is an instance property,"); - OutputHelper.WriteLine("E must denote an instance."); + // Section 10.6 + // When a property is referenced in a member-access + // of the form E.M, if M is a static property, E must + // denote a type, and if M is an instance property, + // E must denote an instance. Assert.IsTrue(PropertiesTestClass026.testMethod()); } [TestMethod] public void Properties027_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("When a property is referenced in a member-access"); - OutputHelper.WriteLine("of the form E.M, if M is a static property, E must"); - OutputHelper.WriteLine("denote a type, and if M is an instance property,"); - OutputHelper.WriteLine("E must denote an instance."); + // Section 10.6 + // When a property is referenced in a member-access + // of the form E.M, if M is a static property, E must + // denote a type, and if M is an instance property, + // E must denote an instance. Assert.IsTrue(PropertiesTestClass027.testMethod()); } [TestMethod] public void Properties033_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("The accessor declarations consist of a "); - OutputHelper.WriteLine("get-accessor-declaration, a set-accessor"); - OutputHelper.WriteLine("declaration, or both."); + // Section 10.6 + // The accessor declarations consist of a + // get-accessor-declaration, a set-accessor + // declaration, or both. Assert.IsTrue(PropertiesTestClass033.testMethod()); } [TestMethod] public void Properties034_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("The accessor declarations consist of a "); - OutputHelper.WriteLine("get-accessor-declaration, a set-accessor"); - OutputHelper.WriteLine("declaration, or both."); + // Section 10.6 + // The accessor declarations consist of a + // get-accessor-declaration, a set-accessor + // declaration, or both. Assert.IsTrue(PropertiesTestClass034.testMethod()); } [TestMethod] public void Properties035_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("The accessor declarations consist of a "); - OutputHelper.WriteLine("get-accessor-declaration, a set-accessor"); - OutputHelper.WriteLine("declaration, or both."); + // Section 10.6 + // The accessor declarations consist of a + // get-accessor-declaration, a set-accessor + // declaration, or both. Assert.IsTrue(PropertiesTestClass035.testMethod()); } [TestMethod] public void Properties036_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass036.testMethod()); } [TestMethod] public void Properties037_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass037.testMethod()); } [TestMethod] public void Properties038_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass038.testMethod()); } [TestMethod] public void Properties043_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass043.testMethod()); } [TestMethod] public void Properties046_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass046.testMethod()); } [TestMethod] public void Properties048_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass048.testMethod()); } [TestMethod] public void Properties050_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass050.testMethod()); } [TestMethod] public void Properties053_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass053.testMethod()); } [TestMethod] public void Properties054_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass054.testMethod()); } [TestMethod] public void Properties056_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass056.testMethod()); } [TestMethod] public void Properties058_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass058.testMethod()); } [TestMethod] public void Properties059_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass059.testMethod()); } [TestMethod] public void Properties060_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass060.testMethod()); } [TestMethod] public void Properties062_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass062.testMethod()); } [TestMethod] public void Properties068_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass068.testMethod()); } [TestMethod] public void Properties071_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass071.testMethod()); } [TestMethod] public void Properties072_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass072.testMethod()); } [TestMethod] public void Properties073_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass073.testMethod()); } [TestMethod] public void Properties074_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass074.testMethod()); } [TestMethod] public void Properties075_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass075.testMethod()); } [TestMethod] public void Properties078_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass078.testMethod()); } [TestMethod] public void Properties089_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass089.testMethod()); } [TestMethod] public void Properties090_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass090.testMethod()); } [TestMethod] public void Properties097_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass097.testMethod()); } [TestMethod] public void Properties109_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass109.testMethod()); } [TestMethod] public void Properties110_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass110.testMethod()); } [TestMethod] public void Properties121_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass121.testMethod()); } [TestMethod] public void Properties122_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass122.testMethod()); } [TestMethod] public void Properties123_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - OutputHelper.WriteLine("This test is an expected fail"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor + // This test is an expected fail Assert.IsFalse(PropertiesTestClass123.testMethod()); } [TestMethod] public void Properties124_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); - OutputHelper.WriteLine("This test is an expected fail"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor + // This test is an expected fail Assert.IsFalse(PropertiesTestClass124.testMethod()); } [TestMethod] public void Properties125_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass125.testMethod()); } [TestMethod] public void Properties126_Test() { - OutputHelper.WriteLine("Section 10.6 "); - OutputHelper.WriteLine("Each accessor declaration consists of an"); - OutputHelper.WriteLine("optional accessor-modifier, followed by the"); - OutputHelper.WriteLine("keyword get or set, followed by an accessor"); + // Section 10.6 + // Each accessor declaration consists of an + // optional accessor-modifier, followed by the + // keyword get or set, followed by an accessor Assert.IsTrue(PropertiesTestClass126.testMethod()); } diff --git a/Tests/NFUnitTestClasses/UnitTestStaticTests.cs b/Tests/NFUnitTestClasses/UnitTestStaticTests.cs index 41702ea0..80617079 100644 --- a/Tests/NFUnitTestClasses/UnitTestStaticTests.cs +++ b/Tests/NFUnitTestClasses/UnitTestStaticTests.cs @@ -16,99 +16,99 @@ class UnitTestStaticTests [TestMethod] public void Static_Inst01_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" When a static member is referenced in a member-access"); - OutputHelper.WriteLine(" of the form E.M, E must denote a type. It is an error for"); - OutputHelper.WriteLine(" E to denote an instance."); + // Section 10.2 + // When a static member is referenced in a member-access + // of the form E.M, E must denote a type. It is an error for + // E to denote an instance. Assert.IsTrue(Static_InstTestClass01.testMethod()); } [TestMethod] public void Static_Inst07_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" A static field identifies exactly one storage location."); - OutputHelper.WriteLine(" No matter how many instances of a class are created,"); - OutputHelper.WriteLine(" there is only ever one copy of a static field."); + // Section 10.2 + // A static field identifies exactly one storage location. + // No matter how many instances of a class are created, + // there is only ever one copy of a static field. Assert.IsTrue(Static_InstTestClass07.testMethod()); } [TestMethod] public void Static_Inst14_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" When an instance member is referenced in a member-access"); - OutputHelper.WriteLine(" of the form E.M, E must denote an instance. It is an error "); - OutputHelper.WriteLine(" for E to denote a type."); + // Section 10.2 + // When an instance member is referenced in a member-access + // of the form E.M, E must denote an instance. It is an error + // for E to denote a type. Assert.IsTrue(Static_InstTestClass14.testMethod()); } [TestMethod] public void Static_Inst18_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" Every instance of a class contains a separate copy "); - OutputHelper.WriteLine(" of all instance fields of the class."); + // Section 10.2 + // Every instance of a class contains a separate copy + // of all instance fields of the class. Assert.IsTrue(Static_InstTestClass18.testMethod()); } [TestMethod] public void Static_Inst19_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" An instance function member (method, property "); - OutputHelper.WriteLine(" accessor, indexer accessor, constructor, or "); - OutputHelper.WriteLine(" destructor) operates on a given instance of "); - OutputHelper.WriteLine(" the class, and this instance can be accessed as"); - OutputHelper.WriteLine(" this."); + // Section 10.2 + // An instance function member (method, property + // accessor, indexer accessor, constructor, or + // destructor) operates on a given instance of + // the class, and this instance can be accessed as + // this. Assert.IsTrue(Static_InstTestClass19.testMethod()); } [TestMethod] public void Static_Inst20_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" An instance function member (method, property "); - OutputHelper.WriteLine(" accessor, indexer accessor, constructor, or "); - OutputHelper.WriteLine(" destructor) operates on a given instance of "); - OutputHelper.WriteLine(" the class, and this instance can be accessed as"); - OutputHelper.WriteLine(" this."); + // Section 10.2 + // An instance function member (method, property + // accessor, indexer accessor, constructor, or + // destructor) operates on a given instance of + // the class, and this instance can be accessed as + // this. Assert.IsTrue(Static_InstTestClass20.testMethod()); } [TestMethod] public void Static_Inst21_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" An instance function member (method, property "); - OutputHelper.WriteLine(" accessor, indexer accessor, constructor, or "); - OutputHelper.WriteLine(" destructor) operates on a given instance of "); - OutputHelper.WriteLine(" the class, and this instance can be accessed as"); - OutputHelper.WriteLine(" this."); + // Section 10.2 + // An instance function member (method, property + // accessor, indexer accessor, constructor, or + // destructor) operates on a given instance of + // the class, and this instance can be accessed as + // this. Assert.IsTrue(Static_InstTestClass21.testMethod()); } [TestMethod] public void Static_Inst22_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" An instance function member (method, property "); - OutputHelper.WriteLine(" accessor, indexer accessor, constructor, or "); - OutputHelper.WriteLine(" destructor) operates on a given instance of "); - OutputHelper.WriteLine(" the class, and this instance can be accessed as"); - OutputHelper.WriteLine(" this."); + // Section 10.2 + // An instance function member (method, property + // accessor, indexer accessor, constructor, or + // destructor) operates on a given instance of + // the class, and this instance can be accessed as + // this. Assert.IsTrue(Static_InstTestClass22.testMethod()); } [TestMethod] public void Static_Inst23_Test() { - OutputHelper.WriteLine(" Section 10.2 "); - OutputHelper.WriteLine(" An instance function member (method, property "); - OutputHelper.WriteLine(" accessor, indexer accessor, constructor, or "); - OutputHelper.WriteLine(" destructor) operates on a given instance of "); - OutputHelper.WriteLine(" the class, and this instance can be accessed as"); - OutputHelper.WriteLine(" this."); + // Section 10.2 + // An instance function member (method, property + // accessor, indexer accessor, constructor, or + // destructor) operates on a given instance of + // the class, and this instance can be accessed as + // this. Assert.IsTrue(Static_InstTestClass23.testMethod()); } diff --git a/Tests/NFUnitTestConversions/UnitTestExprefTests.cs b/Tests/NFUnitTestConversions/UnitTestExprefTests.cs index 2400dcb3..8102410f 100644 --- a/Tests/NFUnitTestConversions/UnitTestExprefTests.cs +++ b/Tests/NFUnitTestConversions/UnitTestExprefTests.cs @@ -16,7 +16,7 @@ class UnitTestExprefTests [TestMethod] public void Expref_obj_ref_Test() { - OutputHelper.WriteLine(" Converting from 'object' to a reference object. "); + // Converting from 'object' to a reference object. Assert.IsTrue(ExprefTestClass_obj_ref.testMethod()); } @@ -24,7 +24,7 @@ public void Expref_obj_ref_Test() public void Expref_obj_ref_exc_Test() { - OutputHelper.WriteLine(" Converting from 'object' to a reference object. "); + // Converting from 'object' to a reference object. Assert.IsTrue(ExprefTestClass_obj_ref_exc.testMethod()); } @@ -32,7 +32,7 @@ public void Expref_obj_ref_exc_Test() public void Expref_class_class_Test() { - OutputHelper.WriteLine(" Tests that you can convert from a base class to a derived class"); + // Tests that you can convert from a base class to a derived class Assert.IsTrue(ExprefTestClass_class_class.testMethod()); } @@ -40,7 +40,7 @@ public void Expref_class_class_Test() public void Expref_class_class_exc_Test() { - OutputHelper.WriteLine(" Tests that you can convert from a base class to a derived class"); + // Tests that you can convert from a base class to a derived class Assert.IsTrue(ExprefTestClass_class_class_exc.testMethod()); } @@ -48,44 +48,44 @@ public void Expref_class_class_exc_Test() public void Expref_inter_struct_exc_Test() { - OutputHelper.WriteLine(" Tests that you can convert from an interface to a struct that implements it."); + // Tests that you can convert from an interface to a struct that implements it. Assert.IsTrue(ExprefTestClass_inter_struct_exc.testMethod()); } [TestMethod] public void Expref_class_inter_Test() { - OutputHelper.WriteLine(" Tests converting from a class to an interface that the class does not implement (but a derived class might)."); + // Tests converting from a class to an interface that the class does not implement (but a derived class might). Assert.IsTrue(ExprefTestClass_class_inter.testMethod()); } [TestMethod] public void Expref_class_inter_exc_Test() { - OutputHelper.WriteLine(" Tests converting from a class to an interface that the class does not implement (but a derived class might)."); + // Tests converting from a class to an interface that the class does not implement (but a derived class might). Assert.IsTrue(ExprefTestClass_class_inter_exc.testMethod()); } [TestMethod] public void Expref_inter_class_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to a class"); - OutputHelper.WriteLine("From any interface-type S to any class-type T, provided T is not sealed, or provided T implements S."); - OutputHelper.WriteLine("If T implements S:"); + // Tests converting from an interface to a class + // From any interface-type S to any class-type T, provided T is not sealed, or provided T implements S. + // If T implements S: Assert.IsTrue(ExprefTestClass_inter_class.testMethod()); } [TestMethod] public void Expref_inter_class2_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to a class"); + // Tests converting from an interface to a class Assert.IsTrue(ExprefTestClass_inter_class2.testMethod()); } [TestMethod] public void Expref_inter_class2_exc1_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to a class"); + // Tests converting from an interface to a class Assert.IsTrue(ExprefTestClass_inter_class2_exc1.testMethod()); } @@ -93,7 +93,7 @@ public void Expref_inter_class2_exc1_Test() public void Expref_inter_class2_exc2_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to a class"); + // Tests converting from an interface to a class Assert.IsTrue(ExprefTestClass_inter_class2_exc2.testMethod()); } @@ -101,98 +101,98 @@ public void Expref_inter_class2_exc2_Test() public void Expref_inter_class_exc_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to a class"); + // Tests converting from an interface to a class Assert.IsTrue(ExprefTestClass_inter_class_exc.testMethod()); } [TestMethod] public void Expref_inter_class_sealed_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to a class"); + // Tests converting from an interface to a class Assert.IsTrue(ExprefTestClass_inter_class_sealed.testMethod()); } [TestMethod] public void Expref_inter_class_sealed_exc_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to a class"); + // Tests converting from an interface to a class Assert.IsTrue(ExprefTestClass_inter_class_sealed_exc.testMethod()); } [TestMethod] public void Expref_inter_inter_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to an interface"); + // Tests converting from an interface to an interface Assert.IsTrue(ExprefTestClass_inter_inter.testMethod()); } [TestMethod] public void Expref_inter_inter_exc_Test() { - OutputHelper.WriteLine(" Tests converting from an interface to an interface"); + // Tests converting from an interface to an interface Assert.IsTrue(ExprefTestClass_inter_inter_exc.testMethod()); } [TestMethod] public void Impenum_zero_Test() { - OutputHelper.WriteLine("Tests whether 0 can be converted to various enum types..."); + // Tests whether 0 can be converted to various enum types... Assert.IsTrue(ImpenumTestClass_zero.testMethod()); } [TestMethod] public void Impref_ref_obj_Test() { - OutputHelper.WriteLine(" Converting from a reference object to 'object'"); + // Converting from a reference object to 'object' Assert.IsTrue(ImprefTestClass_ref_obj.testMethod()); } [TestMethod] public void Impref_class_class_Test() { - OutputHelper.WriteLine(" Tests that you can convert from a class to a base class. "); + // Tests that you can convert from a class to a base class. Assert.IsTrue(ImprefTestClass_class_class.testMethod()); } [TestMethod] public void Impref_class_inter_Test() { - OutputHelper.WriteLine(" Tests that you can convert from a class to an interface that it implements. "); + // Tests that you can convert from a class to an interface that it implements. Assert.IsTrue(ImprefTestClass_class_inter.testMethod()); } [TestMethod] public void Impref_struct_inter_Test() { - OutputHelper.WriteLine(" Tests that you can convert from a struct to an interface that it implements. "); + // Tests that you can convert from a struct to an interface that it implements. Assert.IsTrue(ImprefTestClass_struct_inter.testMethod()); } [TestMethod] public void Impref_array_array_Test() { - OutputHelper.WriteLine(" Tests that you can convert from an array of one class to an array of another class..."); + // Tests that you can convert from an array of one class to an array of another class... Assert.IsTrue(ImprefTestClass_array_array.testMethod()); } [TestMethod] public void Impref_array_cloneable_Test() { - OutputHelper.WriteLine(" Tests that you can convert from an array to System.ICloneable;"); + // Tests that you can convert from an array to System.ICloneable; Assert.IsTrue(ImprefTestClass_array_cloneable.testMethod()); } [TestMethod] public void Impref_null_ref_Test() { - OutputHelper.WriteLine(" Tests that you can convert from null to several reference types"); + // Tests that you can convert from null to several reference types Assert.IsTrue(ImprefTestClass_null_ref.testMethod()); } [TestMethod] public void Impref_delegate_to_SystemDotDelegate_Test() { - OutputHelper.WriteLine(" Tests that you can convert from a delegate type to System.Delegate"); + // Tests that you can convert from a delegate type to System.Delegate Assert.IsTrue(ImprefTestClass_delegate_to_SystemDotDelegate.testMethod()); } diff --git a/Tests/NFUnitTestDelegates/UnitTestDelegatesTests.cs b/Tests/NFUnitTestDelegates/UnitTestDelegatesTests.cs index 64eb9a11..a4591558 100644 --- a/Tests/NFUnitTestDelegates/UnitTestDelegatesTests.cs +++ b/Tests/NFUnitTestDelegates/UnitTestDelegatesTests.cs @@ -16,179 +16,179 @@ public class UnitTestDelegatesTests [TestMethod] public void Delegate_delegate01_Test() { - OutputHelper.WriteLine(" Verify that both static and instance methods can be called from delegates."); + // Verify that both static and instance methods can be called from delegates. Assert.IsTrue(Delegate_TestClass_delegate01.testMethod()); } [TestMethod] public void Delegate_delegate02_Test() { - OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); + // Verify that delegate can be initialized to null. Assert.IsTrue(Delegate_TestClass_delegate02.testMethod()); } [TestMethod] public void Delegate_delegate03_Test() { - OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); + // Verify that delegate can be initialized to null. Assert.IsTrue(Delegate_TestClass_delegate03.testMethod()); } [TestMethod] public void Delegate_delegate04_Test() { - OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator."); + // Verify that delegate can be assigned by ternary operator. Assert.IsTrue(Delegate_TestClass_delegate04.testMethod()); } [TestMethod] public void Delegate_delegate05_Test() { - OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator."); + // Verify that delegate can be assigned by ternary operator. Assert.IsTrue(Delegate_TestClass_delegate05.testMethod()); } [TestMethod] public void Delegate_delegate06_Test() { - OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator. Assign null instead of usable value."); + // Verify that delegate can be assigned by ternary operator. Assign null instead of usable value. Assert.IsTrue(Delegate_TestClass_delegate06.testMethod()); } [TestMethod] public void Delegate_delegate07_Test() { - OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator. Use null instead of a usable value."); + // Verify that delegate can be assigned by ternary operator. Use null instead of a usable value. Assert.IsTrue(Delegate_TestClass_delegate07.testMethod()); } [TestMethod] public void Delegate_delegate08_Test() { - OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator. Assign null instead of usable value."); + // Verify that delegate can be assigned by ternary operator. Assign null instead of usable value. Assert.IsTrue(Delegate_TestClass_delegate08.testMethod()); } [TestMethod] public void Delegate_delegate09_Test() { - OutputHelper.WriteLine(" Verify that delegates can be compared for equality."); + // Verify that delegates can be compared for equality. Assert.IsTrue(Delegate_TestClass_delegate09.testMethod()); } [TestMethod] public void Delegate_delegate10_Test() { - OutputHelper.WriteLine(" Verify that delegates can be aggregated in arrays and compared for equality."); + // Verify that delegates can be aggregated in arrays and compared for equality. Assert.IsTrue(Delegate_TestClass_delegate10.testMethod()); } [TestMethod] public void Delegate_delegate11_Test() { - OutputHelper.WriteLine(" Verify that delegates can be members of classes."); + // Verify that delegates can be members of classes. Assert.IsTrue(Delegate_TestClass_delegate11.testMethod()); } [TestMethod] public void Delegate_delegate12_Test() { - OutputHelper.WriteLine(" Verify that both static and instance methods can be called from delegates."); + // Verify that both static and instance methods can be called from delegates. Assert.IsTrue(Delegate_TestClass_delegate12.testMethod()); } [TestMethod] public void Delegate_delegate13_Test() { - OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); + // Verify that delegate can be initialized to null. Assert.IsTrue(Delegate_TestClass_delegate13.testMethod()); } [TestMethod] public void Delegate_delegate14_Test() { - OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); + // Verify that delegate can be initialized to null. Assert.IsTrue(Delegate_TestClass_delegate14.testMethod()); } [TestMethod] public void Delegate_delegate14a_Test() { - OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); + // Verify that delegate can be initialized to null. Assert.IsTrue(Delegate_TestClass_delegate14a.testMethod()); } [TestMethod] public void Delegate_delegate14b_Test() { - OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); + // Verify that delegate can be initialized to null. Assert.IsTrue(Delegate_TestClass_delegate14b.testMethod()); } [TestMethod] public void Delegate_delegate14c_Test() { - OutputHelper.WriteLine(" Verify that delegate can be initialized to null."); + // Verify that delegate can be initialized to null. Assert.IsTrue(Delegate_TestClass_delegate14c.testMethod()); } [TestMethod] public void Delegate_delegate15_Test() { - OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator."); + // Verify that delegate can be assigned by ternary operator. Assert.IsTrue(Delegate_TestClass_delegate15.testMethod()); } [TestMethod] public void Delegate_delegate16_Test() { - OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator."); + // Verify that delegate can be assigned by ternary operator. Assert.IsTrue(Delegate_TestClass_delegate16.testMethod()); } [TestMethod] public void Delegate_delegate17_Test() { - OutputHelper.WriteLine(" Verify that delegate can be assigned by ternary operator. Assign null instead of usable value."); + // Verify that delegate can be assigned by ternary operator. Assign null instead of usable value. Assert.IsTrue(Delegate_TestClass_delegate17.testMethod()); } [TestMethod] public void Delegate_delegate18_Test() { - OutputHelper.WriteLine(" Make sure a delegate list filled with nulls is detectable as foo == null"); + // Make sure a delegate list filled with nulls is detectable as foo == null Assert.IsTrue(Delegate_TestClass_delegate18.testMethod()); } [TestMethod] public void Delegate_delegate19_Test() { - OutputHelper.WriteLine(" Verify that delegates can be aggregated in arrays and compared for equality."); + // Verify that delegates can be aggregated in arrays and compared for equality. Assert.IsTrue(Delegate_TestClass_delegate19.testMethod()); } [TestMethod] public void Delegate_delegate20_Test() { - OutputHelper.WriteLine(" Verify that delegates can be compared for equality."); + // Verify that delegates can be compared for equality. Assert.IsTrue(Delegate_TestClass_delegate20.testMethod()); } [TestMethod] public void Delegate_delegate21_Test() { - OutputHelper.WriteLine(" Verify that delegates can be aggregated in arrays and compared for equality."); + // Verify that delegates can be aggregated in arrays and compared for equality. Assert.IsTrue(Delegate_TestClass_delegate21.testMethod()); } [TestMethod] public void Delegate_delegate23_Test() { - OutputHelper.WriteLine(" Verify that delegates can be aggregated using the + operator;"); + // Verify that delegates can be aggregated using the + operator; Assert.IsTrue(Delegate_TestClass_delegate23.testMethod()); } [TestMethod] public void Delegate_delegate24_Test() { - OutputHelper.WriteLine(" Verify that delegates can be aggregated using the + operator;"); + // Verify that delegates can be aggregated using the + operator; Assert.IsTrue(Delegate_TestClass_delegate24.testMethod()); } [TestMethod] public void Delegate_delegate25_Test() { - OutputHelper.WriteLine(" Verify that delegates can be removed using the - operator;"); + // Verify that delegates can be removed using the - operator; Assert.IsTrue(Delegate_TestClass_delegate25.testMethod()); } [TestMethod] public void Delegate_delegate26_Test() { - OutputHelper.WriteLine("Bug 214780 - async delegates to methods with out parameters don't work"); - OutputHelper.WriteLine("This test is expected to fail."); + // Bug 214780 - async delegates to methods with out parameters don't work + // This test is expected to fail. Assert.IsFalse(Delegate_TestClass_delegate26.testMethod()); } /* This test is skipped because it causes a Metadat processor error, it fails in the baseline. [TestMethod] public void Delegate_delegate28_Test() { - OutputHelper.WriteLine("Verify Delegate with 257 args. This is because more than 257 causes the"); - OutputHelper.WriteLine("compiler to take a different code path."); + // Verify Delegate with 257 args. This is because more than 257 causes the + // compiler to take a different code path. Assert.IsTrue(Delegate_TestClass_delegate28.testMethod()) { return MFTestResults.Pass; @@ -199,13 +199,13 @@ public void Delegate_delegate28_Test() [TestMethod] public void Delegate_delegate30_Test() { - OutputHelper.WriteLine(" Verify that both static and instance struct methods can be called from delegates."); + // Verify that both static and instance struct methods can be called from delegates. Assert.IsTrue(Delegate_TestClass_delegate30.testMethod()); } [TestMethod] public void Delegate_delegate31_Test() { - OutputHelper.WriteLine(" Verify that virtual struct methods can be called from delegates."); + // Verify that virtual struct methods can be called from delegates. Assert.IsTrue(Delegate_TestClass_delegate31.testMethod()); } /*These are skipped due to their use of Volatile variables which are not supported @@ -213,7 +213,7 @@ public void Delegate_delegate31_Test() [TestMethod] public void Delegate_delegate32_Test() { - OutputHelper.WriteLine("Delegate Invocation using BeginInvoke"); + // Delegate Invocation using BeginInvoke Assert.IsTrue(Delegate_TestClass_delegate32.testMethod()) { return MFTestResults.Pass; @@ -223,7 +223,7 @@ public void Delegate_delegate32_Test() [TestMethod] public void Delegate_delegate34_Test() { - OutputHelper.WriteLine("Delegate Invocation using BeginInvoke"); + // Delegate Invocation using BeginInvoke Assert.IsTrue(Delegate_TestClass_delegate34.testMethod()) { return MFTestResults.Pass; @@ -234,31 +234,31 @@ public void Delegate_delegate34_Test() [TestMethod] public void Delegate_delegate36_Test() { - OutputHelper.WriteLine("params modifier should not be considered when matching a delegate with a method"); + // params modifier should not be considered when matching a delegate with a method Assert.IsTrue(Delegate_TestClass_delegate36.testMethod()); } [TestMethod] public void Delegate_delegate60_Test() { - OutputHelper.WriteLine("A delegate declaration defines a class that derives from System.Delegate"); + // A delegate declaration defines a class that derives from System.Delegate Assert.IsTrue(Delegate_TestClass_delegate60.testMethod()); } [TestMethod] public void Delegate_delegate62_Test() { - OutputHelper.WriteLine("The compiler is expected to warn that the new keyword id not rquired as we're not hiding an inherited member"); + // The compiler is expected to warn that the new keyword id not rquired as we're not hiding an inherited member Assert.IsTrue(Delegate_TestClass_delegate62.testMethod()); } [TestMethod] public void Delegate_delegate64_Test() { - OutputHelper.WriteLine("Compiler is expected to warn when new is not used when hiding a member delegate of the base class"); + // Compiler is expected to warn when new is not used when hiding a member delegate of the base class Assert.IsTrue(Delegate_TestClass_delegate64.testMethod()); } [TestMethod] public void Delegate_delegate65_Test() { - OutputHelper.WriteLine("Make sure delegates can be hidden."); + // Make sure delegates can be hidden. Assert.IsTrue(Delegate_TestClass_delegate65.testMethod()); } /*These tests are skipped because the use the == operator in an unsupported way @@ -266,7 +266,7 @@ public void Delegate_delegate65_Test() [TestMethod] public void Delegate_delegate66_Test() { - OutputHelper.WriteLine("Two compatible delegate types can be compared for equality."); + // Two compatible delegate types can be compared for equality. Assert.IsTrue(Delegate_TestClass_delegate66.testMethod()) { return MFTestResults.Pass; @@ -276,7 +276,7 @@ public void Delegate_delegate66_Test() [TestMethod] public void Delegate_delegate70_Test() { - OutputHelper.WriteLine("Two compatible delegate types can be compared for equality (or inequality)."); + // Two compatible delegate types can be compared for equality (or inequality). Assert.IsTrue(Delegate_TestClass_delegate70.testMethod()) { return MFTestResults.Pass; @@ -287,13 +287,13 @@ public void Delegate_delegate70_Test() [TestMethod] public void Delegate_delegate71_Test() { - OutputHelper.WriteLine("Verify simple +="); + // Verify simple += Assert.IsTrue(Delegate_TestClass_delegate71.testMethod()); } [TestMethod] public void Delegate_delegate72_Test() { - OutputHelper.WriteLine(" Verify that delegates can be removed using the -= operator;"); + // Verify that delegates can be removed using the -= operator; Assert.IsTrue(Delegate_TestClass_delegate72.testMethod()); } /* These tests are skipped because they use == in an unsupported way @@ -301,7 +301,7 @@ public void Delegate_delegate72_Test() [TestMethod] public void Delegate_delegate73_Test() { - OutputHelper.WriteLine("Verify equality and inequality after using += and -= on delegates"); + // Verify equality and inequality after using += and -= on delegates Assert.IsTrue(Delegate_TestClass_delegate73.testMethod()) { return MFTestResults.Pass; @@ -311,7 +311,7 @@ public void Delegate_delegate73_Test() [TestMethod] public void Delegate_delegate74_Test() { - OutputHelper.WriteLine("Verify ability to call members of System.Delegate on delegate types"); + // Verify ability to call members of System.Delegate on delegate types Assert.IsTrue(Delegate_TestClass_delegate74.testMethod()) { return MFTestResults.Pass; @@ -321,8 +321,8 @@ public void Delegate_delegate74_Test() [TestMethod] public void Delegate_delegate75_Test() { - OutputHelper.WriteLine("Verify ability to call members of System.Delegate on delegate types"); - OutputHelper.WriteLine("and that ordinality is maintained in concatenated invocation lists"); + // Verify ability to call members of System.Delegate on delegate types + // and that ordinality is maintained in concatenated invocation lists Assert.IsTrue(Delegate_TestClass_delegate75.testMethod()) { return MFTestResults.Pass; @@ -332,8 +332,8 @@ public void Delegate_delegate75_Test() [TestMethod] public void Delegate_delegate76_Test() { - OutputHelper.WriteLine("Verify ability to call members of System.Delegate on delegate types"); - OutputHelper.WriteLine("and that ordinality is maintained in concatenated invocation lists"); + // Verify ability to call members of System.Delegate on delegate types + // and that ordinality is maintained in concatenated invocation lists Assert.IsTrue(Delegate_TestClass_delegate76.testMethod()) { return MFTestResults.Pass; @@ -344,61 +344,61 @@ public void Delegate_delegate76_Test() [TestMethod] public void Delegate_delegate77_Test() { - OutputHelper.WriteLine("Verify that ordinality is maintained in concatenated invocation lists"); - OutputHelper.WriteLine("and that the invocation list members are called synchronously"); + // Verify that ordinality is maintained in concatenated invocation lists + // and that the invocation list members are called synchronously Assert.IsTrue(Delegate_TestClass_delegate77.testMethod()); } [TestMethod] public void Delegate_delegate78_Test() { - OutputHelper.WriteLine("Verify that ordinality is maintained in concatenated invocation lists"); - OutputHelper.WriteLine("and that the invocation list members are called synchronously and"); - OutputHelper.WriteLine("that ref parameters are modified through the invocation chain."); + // Verify that ordinality is maintained in concatenated invocation lists + // and that the invocation list members are called synchronously and + // that ref parameters are modified through the invocation chain. Assert.IsTrue(Delegate_TestClass_delegate78.testMethod()); } [TestMethod] public void Delegate_delegate79_Test() { - OutputHelper.WriteLine("Verify that ordinality is maintained in concatenated invocation lists"); - OutputHelper.WriteLine("and that the invocation list members are called synchronously and"); - OutputHelper.WriteLine("that out parameters are set by the last member in the invocation chain."); + // Verify that ordinality is maintained in concatenated invocation lists + // and that the invocation list members are called synchronously and + // that out parameters are set by the last member in the invocation chain. Assert.IsTrue(Delegate_TestClass_delegate79.testMethod()); } [TestMethod] public void Delegate_delegate80_Test() { - OutputHelper.WriteLine("Verify that System.Exceptions not caught in invoked method are bubbled up"); - OutputHelper.WriteLine("and the remaining methods in the invocation list are not invoked."); + // Verify that System.Exceptions not caught in invoked method are bubbled up + // and the remaining methods in the invocation list are not invoked. Assert.IsTrue(Delegate_TestClass_delegate80.testMethod()); } [TestMethod] public void Delegate_delegate81_Test() { - OutputHelper.WriteLine("Sample from section 15.3 of Delegate_TestClass_?_A#LS"); + // Sample from section 15.3 of Delegate_TestClass_?_A#LS Assert.IsTrue(Delegate_TestClass_delegate81.testMethod()); } [TestMethod] public void Delegate_delegate_modifier09_Test() { - OutputHelper.WriteLine("only new, public, private, protected and internal are allowed as modifiers"); + // only new, public, private, protected and internal are allowed as modifiers Assert.IsTrue(Delegate_TestClass_delegate_modifier09.testMethod()); } [TestMethod] public void Delegate_delegate_modifier10_Test() { - OutputHelper.WriteLine("only new, public, private, protected and internal are allowed as modifiers"); + // only new, public, private, protected and internal are allowed as modifiers Assert.IsTrue(Delegate_TestClass_delegate_modifier10.testMethod()); } [TestMethod] public void Delegate_delegate_modifier11_Test() { - OutputHelper.WriteLine("only new, public, private, protected and internal are allowed as modifiers"); + // only new, public, private, protected and internal are allowed as modifiers Assert.IsTrue(Delegate_TestClass_delegate_modifier11.testMethod()); } [TestMethod] public void Delegate_delegate_modifier12_Test() { - OutputHelper.WriteLine("only new, public, private, protected and internal are allowed as modifiers"); + // only new, public, private, protected and internal are allowed as modifiers Assert.IsTrue(Delegate_TestClass_delegate_modifier12.testMethod()); } @@ -408,10 +408,10 @@ public void Delegate_delegate_modifier12_Test() delegate int Delegate_TestClass_delegate01_1(); public class Delegate_TestClass_delegate01_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -426,8 +426,7 @@ static public int Main_old() retval -= foo(); foo = new Delegate_TestClass_delegate01_1(Delegate_TestClass_delegate01_2.far); retval -= foo(); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -438,10 +437,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate02_1(); public class Delegate_TestClass_delegate02_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -458,8 +457,7 @@ static public int Main_old() foo = null; foo = new Delegate_TestClass_delegate02_1(Delegate_TestClass_delegate02_2.far); retval -= foo(); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -471,10 +469,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate03_2 { public static int retval = 0x03; - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -491,8 +489,7 @@ static public int Main_old() { Delegate_TestClass_delegate03_2.retval -= 0x03; } - if(Delegate_TestClass_delegate03_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate03_2.retval; } public static bool testMethod() @@ -503,10 +500,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate04_1(); public class Delegate_TestClass_delegate04_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -523,8 +520,7 @@ static public int Main_old() retval -= foo(); foo = !loo() ? new Delegate_TestClass_delegate04_1(p.bar) : new Delegate_TestClass_delegate04_1(Delegate_TestClass_delegate04_2.far); retval -= foo(); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -535,10 +531,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate05_1(); public class Delegate_TestClass_delegate05_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -555,8 +551,7 @@ static public int Main_old() retval -= foo(); foo = !loo() ? null : new Delegate_TestClass_delegate05_1(Delegate_TestClass_delegate05_2.far); retval -= foo(); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -567,10 +562,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate06_1(); public class Delegate_TestClass_delegate06_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -601,8 +596,7 @@ static public int Main_old() { retval -= 0x02; } - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -613,10 +607,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate07_1(); public class Delegate_TestClass_delegate07_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -640,8 +634,7 @@ static public int Main_old() { retval -= 0x02; } - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -652,10 +645,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate08_1(); public class Delegate_TestClass_delegate08_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -676,8 +669,7 @@ static public int Main_old() if (foo == null) foo = new Delegate_TestClass_delegate08_1(Delegate_TestClass_delegate08_2.far); retval -= foo(); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -688,10 +680,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate09_1(); public class Delegate_TestClass_delegate09_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -716,8 +708,7 @@ static public int Main_old() retval -= 0x08; retval -= foo2(); OutputHelper.WriteLine(retval.ToString()); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -728,10 +719,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate10_1(); public class Delegate_TestClass_delegate10_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -753,8 +744,7 @@ static public int Main_old() retval -= 0x08; retval -= foo[0](); OutputHelper.WriteLine(retval.ToString()); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -765,10 +755,10 @@ public static bool testMethod() public delegate int Delegate_TestClass_delegate11_1(); public class Delegate_TestClass_delegate11_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } public Delegate_TestClass_delegate11_1 foo = null; @@ -786,8 +776,7 @@ static public int Main_old() p.foo = new Delegate_TestClass_delegate11_1(p.bar); retval -= p.foo(); OutputHelper.WriteLine(retval.ToString()); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -799,10 +788,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate12_2 { public static int retval = 0x06; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 0x01; } + public void bar() { retval -= 0x01; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 0x02; } } @@ -820,8 +809,7 @@ static public int Main_old() multifoo = new Delegate_TestClass_delegate12_1(Delegate_TestClass_delegate12_2.far); multifoo += foo; multifoo(); - if(Delegate_TestClass_delegate12_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate12_2.retval; } public static bool testMethod() @@ -833,10 +821,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate13_2 { public static int retval = 0x04; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 0x01; } + public void bar() { retval -= 0x01; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 0x02; } } @@ -852,8 +840,7 @@ static public int Main_old() foo = new Delegate_TestClass_delegate13_1(Delegate_TestClass_delegate13_2.far); foo += new Delegate_TestClass_delegate13_1(p.bar); foo(); - if(Delegate_TestClass_delegate13_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate13_2.retval; } public static bool testMethod() @@ -865,10 +852,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate14_2 { public static int retval = 0x03; - public void bar() { OutputHelper.WriteLine("bar"); retval += 0x10; } + public void bar() { retval += 0x10; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval += 0x20; } } @@ -885,8 +872,7 @@ static public int Main_old() { Delegate_TestClass_delegate14_2.retval -= 0x03; } - if(Delegate_TestClass_delegate14_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate14_2.retval; } public static bool testMethod() @@ -898,10 +884,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate14a_2 { public static int retval = 0x02; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 0x01; } + public void bar() { retval -= 0x01; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 0x02; } } @@ -912,8 +898,7 @@ static public int Main_old() Delegate_TestClass_delegate14a_1 foo = new Delegate_TestClass_delegate14a_1(Delegate_TestClass_delegate14a_2.far); foo += (Delegate_TestClass_delegate14a_1)null; foo(); - if(Delegate_TestClass_delegate14a_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate14a_2.retval; } public static bool testMethod() @@ -925,10 +910,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate14b_2 { public static int retval = 0x02; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 0x01; } + public void bar() { retval -= 0x01; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 0x02; } } @@ -939,8 +924,7 @@ static public int Main_old() Delegate_TestClass_delegate14b_1 foo = null; foo += new Delegate_TestClass_delegate14b_1(Delegate_TestClass_delegate14b_2.far); foo(); - if(Delegate_TestClass_delegate14b_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate14b_2.retval; } public static bool testMethod() @@ -952,10 +936,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate14c_2 { public static int retval = 0x03; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 0x01; } + public void bar() { retval -= 0x01; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 0x02; } } @@ -968,8 +952,7 @@ static public int Main_old() foo += (Delegate_TestClass_delegate14c_1)null; foo += new Delegate_TestClass_delegate14c_1(Delegate_TestClass_delegate14c_2.far); foo(); - if(Delegate_TestClass_delegate14c_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate14c_2.retval; } public static bool testMethod() @@ -981,16 +964,16 @@ public static bool testMethod() public class Delegate_TestClass_delegate15_2 { public static int retval = 63; - public void bar1() { OutputHelper.WriteLine("bar1"); retval -= 0x01; } + public void bar1() { retval -= 0x01; } static public void far1() { - OutputHelper.WriteLine("far1"); + // far1 retval -= 0x02; } - public void bar2() { OutputHelper.WriteLine("bar2"); retval -= 10; } + public void bar2() { retval -= 10; } static public void far2() { - OutputHelper.WriteLine("far2"); + // far2 retval -= 20; } } @@ -1016,8 +999,7 @@ static public int Main_old() left = new Delegate_TestClass_delegate15_1(Delegate_TestClass_delegate15_2.far2); foo = loo() ? left += new Delegate_TestClass_delegate15_1(p.bar2) : right += new Delegate_TestClass_delegate15_1(Delegate_TestClass_delegate15_2.far1); foo(); - if(Delegate_TestClass_delegate15_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate15_2.retval; } public static bool testMethod() @@ -1029,10 +1011,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate16_2 { public static int retval = 0x09; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 0x01; } + public void bar() { retval -= 0x01; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 0x02; } } @@ -1056,8 +1038,7 @@ static public int Main_old() right = new Delegate_TestClass_delegate16_1(Delegate_TestClass_delegate16_2.far); foo = !loo() ? null : right += new Delegate_TestClass_delegate16_1(p.bar); foo(); - if(Delegate_TestClass_delegate16_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate16_2.retval; } public static bool testMethod() @@ -1069,16 +1050,16 @@ public static bool testMethod() public class Delegate_TestClass_delegate17_2 { public static int retval = 13; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 0x01; } + public void bar() { retval -= 0x01; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 0x02; } - public void bar2() { OutputHelper.WriteLine("bar2"); retval -= 10; } + public void bar2() { retval -= 10; } static public void far2() { - OutputHelper.WriteLine("far2"); + // far2 retval -= 20; } } @@ -1118,8 +1099,7 @@ static public int Main_old() { Delegate_TestClass_delegate17_2.retval -= 10; } - if(Delegate_TestClass_delegate17_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate17_2.retval; } public static bool testMethod() @@ -1131,16 +1111,16 @@ public static bool testMethod() public class Delegate_TestClass_delegate18_2 { public static int retval = 23; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 0x01; } + public void bar() { retval -= 0x01; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 0x02; } - public void bar1() { OutputHelper.WriteLine("bar1"); retval -= 10; } + public void bar1() { retval -= 10; } static public void far1() { - OutputHelper.WriteLine("far1"); + // far1 retval -= 20; } } @@ -1167,8 +1147,7 @@ static public int Main_old() } foo(); - if(Delegate_TestClass_delegate18_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate18_2.retval; } public static bool testMethod() @@ -1180,10 +1159,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate19_2 { public static int retval = 33; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 1; } + public void bar() { retval -= 1; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 2; } } @@ -1211,8 +1190,7 @@ static public int Main_old() if (foo[1] == foo[2]) Delegate_TestClass_delegate19_2.retval -= 20; foo[1](); - if(Delegate_TestClass_delegate19_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate19_2.retval; } public static bool testMethod() @@ -1224,16 +1202,16 @@ public static bool testMethod() public class Delegate_TestClass_delegate20_2 { public static int retval = 1333; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 1; } + public void bar() { retval -= 1; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 2; } - public void bar1() { OutputHelper.WriteLine("bar1"); retval -= 10; } + public void bar1() { retval -= 10; } static public void far1() { - OutputHelper.WriteLine("far1"); + // far1 retval -= 20; } } @@ -1265,8 +1243,7 @@ static public int Main_old() if (foo3 == foo4) Delegate_TestClass_delegate20_2.retval -= 1000; foo3(); - if(Delegate_TestClass_delegate20_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate20_2.retval; } public static bool testMethod() @@ -1278,10 +1255,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate21_2 { public static int retval = 33; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 1; } + public void bar() { retval -= 1; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 2; } } @@ -1307,8 +1284,7 @@ static public int Main_old() if (foo[0] == foo[1]) Delegate_TestClass_delegate21_2.retval -= 20; foo[0](); - if(Delegate_TestClass_delegate21_2.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return Delegate_TestClass_delegate21_2.retval; } public static bool testMethod() @@ -1320,10 +1296,10 @@ public static bool testMethod() public class Delegate_TestClass_delegate23_A { public static int retval = 3; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 1; } + public void bar() { retval -= 1; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 2; } } @@ -1337,8 +1313,7 @@ static public int Main_old() Delegate_TestClass_delegate23_Del foo2 = new Delegate_TestClass_delegate23_Del(p.bar); Delegate_TestClass_delegate23_Del foo3 = foo1 + foo2; foo3(); - if(Delegate_TestClass_delegate23_A.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval==" + Delegate_TestClass_delegate23_A.retval.ToString()); + return Delegate_TestClass_delegate23_A.retval; } public static bool testMethod() @@ -1350,16 +1325,16 @@ public static bool testMethod() public class Delegate_TestClass_delegate24_A { public static int retval = 0x0F; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 1; } + public void bar() { retval -= 1; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 2; } - public void bar2() { OutputHelper.WriteLine("bar2"); retval -= 4; } + public void bar2() { retval -= 4; } static public void far2() { - OutputHelper.WriteLine("far2"); + // far2 retval -= 8; } } @@ -1373,8 +1348,7 @@ static public int Main_old() Delegate_TestClass_delegate24_Del foo2 = new Delegate_TestClass_delegate24_Del(p.bar2) + new Delegate_TestClass_delegate24_Del(Delegate_TestClass_delegate24_A.far2); Delegate_TestClass_delegate24_Del foo3 = foo1 + foo2; foo3(); - if(Delegate_TestClass_delegate24_A.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval==" + Delegate_TestClass_delegate24_A.retval.ToString()); + return Delegate_TestClass_delegate24_A.retval; } public static bool testMethod() @@ -1386,16 +1360,16 @@ public static bool testMethod() public class Delegate_TestClass_delegate25_A { public static int retval = 0x3F; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 1; } + public void bar() { retval -= 1; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 2; } - public void bar2() { OutputHelper.WriteLine("bar2"); retval -= 4; } + public void bar2() { retval -= 4; } static public void far2() { - OutputHelper.WriteLine("far2"); + // far2 retval -= 8; } } @@ -1419,8 +1393,7 @@ static public int Main_old() Delegate_TestClass_delegate25_A.retval -= 0x20; Delegate_TestClass_delegate25_A.retval += 0x0C; foo4(); - if(Delegate_TestClass_delegate25_A.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval==" + Delegate_TestClass_delegate25_A.retval.ToString()); + return Delegate_TestClass_delegate25_A.retval; } public static bool testMethod() @@ -1440,8 +1413,7 @@ public static int Main_old(String[] args) IAsyncResult ar = hd.BeginInvoke(out i, null, null); i = 1; hd.EndInvoke(out i, ar); - if (0 == i) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, i==" + i.ToString()); + return i; } catch (System.Exception) @@ -1471,7 +1443,7 @@ public static int Main_old(String[] args) HD hd = new HD(Delegate_TestClass_delegate28.Hello); int i = 1; i = hd(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257); - if (0 == i) OutputHelper.WriteLine("PASS"); + if (0 == i) // PASS else OutputHelper.WriteLine("FAIL, i==" + i.ToString()); return i; } @@ -1494,10 +1466,10 @@ public static bool testMethod() delegate int Delegate_TestClass_delegate30_1(); public struct Delegate_TestClass_delegate30_2 { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } static public int far() { - OutputHelper.WriteLine("far"); + // far return 0x02; } } @@ -1534,7 +1506,7 @@ interface I } public struct Delegate_TestClass_delegate31_2 : I { - public int bar() { OutputHelper.WriteLine("bar"); return 0x01; } + public int bar() { return 0x01; } } public class Delegate_TestClass_delegate31 { @@ -1547,11 +1519,11 @@ static public int Main_old() retval -= foo(); if (retval == 0) { - OutputHelper.WriteLine("PASS"); + // PASS } else { - OutputHelper.WriteLine("FAIL"); + // FAIL } return retval; } @@ -1657,12 +1629,7 @@ public static int Main_old(String[] args) retval -= 0x04; if (cd is System.MulticastDelegate) retval -= 0x08; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL, 0x{0:X}"); - OutputHelper.WriteLine(retval.ToString()); - } + return retval; } public static bool testMethod() @@ -1748,12 +1715,7 @@ public static int Main_old(String[] args) bmd = new Delegate_TestClass_delegate65_1.Delegate_TestClass_delegate65_Del(bc.DelegatedMethod); if (bmd(2, 0.5f) == 2.5) retval -= 0x04; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL, 0x{0:X}"); - OutputHelper.WriteLine(retval.ToString()); - } + return retval; } public static bool testMethod() @@ -1784,8 +1746,8 @@ public static int Main_old(String[] args) retval -= 0x01; if (md2 == md1) retval -= 0x02; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else {OutputHelper.WriteLine("FAIL, 0x{0:X}"); + if (0 == retval) // PASS + else {// FAIL, 0x{0:X} return retval; } public static bool testMethod() @@ -1819,8 +1781,8 @@ public static int Main_old(String[] args) retval -= 0x01; if (md2 != md1) retval -= 0x02; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else {OutputHelper.WriteLine("FAIL, 0x{0:X}"); + if (0 == retval) // PASS + else {// FAIL, 0x{0:X} return retval; } public static bool testMethod() @@ -1862,12 +1824,7 @@ public static int Main_old(String[] args) { retval -= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL, 0x{0:X}"); - OutputHelper.WriteLine(retval.ToString()); - } + return retval; } public static bool testMethod() @@ -1882,16 +1839,16 @@ public static bool testMethod() public class Delegate_TestClass_delegate72_A { public static int retval = 0x3F; - public void bar() { OutputHelper.WriteLine("bar"); retval -= 1; } + public void bar() { retval -= 1; } static public void far() { - OutputHelper.WriteLine("far"); + // far retval -= 2; } - public void bar2() { OutputHelper.WriteLine("bar2"); retval -= 4; } + public void bar2() { retval -= 4; } static public void far2() { - OutputHelper.WriteLine("far2"); + // far2 retval -= 8; } } @@ -1916,8 +1873,7 @@ static public int Main_old() Delegate_TestClass_delegate72_A.retval -= 0x20; Delegate_TestClass_delegate72_A.retval += 0x0C; foo4(); - if(Delegate_TestClass_delegate72_A.retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval==" + Delegate_TestClass_delegate72_A.retval.ToString()); + return Delegate_TestClass_delegate72_A.retval; } public static bool testMethod() @@ -1964,8 +1920,8 @@ public static int Main_old(String[] args) { retval -= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else {OutputHelper.WriteLine("FAIL, 0x{0:X}"); + if (0 == retval) // PASS + else {// FAIL, 0x{0:X} return retval; } public static bool testMethod() @@ -2010,8 +1966,8 @@ public static int Main_old(String[] args) { retval -= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else {OutputHelper.WriteLine("FAIL, 0x{0:X}"); + if (0 == retval) // PASS + else {// FAIL, 0x{0:X} return retval; } public static bool testMethod() @@ -2077,8 +2033,8 @@ public static int Main_old(String[] args) { retval -= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else {OutputHelper.WriteLine("FAIL, 0x{0:X}"); + if (0 == retval) // PASS + else {// FAIL, 0x{0:X} return retval; } public static bool testMethod() @@ -2095,22 +2051,22 @@ public class Delegate_TestClass_delegate76 public delegate double MyDelegate2(int integerPortion, float fraction); public double DelegatedMethod1(int intPart, float frac) { - OutputHelper.WriteLine("DelegatedMethod1"); + // DelegatedMethod1 return intPart + frac + 5; } public double DelegatedMethod2(int intPart, float frac) { - OutputHelper.WriteLine("DelegatedMethod2"); + // DelegatedMethod2 return intPart + frac + 10; } public double DelegatedMethod3(int intPart, float frac) { - OutputHelper.WriteLine("DelegatedMethod3"); + // DelegatedMethod3 return intPart + frac + 15; } public double DelegatedMethod4(int intPart, float frac) { - OutputHelper.WriteLine("DelegatedMethod4"); + // DelegatedMethod4 return intPart + frac + 20; } public static int Main_old(String[] args) @@ -2146,8 +2102,8 @@ public static int Main_old(String[] args) { retval -= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else {OutputHelper.WriteLine("FAIL, 0x{0:X}"); + if (0 == retval) // PASS + else {// FAIL, 0x{0:X} return retval; } public static bool testMethod() @@ -2218,12 +2174,7 @@ public static int Main_old(String[] args) { retval -= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL, 0x{0:X}"); - OutputHelper.WriteLine(retval.ToString()); - } + return retval; } public static bool testMethod() @@ -2296,12 +2247,7 @@ public static int Main_old(String[] args) { retval -= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL, 0x{0:X}"); - OutputHelper.WriteLine(retval.ToString()); - } + return retval; } public static bool testMethod() @@ -2378,12 +2324,7 @@ public static int Main_old(String[] args) { retval -= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL, 0x{0:X}"); - OutputHelper.WriteLine(retval.ToString()); - } + return retval; } public static bool testMethod() @@ -2461,12 +2402,7 @@ public static int Main_old(String[] args) { retval ^= 0x20; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL, 0x{0:X}"); - OutputHelper.WriteLine(retval.ToString()); - } + return retval; } public static bool testMethod() diff --git a/Tests/NFUnitTestEnum/UnitTestEnumTests.cs b/Tests/NFUnitTestEnum/UnitTestEnumTests.cs index 185872ba..647eb5df 100644 --- a/Tests/NFUnitTestEnum/UnitTestEnumTests.cs +++ b/Tests/NFUnitTestEnum/UnitTestEnumTests.cs @@ -16,234 +16,234 @@ public class UnitTestEnumTests [TestMethod] public void Enum_enum01_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum01.testMethod()); } [TestMethod] public void Enum_enum02_Test() { - OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); + // Make sure that basic enum-with-base-type declarations, definitions, and assignments work. Assert.IsTrue(Enum_TestClass_enum02.testMethod()); } [TestMethod] public void Enum_enum07_Test() { - OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); + // Make sure that basic enum-with-base-type declarations, definitions, and assignments work. Assert.IsTrue(Enum_TestClass_enum07.testMethod()); } [TestMethod] public void Enum_enum09_Test() { - OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); + // Make sure that basic enum-with-base-type declarations, definitions, and assignments work. Assert.IsTrue(Enum_TestClass_enum09.testMethod()); } [TestMethod] public void Enum_enum10_Test() { - OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); + // Make sure that basic enum-with-base-type declarations, definitions, and assignments work. Assert.IsTrue(Enum_TestClass_enum10.testMethod()); } [TestMethod] public void Enum_enum11_Test() { - OutputHelper.WriteLine("Make sure that basic enum-with-base-type declarations, definitions, and assignments work."); + // Make sure that basic enum-with-base-type declarations, definitions, and assignments work. Assert.IsTrue(Enum_TestClass_enum11.testMethod()); } [TestMethod] public void Enum_enum27_Test() { - OutputHelper.WriteLine("Check that enumerator values are initialized as expected"); + // Check that enumerator values are initialized as expected Assert.IsTrue(Enum_TestClass_enum27.testMethod()); } [TestMethod] public void Enum_enum28_Test() { - OutputHelper.WriteLine("Check that enumerator values are initialized as expected"); + // Check that enumerator values are initialized as expected Assert.IsTrue(Enum_TestClass_enum28.testMethod()); } [TestMethod] public void Enum_enum29_Test() { - OutputHelper.WriteLine("The values of the enumerators need not be distinct"); + // The values of the enumerators need not be distinct Assert.IsTrue(Enum_TestClass_enum29.testMethod()); } [TestMethod] public void Enum_enum30_Test() { - OutputHelper.WriteLine("Check the point of definition of an enumerator"); + // Check the point of definition of an enumerator Assert.IsTrue(Enum_TestClass_enum30.testMethod()); } [TestMethod] public void Enum_enum31_Test() { - OutputHelper.WriteLine("Check the point of definition of an enumerator"); + // Check the point of definition of an enumerator Assert.IsTrue(Enum_TestClass_enum31.testMethod()); } [TestMethod] public void Enum_enum33_Test() { - OutputHelper.WriteLine("Enums obey local scope rules. An enum of the same name may be defined in an inner scope."); + // Enums obey local scope rules. An enum of the same name may be defined in an inner scope. Assert.IsTrue(Enum_TestClass_enum33.testMethod()); } [TestMethod] public void Enum_enum34_Test() { - OutputHelper.WriteLine("Enums can be converted to int."); + // Enums can be converted to int. Assert.IsTrue(Enum_TestClass_enum34.testMethod()); } [TestMethod] public void Enum_enum35_Test() { - OutputHelper.WriteLine("If no enumerator-definitions with = appear, then the"); - OutputHelper.WriteLine(" values of the corresponding constants begin at zero and"); + // If no enumerator-definitions with = appear, then the + // values of the corresponding constants begin at zero and Assert.IsTrue(Enum_TestClass_enum35.testMethod()); } [TestMethod] public void Enum_enum36_Test() { - OutputHelper.WriteLine("If no enumerator-definitions with = appear, then the"); - OutputHelper.WriteLine(" values of the corresponding constants begin at zero and"); + // If no enumerator-definitions with = appear, then the + // values of the corresponding constants begin at zero and Assert.IsTrue(Enum_TestClass_enum36.testMethod()); } [TestMethod] public void Enum_enum37_Test() { - OutputHelper.WriteLine("If no enumerator-definitions with = appear, then the"); - OutputHelper.WriteLine(" values of the corresponding constants begin at zero and"); + // If no enumerator-definitions with = appear, then the + // values of the corresponding constants begin at zero and Assert.IsTrue(Enum_TestClass_enum37.testMethod()); } [TestMethod] public void Enum_enum38_Test() { - OutputHelper.WriteLine("Enums can be declared in any scopt that a class can be declared in."); + // Enums can be declared in any scopt that a class can be declared in. Assert.IsTrue(Enum_TestClass_enum38.testMethod()); } [TestMethod] public void Enum_enum39_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum39.testMethod()); } [TestMethod] public void Enum_enum40_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum40.testMethod()); } [TestMethod] public void Enum_enum41_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum41.testMethod()); } [TestMethod] public void Enum_enum42_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum42.testMethod()); } [TestMethod] public void Enum_enum43_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum43.testMethod()); } [TestMethod] public void Enum_enum43u_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum43u.testMethod()); } [TestMethod] public void Enum_enum44_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum44.testMethod()); } [TestMethod] public void Enum_enum45_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum45.testMethod()); } [TestMethod] public void Enum_enum46_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum46.testMethod()); } [TestMethod] public void Enum_enum46u_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum46u.testMethod()); } [TestMethod] public void Enum_enum47_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum47.testMethod()); } [TestMethod] public void Enum_enum47u_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum47u.testMethod()); } [TestMethod] public void Enum_enum48_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum48.testMethod()); } [TestMethod] public void Enum_enum48u_Test() { - OutputHelper.WriteLine("If the constant-expression initilizing an enumerator is of integral type,"); - OutputHelper.WriteLine("it must be within the range of values that can be represented by the underlying type."); + // If the constant-expression initilizing an enumerator is of integral type, + // it must be within the range of values that can be represented by the underlying type. Assert.IsTrue(Enum_TestClass_enum48u.testMethod()); } [TestMethod] public void Enum_enum54_Test() { - OutputHelper.WriteLine("++ and -- operators can be used with objects of enumeration type. Check postfix form."); + // ++ and -- operators can be used with objects of enumeration type. Check postfix form. Assert.IsTrue(Enum_TestClass_enum54.testMethod()); } [TestMethod] public void Enum_enum55_Test() { - OutputHelper.WriteLine("++ and -- operators can be used with objects of enumeration type. Check postfix form."); + // ++ and -- operators can be used with objects of enumeration type. Check postfix form. Assert.IsTrue(Enum_TestClass_enum55.testMethod()); } [TestMethod] public void Enum_enum56_Test() { - OutputHelper.WriteLine("++ and -- operators can be used with objects of enumeration type. Check postfix form."); + // ++ and -- operators can be used with objects of enumeration type. Check postfix form. Assert.IsTrue(Enum_TestClass_enum56.testMethod()); } [TestMethod] public void Enum_enum57_Test() { - OutputHelper.WriteLine("++ and -- operators can be used with objects of enumeration type. Check postfix form."); + // ++ and -- operators can be used with objects of enumeration type. Check postfix form. Assert.IsTrue(Enum_TestClass_enum57.testMethod()); } [TestMethod] public void Enum_enum58_Test() { - OutputHelper.WriteLine("Bitwise operators AND, OR, XOR, and NOT can be used with objects of enumeration type."); + // Bitwise operators AND, OR, XOR, and NOT can be used with objects of enumeration type. Assert.IsTrue(Enum_TestClass_enum58.testMethod()); } @@ -255,86 +255,86 @@ public void Enum_enum62_Test() [TestMethod] public void Enum_enum63_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum63.testMethod()); } [TestMethod] public void Enum_enum64_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum64.testMethod()); } [TestMethod] public void Enum_enum65_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum65.testMethod()); } [TestMethod] public void Enum_enum66_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum66.testMethod()); } [TestMethod] public void Enum_enum67_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum67.testMethod()); } [TestMethod] public void Enum_enum68_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum68.testMethod()); } [TestMethod] public void Enum_enum69_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum69.testMethod()); } [TestMethod] public void Enum_enum70_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); + // Make sure that a basic enum declaration, definition, and assignment work. Assert.IsTrue(Enum_TestClass_enum70.testMethod()); } [TestMethod] public void Enum_enum71_Test() { - OutputHelper.WriteLine("Make sure that a basic enum declaration, definition, and assignment work."); - OutputHelper.WriteLine("This test is expeced to fail"); + // Make sure that a basic enum declaration, definition, and assignment work. + // This test is expeced to fail Assert.IsFalse(Enum_TestClass_enum71.testMethod()); } [TestMethod] public void Enum_enum72_Test() { - OutputHelper.WriteLine("Enum_TestClass_? bitwise and on enums"); + // Enum_TestClass_? bitwise and on enums Assert.IsTrue(Enum_TestClass_enum72.testMethod()); } [TestMethod] public void Enum_enum73_Test() { - OutputHelper.WriteLine("Enum_TestClass_? bitwise or on enums"); + // Enum_TestClass_? bitwise or on enums Assert.IsTrue(Enum_TestClass_enum73.testMethod()); } [TestMethod] public void Enum_enum74_Test() { - OutputHelper.WriteLine("Enum_TestClass_? bitwise xor on enums"); + // Enum_TestClass_? bitwise xor on enums Assert.IsTrue(Enum_TestClass_enum74.testMethod()); } [TestMethod] public void Enum_enum75_Test() { - OutputHelper.WriteLine("Enum_TestClass_? bitwise not on enums"); + // Enum_TestClass_? bitwise not on enums Assert.IsTrue(Enum_TestClass_enum75.testMethod()); } [TestMethod] public void Enum_enum77_Test() { - OutputHelper.WriteLine("Enum_TestClass_? bitwise not on enums"); + // Enum_TestClass_? bitwise not on enums Assert.IsTrue(Enum_TestClass_enum77.testMethod()); } [TestMethod] @@ -345,69 +345,69 @@ public void Enum_enum78_Test() [TestMethod] public void Enum_enum83_Test() { - OutputHelper.WriteLine("Enum member list can end with a comma"); + // Enum member list can end with a comma Assert.IsTrue(Enum_TestClass_enum83.testMethod()); } [TestMethod] public void Enum_enum86_Test() { - OutputHelper.WriteLine("[Access] modifiers of an enum declaration have the same meaning"); - OutputHelper.WriteLine("as those of a class declaration."); + // [Access] modifiers of an enum declaration have the same meaning + // as those of a class declaration. Assert.IsTrue(Enum_TestClass_enum86.testMethod()); } [TestMethod] public void Enum_enum93_Test() { - OutputHelper.WriteLine("Example from Enums chapter in CLS"); + // Example from Enums chapter in CLS Assert.IsTrue(Enum_TestClass_enum93.testMethod()); } [TestMethod] public void Enum_enum94_Test() { - OutputHelper.WriteLine("...any value of the underlying type of an enum can be cast to the enum type."); + // ...any value of the underlying type of an enum can be cast to the enum type. Assert.IsTrue(Enum_TestClass_enum94.testMethod()); } [TestMethod] public void EnumFlags01_Test() { - OutputHelper.WriteLine("check FlagAttribute with enum"); + // check FlagAttribute with enum TestClassEnumFlags01.TestMethod(); } [TestMethod] public void EnumFlags02_Test() { - OutputHelper.WriteLine("check FlagAttribute with enum"); + // check FlagAttribute with enum TestClassEnumFlags02.TestMethod(); } [TestMethod] public void EnumFlags03_Test() { - OutputHelper.WriteLine("check FlagAttribute with enum"); + // check FlagAttribute with enum TestClassEnumFlags03.TestMethod(); } [TestMethod] public void EnumFlags04_Test() { - OutputHelper.WriteLine("check FlagAttribute with enum with conversion"); + // check FlagAttribute with enum with conversion TestClassEnumFlags04.TestMethod(); } [TestMethod] public void EnumFlags05_Test() { - OutputHelper.WriteLine("check Enum.HasFlag"); + // check Enum.HasFlag TestClassEnumFlags05.TestMethod(); } [TestMethod] public void EnumFlags06_Test() { - OutputHelper.WriteLine("check Enum.HasFlag throws exception"); + // check Enum.HasFlag throws exception TestClassEnumFlags06.TestMethod(); } [TestMethod] public void Enum_EqualsTest_01() { - OutputHelper.WriteLine("Check Equals with Enums"); + // Check Equals with Enums Enum_TestClass_Equals.TestMethod(); } @@ -445,7 +445,7 @@ public enum e1 { one = 1, two = 2, three = 3 }; public static int Main_old() { e1 v_e1 = e1.two; - OutputHelper.WriteLine("v_e1 == "); + // v_e1 == OutputHelper.WriteLine(v_e1.ToString()); return 0; } @@ -466,13 +466,13 @@ public static int Main_old() e2 v_e2 = e2.two; e3 v_e3 = e3.two; e4 v_e4 = e4.two; - OutputHelper.WriteLine("v_e1 == "); + // v_e1 == OutputHelper.WriteLine(v_e1.ToString()); - OutputHelper.WriteLine("v_e2 == "); + // v_e2 == OutputHelper.WriteLine(v_e2.ToString()); - OutputHelper.WriteLine("v_e3 == "); + // v_e3 == OutputHelper.WriteLine(v_e3.ToString()); - OutputHelper.WriteLine("v_e4 == "); + // v_e4 == OutputHelper.WriteLine(v_e4.ToString()); return 0; } @@ -488,7 +488,7 @@ public enum e1 { one = 1, two = 2, three = 3 }; public static int Main_old() { int i = (int)e1.two; - OutputHelper.WriteLine("i == "); + // i == OutputHelper.WriteLine(i.ToString()); return i - 2; } @@ -505,7 +505,7 @@ public enum e1 : int { one = 1, two = 2, three = 3 }; public static int Main_old() { int i = (int)e1.two; - OutputHelper.WriteLine("i == "); + // i == OutputHelper.WriteLine(i.ToString()); return i - 2; } @@ -522,7 +522,7 @@ public enum e1 : short { one = 1, two = 2, three = 3 }; public static int Main_old() { int i = (short)e1.two; - OutputHelper.WriteLine("i == "); + // i == OutputHelper.WriteLine(i.ToString()); return i - 2; } @@ -539,7 +539,7 @@ public enum e1 : byte { one = 1, two = 2, three = 3 }; public static int Main_old() { int i = (byte)e1.two; - OutputHelper.WriteLine("i == "); + // i == OutputHelper.WriteLine(i.ToString()); return i - 2; } @@ -558,42 +558,42 @@ public static int Main_old() { if ((int)Enum_TestClass_enum27_Enum1.zero != 0) { - OutputHelper.WriteLine("Enumerator zero = "); + // Enumerator zero = OutputHelper.WriteLine((Enum_TestClass_enum27_Enum1.zero).ToString()); retval |= 0x01; } if ((int)Enum_TestClass_enum27_Enum1.one != 1) { - OutputHelper.WriteLine("Enumerator one = "); + // Enumerator one = OutputHelper.WriteLine((Enum_TestClass_enum27_Enum1.one).ToString()); retval |= 0x02; } if ((int)Enum_TestClass_enum27_Enum1.three != 3) { - OutputHelper.WriteLine("Enumerator three = "); + // Enumerator three = OutputHelper.WriteLine((Enum_TestClass_enum27_Enum1.three).ToString()); retval |= 0x04; } if ((int)Enum_TestClass_enum27_Enum1.four != 4) { - OutputHelper.WriteLine("Enumerator four = "); + // Enumerator four = OutputHelper.WriteLine((Enum_TestClass_enum27_Enum1.four).ToString()); retval |= 0x08; } if ((int)Enum_TestClass_enum27_Enum1.minus7 != -7) { - OutputHelper.WriteLine("Enumerator minus7 = "); + // Enumerator minus7 = OutputHelper.WriteLine((Enum_TestClass_enum27_Enum1.minus7).ToString()); retval |= 0x10; } if ((int)Enum_TestClass_enum27_Enum1.minus6 != -6) { - OutputHelper.WriteLine("Enumerator minus6 = "); + // Enumerator minus6 = OutputHelper.WriteLine((Enum_TestClass_enum27_Enum1.minus6).ToString()); retval |= 0x20; } @@ -616,47 +616,46 @@ public static int Main_old() { if (!((Enum_TestClass_enum28_Enum1)Enum_TestClass_enum28_Enum1.zero == (Enum_TestClass_enum28_Enum1)0)) { - OutputHelper.WriteLine("Enumerator zero = "); + // Enumerator zero = OutputHelper.WriteLine((Enum_TestClass_enum28_Enum1.zero).ToString()); retval |= 0x01; } if (Enum_TestClass_enum28_Enum1.one != (Enum_TestClass_enum28_Enum1)1) { - OutputHelper.WriteLine("Enumerator one = "); + // Enumerator one = OutputHelper.WriteLine((Enum_TestClass_enum28_Enum1.one).ToString()); retval |= 0x02; } if (Enum_TestClass_enum28_Enum1.three != (Enum_TestClass_enum28_Enum1)3) { - OutputHelper.WriteLine("Enumerator three = "); + // Enumerator three = OutputHelper.WriteLine((Enum_TestClass_enum28_Enum1.three).ToString()); retval |= 0x04; } if (Enum_TestClass_enum28_Enum1.four != (Enum_TestClass_enum28_Enum1)4) { - OutputHelper.WriteLine("Enumerator four = "); + // Enumerator four = OutputHelper.WriteLine((Enum_TestClass_enum28_Enum1.four).ToString()); retval |= 0x08; } if (Enum_TestClass_enum28_Enum1.minus7 != (Enum_TestClass_enum28_Enum1)(-7)) { - OutputHelper.WriteLine("Enumerator minus7 = "); + // Enumerator minus7 = OutputHelper.WriteLine((Enum_TestClass_enum28_Enum1.minus7).ToString()); retval |= 0x10; } if (Enum_TestClass_enum28_Enum1.minus6 != (Enum_TestClass_enum28_Enum1)(-6)) { - OutputHelper.WriteLine("Enumerator minus6 = "); + // Enumerator minus6 = OutputHelper.WriteLine((Enum_TestClass_enum28_Enum1.minus6).ToString()); retval |= 0x20; } - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -674,12 +673,10 @@ public static int Main_old() { if (Enum_TestClass_enum29_Enum1.one != Enum_TestClass_enum29_Enum1.zero) { - OutputHelper.WriteLine("Enumerator zero and one not synonymous"); + // Enumerator zero and one not synonymous retval = 1; } - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -697,12 +694,10 @@ public static int Main_old() { if ((int)Enum_TestClass_enum30_Enum1.three != 3) { - OutputHelper.WriteLine("Enumerator zero and one not synonymous"); + // Enumerator zero and one not synonymous retval = 1; } - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -718,7 +713,7 @@ public class Enum_TestClass_enum31 public enum Enum_TestClass_enum31_Enum1 { }; public static int Main_old() { - OutputHelper.WriteLine("PASS"); + // PASS return retval; } public static bool testMethod() @@ -735,7 +730,7 @@ public class Enum_TestClass_enum33 public enum Enum_TestClass_enum33_Enum1 { yes = 1, no = yes - 1 }; public static int Main_old() { - OutputHelper.WriteLine("PASS"); + // PASS return retval; } public static bool testMethod() @@ -753,7 +748,7 @@ public static int Main_old() { int i = (int)color.yellow; //ok: yellow converted to int value 1 //by integral promotion" - OutputHelper.WriteLine("PASS"); + // PASS return retval; } public static bool testMethod() @@ -782,12 +777,6 @@ public static int Main_old() if ((int)E.f == 3) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -820,12 +809,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum36_Enum.E.f == 3) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -860,12 +843,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum37_Enum.E.f == 3) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -899,12 +876,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum38_Enum1.f == 3) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -933,12 +904,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum39_Enum1.f == 255) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -967,12 +932,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum40_Enum1.f == 32767) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1001,12 +960,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum41_Enum1.f == 0x7FFFFFFF) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1035,12 +988,6 @@ public static int Main_old() if ((long)Enum_TestClass_enum42_Enum1.f == 0x7FFFFFFFFFFFFFFF) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1070,12 +1017,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum43_Enum2.f == 5) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1105,12 +1046,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum43u_Enum2.f == 5) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1140,12 +1075,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum44_Enum2.f == 5) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1175,12 +1104,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum45_Enum2.f == 5) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1210,12 +1133,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum46_Enum2.f == 5) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1244,12 +1161,6 @@ public static int Main_old() if ((uint)Enum_TestClass_enum46u_Enum1.f == 0xFFFFFFFF) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1279,12 +1190,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum47_Enum2.f == 5) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1314,12 +1219,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum47u_Enum2.f == 5) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1349,12 +1248,6 @@ public static int Main_old() if ((int)Enum_TestClass_enum48_Enum2.f == 5) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else - { - OutputHelper.WriteLine("FAIL\nretval == "); - OutputHelper.WriteLine((retval).ToString()); - } return retval; } public static bool testMethod() @@ -1384,8 +1277,6 @@ public static int Main_old() if ((ulong)Enum_TestClass_enum48u_Enum1.f == 0xFFFFFFFFFFFFFFFFL) retval -= 0x01; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL\nretval == " + retval.ToString()); return retval; } public static bool testMethod() @@ -1506,8 +1397,7 @@ public static int Main_old() e5ul--; if ((int)e5ul == (int)Enum_TestClass_enum54_Enum5ul.a - 1) retval -= 0x04000000; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, 0x{0:X} " + retval.ToString()); + return retval; } public static bool testMethod() @@ -1628,9 +1518,7 @@ public static int Main_old() --e5ul; if ((int)e5ul == (int)Enum_TestClass_enum55_Enum5ul.a - 2) retval -= 0x4000000; - OutputHelper.WriteLine((retval).ToString()); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -1753,9 +1641,6 @@ public static int Main_old() if ((int)e5ul == (int)Enum_TestClass_enum56_Enum5ul.a - 1) retval -= 0x4000000; - OutputHelper.WriteLine((retval).ToString()); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -1876,8 +1761,7 @@ public static int Main_old() e5ul--; e5ul--; e5ul--; e5ul--; if ((int)e5ul == (int)Enum_TestClass_enum57_Enum5ul.a - 1) retval -= 0x4000000; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, 0x{0:X} " + retval.ToString()); + return retval; } public static bool testMethod() @@ -1982,8 +1866,7 @@ public static int Main_old() e5ul &= ~Enum_TestClass_enum58_Enum5ul.b; if ((int)e5ul == 0) retval -= 0x100; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -2011,8 +1894,7 @@ public static int Main_old() int nInt = (int)tt[1]; OutputHelper.WriteLine(nInt.ToString()); int i = (int)tt[0] + (int)tt[1] + nInt - 300; - if (0 == i) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return i; } public static bool testMethod() @@ -2031,8 +1913,7 @@ public static int Main_old() OutputHelper.WriteLine("v_e1 == " + ((int)v_e1).ToString() + ", v == " + ((int)v).ToString()); if (v_e1 < v) retval = 0; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -2051,8 +1932,7 @@ public static int Main_old() OutputHelper.WriteLine("v_e1 == " + ((int)v_e1).ToString() + ", v == " + ((int)v).ToString()); if (v_e1 > v) retval = 0; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -2078,8 +1958,7 @@ public static int Main_old() retval -= 2; if (v_e1 == v) retval -= 4; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -2105,8 +1984,7 @@ public static int Main_old() OutputHelper.WriteLine("v_e1 == " + ((int)v_e1).ToString() + ", v == " + ((int)v).ToString()); if (v_e1 <= v) retval -= 4; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -2122,8 +2000,7 @@ public static int Main_old() int retval = 1; if (e1.two < e1.three) retval = 0; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -2139,8 +2016,7 @@ public static int Main_old() int retval = 1; if (e1.three > e1.two) retval = 0; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -2159,11 +2035,11 @@ public static int Main_old() || e1.two >= e1.three ) { - OutputHelper.WriteLine("FAIL"); + // FAIL return -1; } - OutputHelper.WriteLine("PASS"); + // PASS return 0; } public static bool testMethod() @@ -2182,11 +2058,11 @@ public static int Main_old() || e1.two <= e1.one ) { - OutputHelper.WriteLine("FAIL"); + // FAIL return -1; } - OutputHelper.WriteLine("PASS"); + // PASS return 0; } public static bool testMethod() @@ -2209,8 +2085,7 @@ public static int Main_old() if (s1.Equals("two") && s2.Equals("three")) retval = 0; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); + return retval; } public static bool testMethod() @@ -2244,8 +2119,6 @@ public static int Main_old() if ((e1.three & e1.two) == e1.two) retval -= 0x20; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -2279,8 +2152,6 @@ public static int Main_old() if ((e1.three | e1.two) == e1.three) retval -= 0x20; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -2314,8 +2185,6 @@ public static int Main_old() if ((e1.three ^ e1.two) == e1.one) retval -= 0x20; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -2339,8 +2208,6 @@ public static int Main_old() if ((~(e1.one | e1.two) & e1.three) == e1.zero) retval -= 4; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -2374,8 +2241,6 @@ public static int Main_old() if ((v + 2) == e1.three) retval -= 0x20; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -2399,11 +2264,11 @@ public static int Main_old(String[] s) } catch (System.Exception e) { - OutputHelper.WriteLine("Caught System.Exception: Failed"); + // Caught System.Exception: Failed OutputHelper.WriteLine(e.ToString()); return 1; } - OutputHelper.WriteLine("No System.Exception: Passed"); + // No System.Exception: Passed return 0; } public static bool testMethod() @@ -2486,8 +2351,6 @@ public static int Main_old() retval -= 0x40; if (d.CheckE5()) retval -= 0x80; - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, 0x{0:X} " + retval.ToString()); return retval; } public static bool testMethod() diff --git a/Tests/NFUnitTestException/UnitTestExceptionTests.cs b/Tests/NFUnitTestException/UnitTestExceptionTests.cs index 2d092c0e..103f94b0 100644 --- a/Tests/NFUnitTestException/UnitTestExceptionTests.cs +++ b/Tests/NFUnitTestException/UnitTestExceptionTests.cs @@ -25,116 +25,116 @@ public void TestTimeoutException() [TestMethod] public void Exc_excep01_Test() { - OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the matching catch"); + // This test will confirm that the the thrown exception is caught by the matching catch Assert.IsTrue(Exc_TestClass_excep01.testMethod()); } [TestMethod] public void Exc_excep02_Test() { - OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the matching catch, not the base class catch blocks"); + // This test will confirm that the the thrown exception is caught by the matching catch, not the base class catch blocks Assert.IsTrue(Exc_TestClass_excep02.testMethod()); } [TestMethod] public void Exc_excep04_Test() { - OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught and the error code can be set"); + // This test will confirm that the the thrown exception is caught and the error code can be set Assert.IsTrue(Exc_TestClass_excep04.testMethod()); } [TestMethod] public void Exc_excep05_Test() { - OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the matching catch, not the base class catch"); + // This test will confirm that the the thrown exception is caught by the matching catch, not the base class catch Assert.IsTrue(Exc_TestClass_excep05.testMethod()); } [TestMethod] public void Exc_excep06_Test() { - OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the base class catch"); + // This test will confirm that the the thrown exception is caught by the base class catch Assert.IsTrue(Exc_TestClass_excep06.testMethod()); } [TestMethod] public void Exc_excep07_Test() { - OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the base class catch()"); + // This test will confirm that the the thrown exception is caught by the base class catch() Assert.IsTrue(Exc_TestClass_excep07.testMethod()); } [TestMethod] public void Exc_excep09_Test() { - OutputHelper.WriteLine("This test will confirm that the catch() functions."); + // This test will confirm that the catch() functions. Assert.IsTrue(Exc_TestClass_excep09.testMethod()); } [TestMethod] public void Exc_excep10_Test() { - OutputHelper.WriteLine("This test will confirm that the thrown exception is handled in the catch()"); - OutputHelper.WriteLine("when no matching catch is available."); + // This test will confirm that the thrown exception is handled in the catch() + // when no matching catch is available. Assert.IsTrue(Exc_TestClass_excep10.testMethod()); } [TestMethod] public void Exc_excep11_Test() { - OutputHelper.WriteLine("This test will confirm that the the thrown exception is caught by the matching catch, not the catch()"); + // This test will confirm that the the thrown exception is caught by the matching catch, not the catch() Assert.IsTrue(Exc_TestClass_excep11.testMethod()); } [TestMethod] public void Exc_excep27_Test() { - OutputHelper.WriteLine("Throwing an exception transfers control to a handler."); + // Throwing an exception transfers control to a handler. Assert.IsTrue(Exc_TestClass_excep27.testMethod()); } [TestMethod] public void Exc_excep28_Test() { - OutputHelper.WriteLine("When an exception is thrown, control is transferred to a handler"); + // When an exception is thrown, control is transferred to a handler Assert.IsTrue(Exc_TestClass_excep28.testMethod()); } [TestMethod] public void Exc_excep30_Test() { - OutputHelper.WriteLine("A throw-expression with no operand rethrows the exception being handled."); + // A throw-expression with no operand rethrows the exception being handled. Assert.IsTrue(Exc_TestClass_excep30.testMethod()); } [TestMethod] public void Exc_excep31_Test() { - OutputHelper.WriteLine("A throw-expression with no operand does not copy the exception being handled."); + // A throw-expression with no operand does not copy the exception being handled. Assert.IsTrue(Exc_TestClass_excep31.testMethod()); } [TestMethod] public void Exc_excep33_Test() { - OutputHelper.WriteLine("The exception thrown by a rethrow is the one most recently caught and not finished."); + // The exception thrown by a rethrow is the one most recently caught and not finished. Assert.IsTrue(Exc_TestClass_excep33.testMethod()); } [TestMethod] public void Exc_excep34_Test() { - OutputHelper.WriteLine("When initialization is complete for the formal parameter of a catch clause, an exception is considered caught."); + // When initialization is complete for the formal parameter of a catch clause, an exception is considered caught. Assert.IsTrue(Exc_TestClass_excep34.testMethod()); } [TestMethod] public void Exc_excep35_Test() { - OutputHelper.WriteLine("A handler is not allowed to catch an expression thrown outside"); - OutputHelper.WriteLine("its function-try-block and any function called from its function-"); - OutputHelper.WriteLine("try-block."); + // A handler is not allowed to catch an expression thrown outside + // its function-try-block and any function called from its function- + // try-block. Assert.IsTrue(Exc_TestClass_excep35.testMethod()); } [TestMethod] public void Exc_excep40_Test() { - OutputHelper.WriteLine("If no match is found among the handlers for a try-block, the"); - OutputHelper.WriteLine("search for a matching handler continues in a dynamically"); - OutputHelper.WriteLine("surrounding try-block."); + // If no match is found among the handlers for a try-block, the + // search for a matching handler continues in a dynamically + // surrounding try-block. Assert.IsTrue(Exc_TestClass_excep40.testMethod()); } [TestMethod] public void Exc_excep41_Test() { - OutputHelper.WriteLine("If no match is found among the handlers for a try-block, the"); - OutputHelper.WriteLine("search for a matching handler continues in a dynamically"); - OutputHelper.WriteLine("surrounding try-block."); + // If no match is found among the handlers for a try-block, the + // search for a matching handler continues in a dynamically + // surrounding try-block. Assert.IsTrue(Exc_TestClass_excep41.testMethod()); } @@ -145,7 +145,7 @@ public void Exc_excep41_Test() [TestMethod] public void Exc_excep42_Test() { - OutputHelper.WriteLine("Handle throws up to 255 levels deep."); + // Handle throws up to 255 levels deep. Assert.IsTrue(Exc_TestClass_excep42.testMethod()) { return MFTestResults.Pass; @@ -156,7 +156,7 @@ public void Exc_excep42_Test() [TestMethod] public void Exc_excep42b_Test() { - OutputHelper.WriteLine("Handle throws up to 33 levels deep."); + // Handle throws up to 33 levels deep. Assert.IsTrue(Exc_TestClass_excep42b.testMethod()); } @@ -167,7 +167,7 @@ public void Exc_excep42b_Test() [TestMethod] public void Exc_excep43_Test() { - OutputHelper.WriteLine("Handle throws up to 255 levels deep, but don't catch. VM should not die."); + // Handle throws up to 255 levels deep, but don't catch. VM should not die. Assert.IsTrue(Exc_TestClass_excep43.testMethod()) { return MFTestResults.Pass; @@ -178,76 +178,76 @@ public void Exc_excep43_Test() [TestMethod] public void Exc_excep56_Test() { - OutputHelper.WriteLine("Should get unreachable code warning, but nothing more."); + // Should get unreachable code warning, but nothing more. Assert.IsTrue(Exc_TestClass_excep56.testMethod()); } [TestMethod] public void Exc_excep57_Test() { - OutputHelper.WriteLine("Should get unreachable code warning, but nothing more."); + // Should get unreachable code warning, but nothing more. Assert.IsTrue(Exc_TestClass_excep57.testMethod()); } [TestMethod] public void Exc_excep58_Test() { - OutputHelper.WriteLine("Any finally clauses associated with try statements will be executed before catch clause execution"); + // Any finally clauses associated with try statements will be executed before catch clause execution Assert.IsTrue(Exc_TestClass_excep58.testMethod()); } [TestMethod] public void Exc_excep59_Test() { - OutputHelper.WriteLine("Any finally clauses associated with try statements will be executed before catch clause execution"); + // Any finally clauses associated with try statements will be executed before catch clause execution Assert.IsTrue(Exc_TestClass_excep59.testMethod()); } [TestMethod] public void Exc_excep60_Test() { - OutputHelper.WriteLine("Inner exceptions can be chained"); + // Inner exceptions can be chained Assert.IsTrue(Exc_TestClass_excep60.testMethod()); } [TestMethod] public void Exc_excep61_Test() { - OutputHelper.WriteLine("Inner exceptions can be chained to arbitrary length"); + // Inner exceptions can be chained to arbitrary length Assert.IsTrue(Exc_TestClass_excep61.testMethod()); } [TestMethod] public void Exc_excep62_Test() { - OutputHelper.WriteLine("Any finally clauses associated with try statements will be executed before catch clause execution"); + // Any finally clauses associated with try statements will be executed before catch clause execution Assert.IsTrue(Exc_TestClass_excep62.testMethod()); } //[TestMethod] //public void Exc_excep63_Test() //{ - // OutputHelper.WriteLine("If a catch search reaches a static ctor then a Exception is thrown,"); - // OutputHelper.WriteLine("at the point of static ctor invocation. The inner exception is the original exception."); + // // If a catch search reaches a static ctor then a Exception is thrown, + // // at the point of static ctor invocation. The inner exception is the original exception. - // OutputHelper.WriteLine("an exception thrown in a static constructor brings up a dialog box in Visual Studio."); - // OutputHelper.WriteLine("Disable this test so that it doesn't hose VS until it is fixed."); + // // an exception thrown in a static constructor brings up a dialog box in Visual Studio. + // // Disable this test so that it doesn't hose VS until it is fixed. // // TODO: check this // Assert.IsTrue(Exc_TestClass_excep63.testMethod()); // { - // OutputHelper.WriteLine("This is bug number: 21724 Resolved By Design."); - // OutputHelper.WriteLine("This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. "); - // OutputHelper.WriteLine("When this bug is fixed change this back to pass and chang eht known failure to fail"); + // // This is bug number: 21724 Resolved By Design. + // // This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. + // // When this bug is fixed change this back to pass and chang eht known failure to fail // } //} //[TestMethod] //public void Exc_excep64_Test() //{ - // OutputHelper.WriteLine("If a catch search reaches a static field initializer then a Exception is thrown,"); - // OutputHelper.WriteLine("at the point of static ctor invocation. The inner exception is the original exception."); + // // If a catch search reaches a static field initializer then a Exception is thrown, + // // at the point of static ctor invocation. The inner exception is the original exception. - // OutputHelper.WriteLine("an exception thrown in a static constructor brings up a dialog box in Visual Studio."); - // OutputHelper.WriteLine("Disable this test so that it doesn't hose VS until it is fixed."); + // // an exception thrown in a static constructor brings up a dialog box in Visual Studio. + // // Disable this test so that it doesn't hose VS until it is fixed. // // TODO: check this // Assert.IsTrue(Exc_TestClass_excep64.testMethod()); // { - // OutputHelper.WriteLine("This is bug number: 21724 Resolved By Design."); - // OutputHelper.WriteLine("This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. "); + // // This is bug number: 21724 Resolved By Design. + // // This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. // } //} @@ -260,8 +260,8 @@ public void Exc_excep62_Test() [TestMethod] public void Exc_excep65_Test() { - OutputHelper.WriteLine("If a catch search reaches a static ctor then a Exception is thrown,"); - OutputHelper.WriteLine("at the point of static ctor invocation. The inner exception is the original exception."); + // If a catch search reaches a static ctor then a Exception is thrown, + // at the point of static ctor invocation. The inner exception is the original exception. Assert.IsTrue(Exc_TestClass_excep65.testMethod()) { @@ -279,12 +279,12 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exception("An exception has occurred"); } catch (Exception s) { - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); retval = 0; } @@ -308,18 +308,18 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exc_TestClass_excep02_E1("An exception has occurred"); } catch (Exc_TestClass_excep02_E1 s) { - OutputHelper.WriteLine("In Exc_TestClass_excep02_E1 catch block."); + // In Exc_TestClass_excep02_E1 catch block. OutputHelper.WriteLine(s.Message); retval = 0; } catch (Exception) { - OutputHelper.WriteLine("FAIL - In Exception catch block."); + // FAIL - In Exception catch block. retval = 2; } //catch (Exception e) @@ -343,24 +343,22 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exception("An exception has occurred"); } catch (Exception s) { - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); retval -= 1; } } finally { - OutputHelper.WriteLine("Entering finally block"); + // Entering finally block retval -= 2; } - OutputHelper.WriteLine("Ready to return."); - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval=={0} " + retval.ToString()); + // Ready to return. return retval; } public static bool testMethod() @@ -383,24 +381,24 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exc_TestClass_excep05_E1("An exception has occurred"); } catch (Exc_TestClass_excep05_E1 s) { - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); retval--; } catch (Exception) { - OutputHelper.WriteLine("FAIL -- Should not enter catch (Exception) block"); + // FAIL -- Should not enter catch (Exception) block retval++; } } finally { - OutputHelper.WriteLine("In finally block"); + // In finally block --retval; } return retval; @@ -423,12 +421,12 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exc_TestClass_excep06_E1("An exception has occurred"); } catch (Exception s) { - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); retval = 0; } @@ -454,18 +452,18 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. } catch (Exception s) { - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); retval++; } } finally { - OutputHelper.WriteLine("In finally block"); + // In finally block retval--; } return retval; @@ -482,12 +480,12 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exception("An exception has occurred"); } catch { - OutputHelper.WriteLine("In catch block."); + // In catch block. retval = 0; } return retval; @@ -510,17 +508,17 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exception("An exception has occurred"); } catch (Exc_TestClass_excep10_E1) { - OutputHelper.WriteLine("FAIL -- Should not enter catch (Exception a) block."); + // FAIL -- Should not enter catch (Exception a) block. retval = 1; } catch { - OutputHelper.WriteLine("In catch block."); + // In catch block. retval -= 1; } return retval; @@ -537,18 +535,18 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exception("An exception has occurred"); } catch (Exception r) { - OutputHelper.WriteLine("In catch (Exception r) block."); + // In catch (Exception r) block. OutputHelper.WriteLine(r.Message); retval -= 1; } catch { - OutputHelper.WriteLine("FAIL -- Should not enter catch () block."); + // FAIL -- Should not enter catch () block. retval += 1; } return retval; @@ -622,9 +620,9 @@ public static int Main_old() tossval = b.toss(0); if (tossval != 0) { - OutputHelper.WriteLine("toss(0) returned "); + // toss(0) returned OutputHelper.WriteLine(tossval.ToString()); - OutputHelper.WriteLine(" instead of 0."); + // instead of 0. } else { @@ -633,9 +631,9 @@ public static int Main_old() tossval = b.toss(1); if (tossval != 1) { - OutputHelper.WriteLine("toss(1) returned "); + // toss(1) returned OutputHelper.WriteLine(tossval.ToString()); - OutputHelper.WriteLine(" instead of 1."); + // instead of 1. } else { @@ -644,16 +642,14 @@ public static int Main_old() tossval = b.toss(2); if (tossval != 2) { - OutputHelper.WriteLine("toss(2) returned "); + // toss(2) returned OutputHelper.WriteLine(tossval.ToString()); - OutputHelper.WriteLine(" instead of 2."); + // instead of 2. } else { retval -= 1; } - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -702,8 +698,6 @@ public static int Main_old() Exc_TestClass_excep30_C1 t = new Exc_TestClass_excep30_C1(); if (t.f00() == 30) // If the throw was handled properly... retval = 0; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -758,8 +752,6 @@ public static int Main_old() Exc_TestClass_excep31_C1 t = new Exc_TestClass_excep31_C1(); if (t.f00() == 0) // If the throw was handled properly... retval = 0; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -811,23 +803,21 @@ public static int Main_old() } catch (Exc_TestClass_excep33_E2) { - OutputHelper.WriteLine("Unexpected Exc_TestClass_excep33_E2 catch."); + // Unexpected Exc_TestClass_excep33_E2 catch. } catch (Exc_TestClass_excep33_E3) { - OutputHelper.WriteLine("Unexpected Exc_TestClass_excep33_E3 catch."); + // Unexpected Exc_TestClass_excep33_E3 catch. } catch (Exc_TestClass_excep33_E4) { - OutputHelper.WriteLine("Caught in Exc_TestClass_excep33_E4, as expected."); + // Caught in Exc_TestClass_excep33_E4, as expected. retval = 0; } catch { - OutputHelper.WriteLine("Unexpected ... catch."); + // Unexpected ... catch. } - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -871,19 +861,17 @@ public static int Main_old() } catch (Exc_TestClass_excep34_E2) { - OutputHelper.WriteLine("Unexpected Exc_TestClass_excep34_E2 catch.\n"); + // Unexpected Exc_TestClass_excep34_E2 catch.\n } catch (Exc_TestClass_excep34_E3) { - OutputHelper.WriteLine("Caught in Exc_TestClass_excep34_E3 as expected.\n"); + // Caught in Exc_TestClass_excep34_E3 as expected.\n retval = 0; } catch { - OutputHelper.WriteLine("Unexpected ... catch.\n"); + // Unexpected ... catch.\n } - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -922,8 +910,6 @@ public static int Main_old() { } retval = Exc_TestClass_excep35_V.counter; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -1002,8 +988,6 @@ public static int Main_old() f.f03(); if (Exc_TestClass_excep40_F.xpath == 1) retval -= 2; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -1028,13 +1012,13 @@ public void f01() { try { - OutputHelper.WriteLine("In f01(), throwing an Exc_TestClass_excep41_E3..."); + // In f01(), throwing an Exc_TestClass_excep41_E3... throw new Exc_TestClass_excep41_E3(); - OutputHelper.WriteLine("After throw in f01(). SHOULD NOT BE HERE!"); + // After throw in f01(). SHOULD NOT BE HERE! } catch (Exc_TestClass_excep41_E1) { - OutputHelper.WriteLine("In catch in f01()"); + // In catch in f01() xpath += 4; } } @@ -1042,13 +1026,13 @@ public void f00() { try { - OutputHelper.WriteLine("Calling f01()..."); + // Calling f01()... f01(); - OutputHelper.WriteLine("Returned from f01()"); + // Returned from f01() } catch (Exc_TestClass_excep41_E4) { - OutputHelper.WriteLine("In catch in f00()"); + // In catch in f00() xpath += 2; } } @@ -1061,19 +1045,17 @@ public static int Main_old() Exc_TestClass_excep41_F f = new Exc_TestClass_excep41_F(); try { - OutputHelper.WriteLine("Calling f00()..."); + // Calling f00()... f.f00(); - OutputHelper.WriteLine("Returned from f00()..."); + // Returned from f00()... } catch (Exc_TestClass_excep41_E3) { - OutputHelper.WriteLine("In catch in f00()"); + // In catch in f00() Exc_TestClass_excep41_F.xpath += 1; } if (Exc_TestClass_excep41_F.xpath == 1) retval--; - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, xpath=={0} " + (Exc_TestClass_excep41_F.xpath).ToString()); return retval; } public static bool testMethod() @@ -1102,7 +1084,7 @@ public void f255(int i) OutputHelper.WriteLine("i==" + i.ToString()); if (i == 255) { - OutputHelper.WriteLine("Throwing Exc_TestClass_excep42_E1"); + // Throwing Exc_TestClass_excep42_E1 tb = 0; throw s; } @@ -1376,17 +1358,14 @@ public static int Main_old() } catch (Exc_TestClass_excep42_E1) { - OutputHelper.WriteLine("Caught Exc_TestClass_excep42_E1"); + // Caught Exc_TestClass_excep42_E1 retval = Exc_TestClass_excep42_F.tb; } catch { - OutputHelper.WriteLine("Did not catch Exc_TestClass_excep42_E1"); + // Did not catch Exc_TestClass_excep42_E1 retval = -1; } - OutputHelper.WriteLine(retval.ToString()); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -1415,7 +1394,7 @@ public void f033(int i) OutputHelper.WriteLine("i==" + i.ToString()); if (i == 33) { - OutputHelper.WriteLine("Throwing Exc_TestClass_excep42b_E1"); + // Throwing Exc_TestClass_excep42b_E1 tb = 0; throw s; } @@ -1467,17 +1446,14 @@ public static int Main_old() } catch (Exc_TestClass_excep42b_E1) { - OutputHelper.WriteLine("Caught Exc_TestClass_excep42b_E1"); + // Caught Exc_TestClass_excep42b_E1 retval = Exc_TestClass_excep42b_F.tb; } catch { - OutputHelper.WriteLine("Did not catch Exc_TestClass_excep42b_E1"); + // Did not catch Exc_TestClass_excep42b_E1 retval = -1; } - OutputHelper.WriteLine(retval.ToString()); - if (retval == 0) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL"); return retval; } public static bool testMethod() @@ -1781,7 +1757,7 @@ public static int Main_old() retval = 0; } - if (retval == 0) OutputHelper.WriteLine("PASS"); + if (retval == 0) // PASS else OutputHelper.WriteLine("FAIL, retval=={0 }" + retval.ToString()); return retval; } @@ -1799,19 +1775,17 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block."); + // In try block. } finally { goto lab1; //This should cause an error - OutputHelper.WriteLine("Entering finally block"); + // Entering finally block retval -= 1; lab1: retval -= 2; } - OutputHelper.WriteLine("Ready to return."); - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval=={0} " + retval.ToString()); + // Ready to return. return retval; } public static bool testMethod() @@ -1826,12 +1800,12 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block."); + // In try block. } finally { goto lab4; //This should cause an error - OutputHelper.WriteLine("Entering finally block"); + // Entering finally block retval -= 1; lab1: retval -= 2; @@ -1842,9 +1816,7 @@ public static int Main_old() lab4: retval -= 5; } - OutputHelper.WriteLine("Ready to return."); - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval=={0}" + retval.ToString()); + // Ready to return. return retval; } public static bool testMethod() @@ -1867,7 +1839,7 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exc_TestClass_excep58_E1("An exception has occurred"); } //catch (Exception s){ @@ -1876,7 +1848,7 @@ public static int Main_old() //} finally { - OutputHelper.WriteLine("In inner finally block"); + // In inner finally block retval ^= 0x01; } } @@ -1884,22 +1856,20 @@ public static int Main_old() { if (0 == (retval & 0x01)) retval ^= 0x02; - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); } catch (Exception) { - OutputHelper.WriteLine("FAIL -- Should not enter catch (Exception) block"); + // FAIL -- Should not enter catch (Exception) block retval++; } finally { - OutputHelper.WriteLine("In outer finally block"); + // In outer finally block if (0 == (retval & 0x03)) retval ^= 0x04; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval == " + retval.ToString()); return retval; } public static bool testMethod() @@ -1924,7 +1894,7 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exc_TestClass_excep59_E1("An exception has occurred"); } //catch (Exception s) @@ -1934,7 +1904,7 @@ public static int Main_old() //} finally { - OutputHelper.WriteLine("In innermost finally block"); + // In innermost finally block retval ^= 0x01; } } @@ -1944,7 +1914,7 @@ public static int Main_old() //} finally { - OutputHelper.WriteLine("In middle finally block"); + // In middle finally block if (0 == (retval & 0x01)) retval ^= 0x02; } @@ -1953,22 +1923,20 @@ public static int Main_old() { if (0 == (retval & 0x03)) retval ^= 0x04; - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); } catch (Exception) { - OutputHelper.WriteLine("FAIL -- Should not enter catch (Exception) block"); + // FAIL -- Should not enter catch (Exception) block retval++; } finally { - OutputHelper.WriteLine("In outer finally block"); + // In outer finally block if (0 == (retval & 0x07)) retval ^= 0x08; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval == " + retval.ToString()); return retval; } public static bool testMethod() @@ -1993,7 +1961,7 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exc_TestClass_excep60_E1("An exception has occurred"); } //catch (Exception s) @@ -2003,13 +1971,13 @@ public static int Main_old() //} finally { - OutputHelper.WriteLine("In innermost finally block"); + // In innermost finally block retval ^= 0x01; } } catch (Exc_TestClass_excep60_E1 s) { - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); if (0 == (retval & 0x01)) retval ^= 0x02; @@ -2017,7 +1985,7 @@ public static int Main_old() } finally { - OutputHelper.WriteLine("In middle finally block"); + // In middle finally block if (0 == (retval & 0x03)) retval ^= 0x04; } @@ -2026,7 +1994,7 @@ public static int Main_old() { if (0 == (retval & 0x07)) retval ^= 0x08; - OutputHelper.WriteLine("In outer catch block."); + // In outer catch block. if (typeof(Exc_TestClass_excep60_E1) == s.InnerException.GetType()) retval ^= 0x10; } @@ -2036,12 +2004,10 @@ public static int Main_old() //} finally { - OutputHelper.WriteLine("In outer finally block"); + // In outer finally block if (0 == (retval & 0x1F)) retval ^= 0x20; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval == 0x" + retval.ToString()); return retval; } public static bool testMethod() @@ -2066,24 +2032,24 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exc_TestClass_excep61_E1("An exception has occurred"); } catch (Exc_TestClass_excep61_E1 s) { - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); throw new Exception("Setting InnerException #1", s); } finally { - OutputHelper.WriteLine("In innermost finally block"); + // In innermost finally block retval ^= 0x01; } } catch (Exception s) { - OutputHelper.WriteLine("In catch block."); + // In catch block. OutputHelper.WriteLine(s.Message); if (0 == (retval & 0x01)) retval ^= 0x02; @@ -2091,7 +2057,7 @@ public static int Main_old() } finally { - OutputHelper.WriteLine("In middle finally block"); + // In middle finally block if (0 == (retval & 0x03)) retval ^= 0x04; } @@ -2100,7 +2066,7 @@ public static int Main_old() { if (0 == (retval & 0x07)) retval ^= 0x08; - OutputHelper.WriteLine("In outer catch block."); + // In outer catch block. if (typeof(Exception) == s.InnerException.GetType()) retval ^= 0x10; if (typeof(Exc_TestClass_excep61_E1) == s.InnerException.InnerException.GetType()) @@ -2112,12 +2078,10 @@ public static int Main_old() //} finally { - OutputHelper.WriteLine("In outer finally block"); + // In outer finally block if (0 == (retval & 0x1F)) retval ^= 0x40; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval == 0x" + retval.ToString()); return retval; } public static bool testMethod() @@ -2138,7 +2102,7 @@ public static int Main_old() { try { - OutputHelper.WriteLine("In try block, ready to throw."); + // In try block, ready to throw. throw new Exception("An exception has occurred"); } catch (Exception s) @@ -2152,12 +2116,10 @@ public static int Main_old() //} finally { - OutputHelper.WriteLine("In outer finally block"); + // In outer finally block if (0 == (retval & 0x01)) retval ^= 0x02; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval == 0x" + retval.ToString()); return retval; } public static bool testMethod() @@ -2179,9 +2141,9 @@ static Exc_TestClass_excep63_SC() } public static void InitHelper() { - OutputHelper.WriteLine("This is bug number: 21724 Resolved By Design."); - OutputHelper.WriteLine("This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. "); - OutputHelper.WriteLine("When this bug is fixed change remove the comment below."); + // This is bug number: 21724 Resolved By Design. + // This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. + // When this bug is fixed change remove the comment below. throw new Exception("Exception in InitHelper"); } @@ -2200,8 +2162,6 @@ public static int Main_old() if (t.InnerException.GetType() == typeof(Exception)) retval ^= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval == 0x" + retval.ToString()); return retval; } public static bool testMethod() @@ -2220,9 +2180,9 @@ public class Exc_TestClass_excep64_SC public static int StaticInt = InitHelper(); public static int InitHelper() { - OutputHelper.WriteLine("This is bug number: 21724 Resolved By Design."); - OutputHelper.WriteLine("This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. "); - OutputHelper.WriteLine("When this bug is fixed change this back to pass and chang eht known failure to fail"); + // This is bug number: 21724 Resolved By Design. + // This is bug number: 21724 If a catch search reaches a static ctor then a Exception is thrown at the point of static ctor invocation. The inner exception is the original exception. + // When this bug is fixed change this back to pass and chang eht known failure to fail throw new Exception("Exception in InitHelper"); return 0; @@ -2242,8 +2202,6 @@ public static int Main_old() if (t.InnerException.GetType() == typeof(Exception)) retval ^= 0x01; } - if (0 == retval) OutputHelper.WriteLine("PASS"); - else OutputHelper.WriteLine("FAIL, retval == 0x" + retval.ToString()); return retval; } public static bool testMethod() @@ -2265,7 +2223,7 @@ public class Exc_TestClass_excep65_C1 { retval ^= 0x01; OutputHelper.WriteLine("retval == " + retval.ToString()); - OutputHelper.WriteLine("In// Exc_TestClass_excep65_C1()"); + // In// Exc_TestClass_excep65_C1() } } public class Exc_TestClass_excep65_C2 : Exc_TestClass_excep65_C1 @@ -2275,9 +2233,9 @@ public class Derived : Exc_TestClass_excep65_C2 { ~Derived() { - OutputHelper.WriteLine("In ~Derived()"); + // In ~Derived() DtorHelper(); - OutputHelper.WriteLine("FAIL, did not exit dtor when exception thrown"); + // FAIL, did not exit dtor when exception thrown Exc_TestClass_excep65_C1.retval |= 0x02; } public static void DtorHelper() diff --git a/Tests/NFUnitTestGC/TestGC.cs b/Tests/NFUnitTestGC/TestGC.cs index 0ea02bba..3bf6bfcb 100644 --- a/Tests/NFUnitTestGC/TestGC.cs +++ b/Tests/NFUnitTestGC/TestGC.cs @@ -19,7 +19,7 @@ public void TestGCStress() int maxArraySize = 1024 * 32; object[] arrays = new object[600]; - OutputHelper.WriteLine("Starting TestGCStress"); + // Starting TestGCStress for (int loop = 0; loop < 100; loop++) { @@ -42,7 +42,7 @@ public void TestGCStress() } } - OutputHelper.WriteLine("Completed TestGCStress"); + // Completed TestGCStress } } } diff --git a/Tests/NFUnitTestGC/TestGCWithByteArrays.cs b/Tests/NFUnitTestGC/TestGCWithByteArrays.cs index 579d7ca8..045f1767 100644 --- a/Tests/NFUnitTestGC/TestGCWithByteArrays.cs +++ b/Tests/NFUnitTestGC/TestGCWithByteArrays.cs @@ -15,7 +15,7 @@ public class TestGCWithByteArrays [TestMethod] public void TestCompactionForNotFixedArray() { - OutputHelper.WriteLine("Starting TestCompactionForNotFixedArray"); + // Starting TestCompactionForNotFixedArray for (int loop = 0; loop < 10; loop++) { @@ -52,10 +52,10 @@ public void TestCompactionForNotFixedArray() index++; } - OutputHelper.WriteLine("No corruption detected in array"); + // No corruption detected in array } - OutputHelper.WriteLine("Completed TestCompactionForNotFixedArray"); + // Completed TestCompactionForNotFixedArray } void RunAllocations(byte[] arrObj) diff --git a/Tests/NFUnitTestGC/TestGCWithDateTimeArrays.cs b/Tests/NFUnitTestGC/TestGCWithDateTimeArrays.cs index e78cd0c5..102064ba 100644 --- a/Tests/NFUnitTestGC/TestGCWithDateTimeArrays.cs +++ b/Tests/NFUnitTestGC/TestGCWithDateTimeArrays.cs @@ -15,7 +15,7 @@ public class TestGCWithDateTimeArrays [TestMethod] public void TestCompactionForNotFixedDateTimeArray() { - OutputHelper.WriteLine("Starting TestCompactionForNotFixedDateTimeArray"); + // Starting TestCompactionForNotFixedDateTimeArray for (int loop = 0; loop < 10; loop++) { @@ -33,14 +33,14 @@ public void TestCompactionForNotFixedDateTimeArray() testNativeBuffer[i] = new HolderForDateTime(GetRandomDateTime()); } - OutputHelper.WriteLine("Large HolderForDateTime array created"); - OutputHelper.WriteLine("Forcing compaction to occurr"); + // Large HolderForDateTime array created + // Forcing compaction to occurr // Causes compaction InitiateDateTimeCompaction(); - OutputHelper.WriteLine("Compaction occurred"); - OutputHelper.WriteLine("Checking arrays for corrupted data..."); + // Compaction occurred + // Checking arrays for corrupted data... int index = 0; @@ -51,10 +51,10 @@ public void TestCompactionForNotFixedDateTimeArray() index++; } - OutputHelper.WriteLine("No corruption detected in array"); + // No corruption detected in array } - OutputHelper.WriteLine("Completed TestCompactionForNotFixedArray"); + // Completed TestCompactionForNotFixedArray } // This function cause compaction to occur. diff --git a/Tests/NFUnitTestGC/TestGCWithObjectArrays.cs b/Tests/NFUnitTestGC/TestGCWithObjectArrays.cs index df0b9a3d..e11be754 100644 --- a/Tests/NFUnitTestGC/TestGCWithObjectArrays.cs +++ b/Tests/NFUnitTestGC/TestGCWithObjectArrays.cs @@ -15,7 +15,7 @@ public class TestGCWithObjectArrays [TestMethod] public void TestCompactionForNotFixedArray() { - OutputHelper.WriteLine("Starting TestCompactionForNotFixedArray"); + // Starting TestCompactionForNotFixedArray for (int loop = 0; loop < 10; loop++) { @@ -52,10 +52,10 @@ public void TestCompactionForNotFixedArray() index++; } - OutputHelper.WriteLine("No corruption detected in array"); + // No corruption detected in array } - OutputHelper.WriteLine("Completed TestCompactionForNotFixedArray"); + // Completed TestCompactionForNotFixedArray } void RunAllocations(object[] arrObj) diff --git a/Tests/NFUnitTestGC/TestGCWithStringArrays.cs b/Tests/NFUnitTestGC/TestGCWithStringArrays.cs index b4372b3c..f69c30e1 100644 --- a/Tests/NFUnitTestGC/TestGCWithStringArrays.cs +++ b/Tests/NFUnitTestGC/TestGCWithStringArrays.cs @@ -15,7 +15,7 @@ public class TestGCWithStringArrays [TestMethod] public void TestCompactionForNotFixedStringArray() { - OutputHelper.WriteLine("Starting TestCompactionForNotFixedStringArray"); + // Starting TestCompactionForNotFixedStringArray for (int loop = 0; loop < 10; loop++) { @@ -35,14 +35,14 @@ public void TestCompactionForNotFixedStringArray() testNativeBuffer[i] = new HolderForString(Guid.NewGuid().ToString()); } - OutputHelper.WriteLine("Large HolderForString array created"); - OutputHelper.WriteLine("Forcing compaction to occurr"); + // Large HolderForString array created + // Forcing compaction to occurr // Causes compaction InitiateStringCompaction(); - OutputHelper.WriteLine("Compaction occurred"); - OutputHelper.WriteLine("Checking arrays for corrupted data..."); + // Compaction occurred + // Checking arrays for corrupted data... int index = 0; @@ -57,10 +57,10 @@ public void TestCompactionForNotFixedStringArray() index++; } - OutputHelper.WriteLine("No corruption detected in array"); + // No corruption detected in array } - OutputHelper.WriteLine("Completed TestCompactionForNotFixedArray"); + // Completed TestCompactionForNotFixedArray } // This function cause compaction to occur. diff --git a/Tests/NFUnitTestGC/TestGCWithTimeSpanArrays.cs b/Tests/NFUnitTestGC/TestGCWithTimeSpanArrays.cs index 1294deda..5d272ec3 100644 --- a/Tests/NFUnitTestGC/TestGCWithTimeSpanArrays.cs +++ b/Tests/NFUnitTestGC/TestGCWithTimeSpanArrays.cs @@ -15,7 +15,7 @@ public class TestGCWithTimeSpanArrays [TestMethod] public void TestCompactionForNotFixedTimeSpanArray() { - OutputHelper.WriteLine("Starting TestCompactionForNotFixedTimeSpanArray"); + // Starting TestCompactionForNotFixedTimeSpanArray for (int loop = 0; loop < 10; loop++) { @@ -34,14 +34,14 @@ public void TestCompactionForNotFixedTimeSpanArray() testNativeBuffer[i] = new HolderForTimeSpan(GetRandomTimeSpan()); } - OutputHelper.WriteLine("Large HolderForTimeSpan array created"); - OutputHelper.WriteLine("Forcing compaction to occurr"); + // Large HolderForTimeSpan array created + // Forcing compaction to occurr // Causes compaction InitiateTimeSpanCompaction(); - OutputHelper.WriteLine("Compaction occurred"); - OutputHelper.WriteLine("Checking arrays for corrupted data..."); + // Compaction occurred + // Checking arrays for corrupted data... int index = 0; @@ -52,10 +52,10 @@ public void TestCompactionForNotFixedTimeSpanArray() index++; } - OutputHelper.WriteLine("No corruption detected in array"); + // No corruption detected in array } - OutputHelper.WriteLine("Completed TestCompactionForNotFixedArray"); + // Completed TestCompactionForNotFixedArray } private TimeSpan GetRandomTimeSpan() diff --git a/Tests/NFUnitTestInterface/UnitTestInterfaceTests.cs b/Tests/NFUnitTestInterface/UnitTestInterfaceTests.cs index 4ffb3268..d52cb308 100644 --- a/Tests/NFUnitTestInterface/UnitTestInterfaceTests.cs +++ b/Tests/NFUnitTestInterface/UnitTestInterfaceTests.cs @@ -17,344 +17,344 @@ public class UnitTestInterfaceTests [TestMethod] public void Interface_base_06_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("If effective visibility is internal, public iface may have an internal base iface "); - OutputHelper.WriteLine("(Bug 86453: has some details on this. But it has to do with class internal)"); + // Section 13.1 Interface declarations + // If effective visibility is internal, public iface may have an internal base iface + // (Bug 86453: has some details on this. But it has to do with class internal) Assert.IsTrue(Interface_TestClass_base_06.testMethod()); } [TestMethod] public void Interface_decl_01_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest interface declared in global namespace"); + // Section 13.1 Interface declarations + // Simplest interface declared in global namespace Assert.IsTrue(Interface_TestClass_decl_01.testMethod()); } [TestMethod] public void Interface_decl_03_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest interface declared in class in default global namespace"); + // Section 13.1 Interface declarations + // Simplest interface declared in class in default global namespace Assert.IsTrue(Interface_TestClass_decl_03.testMethod()); } [TestMethod] public void Interface_decl_05_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simple interface declaration with diff types of methods, args, and properties"); + // Section 13.1 Interface declarations + // Simple interface declaration with diff types of methods, args, and properties Assert.IsTrue(Interface_TestClass_decl_05.testMethod()); } [TestMethod] public void Interface_decl_06_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simple interface declaration properties with only gets"); + // Section 13.1 Interface declarations + // Simple interface declaration properties with only gets Assert.IsTrue(Interface_TestClass_decl_06.testMethod()); } [TestMethod] public void Interface_decl_07_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simple interface declaration properties with only sets"); + // Section 13.1 Interface declarations + // Simple interface declaration properties with only sets Assert.IsTrue(Interface_TestClass_decl_07.testMethod()); } [TestMethod] public void Interface_inherit_01_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify that an interface can be hidden by 'new' member in derived class"); + // Section 13.1 Interface declarations + // Verify that an interface can be hidden by 'new' member in derived class Assert.IsTrue(Interface_TestClass_inherit_01.testMethod()); } [TestMethod] public void Interface_inherit_02_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest form of interface inheritance"); + // Section 13.1 Interface declarations + // Simplest form of interface inheritance Assert.IsTrue(Interface_TestClass_inherit_02.testMethod()); } [TestMethod] public void Interface_inherit_03_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest form of interface inheritance, inheriting multiple interfaces"); + // Section 13.1 Interface declarations + // Simplest form of interface inheritance, inheriting multiple interfaces Assert.IsTrue(Interface_TestClass_inherit_03.testMethod()); } [TestMethod] public void Interface_inherit_04_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest form of interface inheritance, inheriting multiple interfaces"); + // Section 13.1 Interface declarations + // Simplest form of interface inheritance, inheriting multiple interfaces Assert.IsTrue(Interface_TestClass_inherit_04.testMethod()); } [TestMethod] public void Interface_inherit_08_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify that an interface hidden without using new results in warning"); + // Section 13.1 Interface declarations + // Verify that an interface hidden without using new results in warning Assert.IsTrue(Interface_TestClass_inherit_08.testMethod()); } [TestMethod] public void Interface_modifier_01_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify public and internal interfaces declared in global namespace are valid"); + // Section 13.1 Interface declarations + // Verify public and internal interfaces declared in global namespace are valid Assert.IsTrue(Interface_TestClass_modifier_01.testMethod()); } [TestMethod] public void Interface_modifier_05_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify public and internal interfaces are valid inside classes"); + // Section 13.1 Interface declarations + // Verify public and internal interfaces are valid inside classes Assert.IsTrue(Interface_TestClass_modifier_05.testMethod()); } [TestMethod] public void Interface_modifier_06_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify private and protected interfaces are valid inside classes"); + // Section 13.1 Interface declarations + // Verify private and protected interfaces are valid inside classes Assert.IsTrue(Interface_TestClass_modifier_06.testMethod()); } [TestMethod] public void Interface_modifier_07_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify new interface gens warning if not hiding anything"); + // Section 13.1 Interface declarations + // Verify new interface gens warning if not hiding anything Assert.IsTrue(Interface_TestClass_modifier_07.testMethod()); } [TestMethod] public void Interface_modifier_08_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify new interface is valid inside classes when properly hiding an inherited member"); + // Section 13.1 Interface declarations + // Verify new interface is valid inside classes when properly hiding an inherited member Assert.IsTrue(Interface_TestClass_modifier_08.testMethod()); } [TestMethod] public void Interface_modifier_10_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify protected internal interfaces are valid inside classes"); + // Section 13.1 Interface declarations + // Verify protected internal interfaces are valid inside classes Assert.IsTrue(Interface_TestClass_modifier_10.testMethod()); } [TestMethod] public void Interface_semicolon_01_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest interface declared (with semi-colon) in global namespace"); + // Section 13.1 Interface declarations + // Simplest interface declared (with semi-colon) in global namespace Assert.IsTrue(Interface_TestClass_semicolon_01.testMethod()); } [TestMethod] public void Interface_semicolon_03_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest interface declared (with semi-colon) in class in default global namespace"); + // Section 13.1 Interface declarations + // Simplest interface declared (with semi-colon) in class in default global namespace Assert.IsTrue(Interface_TestClass_semicolon_03.testMethod()); } [TestMethod] public void Interface_impl_04_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("A member of an interface-type can be assigned an instance of class that implements it"); + // Section 13.4 Interface implementations + // A member of an interface-type can be assigned an instance of class that implements it Assert.IsTrue(Interface_TestClass_impl_04.testMethod()); } [TestMethod] public void Interface_impl_05_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Warning gets generated when two methods implement an inherited method"); + // Section 13.4 Interface implementations + // Warning gets generated when two methods implement an inherited method Assert.IsTrue(Interface_TestClass_impl_05.testMethod()); } [TestMethod] public void Interface_impl_06_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Using the 'override' keyword allows you to hide previous method implementation"); + // Section 13.4 Interface implementations + // Using the 'override' keyword allows you to hide previous method implementation Assert.IsTrue(Interface_TestClass_impl_06.testMethod()); } [TestMethod] public void Interface_impl_07_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("A class that implements an interface with method, property, event, and indexer"); + // Section 13.4 Interface implementations + // A class that implements an interface with method, property, event, and indexer Assert.IsTrue(Interface_TestClass_impl_07.testMethod()); } [TestMethod] public void Interface_impl_08_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing method that was defined identically by two different base-interfaces should work"); + // Section 13.4 Interface implementations + // Implementing method that was defined identically by two different base-interfaces should work Assert.IsTrue(Interface_TestClass_impl_08.testMethod()); } [TestMethod] public void Interface_impl_09_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing property that was defined identically by two different base-interfaces should work"); + // Section 13.4 Interface implementations + // Implementing property that was defined identically by two different base-interfaces should work Assert.IsTrue(Interface_TestClass_impl_09.testMethod()); } [TestMethod] public void Interface_impl_10_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing an event that was defined identically by two different base-interfaces should work"); + // Section 13.4 Interface implementations + // Implementing an event that was defined identically by two different base-interfaces should work Assert.IsTrue(Interface_TestClass_impl_10.testMethod()); } [TestMethod] public void Interface_impl_11_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing an indexer that was defined identically by two different base-interfaces should work"); + // Section 13.4 Interface implementations + // Implementing an indexer that was defined identically by two different base-interfaces should work Assert.IsTrue(Interface_TestClass_impl_11.testMethod()); } [TestMethod] public void Interface_impl_12_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("The members of base class participate in interface mapping"); + // Section 13.4 Interface implementations + // The members of base class participate in interface mapping Assert.IsTrue(Interface_TestClass_impl_12.testMethod()); } [TestMethod] public void Interface_impl_13_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Two interfaces on the same object must resolve to the same reference"); + // Section 13.4 Interface implementations + // Two interfaces on the same object must resolve to the same reference Assert.IsTrue(Interface_TestClass_impl_13.testMethod()); } [TestMethod] public void Interface_implinherit_01_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Interface methods implementation inheritance map as expected (1st/2nd example in 13.4.3)"); + // Section 13.4 Interface implementations + // Interface methods implementation inheritance map as expected (1st/2nd example in 13.4.3) Assert.IsTrue(Interface_TestClass_implinherit_01.testMethod()); } [TestMethod] public void Interface_implinherit_02_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Interface methods implementation inheritance (w/virtual) map as expected (3rd/4th example in 13.4.3)"); + // Section 13.4 Interface implementations + // Interface methods implementation inheritance (w/virtual) map as expected (3rd/4th example in 13.4.3) Assert.IsTrue(Interface_TestClass_implinherit_02.testMethod()); } [TestMethod] public void Interface_explicit_04_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementation of a method"); + // Section 13.4 Interface implementations + // Explicit interface member implementation of a method Assert.IsTrue(Interface_TestClass_explicit_04.testMethod()); } [TestMethod] public void Interface_explicit_05_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementation of a property"); + // Section 13.4 Interface implementations + // Explicit interface member implementation of a property Assert.IsTrue(Interface_TestClass_explicit_05.testMethod()); } [TestMethod] public void Interface_explicit_06_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementation of an event (Bug 89766)"); + // Section 13.4 Interface implementations + // Explicit interface member implementation of an event (Bug 89766) Assert.IsTrue(Interface_TestClass_explicit_06.testMethod()); } [TestMethod] public void Interface_explicit_07_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementation of an indexer"); + // Section 13.4 Interface implementations + // Explicit interface member implementation of an indexer Assert.IsTrue(Interface_TestClass_explicit_07.testMethod()); } [TestMethod] public void Interface_explicit_10_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implemented members (method) can be called through interface instances"); + // Section 13.4 Interface implementations + // Explicitly implemented members (method) can be called through interface instances Assert.IsTrue(Interface_TestClass_explicit_10.testMethod()); } [TestMethod] public void Interface_explicit_11_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implemented members (property) can be called through interface instances"); + // Section 13.4 Interface implementations + // Explicitly implemented members (property) can be called through interface instances Assert.IsTrue(Interface_TestClass_explicit_11.testMethod()); } [TestMethod] public void Interface_explicit_12_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implemented members (indexer) can be called through interface instances"); + // Section 13.4 Interface implementations + // Explicitly implemented members (indexer) can be called through interface instances Assert.IsTrue(Interface_TestClass_explicit_12.testMethod()); } [TestMethod] public void Interface_explicit_13_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implemented members (event) can be called through interface instances (Bug 89766)"); + // Section 13.4 Interface implementations + // Explicitly implemented members (event) can be called through interface instances (Bug 89766) Assert.IsTrue(Interface_TestClass_explicit_13.testMethod()); } [TestMethod] public void Interface_explicit_21_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Hidden base interface members may be implemented in all of the ways used in this"); + // Section 13.4 Interface implementations + // Hidden base interface members may be implemented in all of the ways used in this Assert.IsTrue(Interface_TestClass_explicit_21.testMethod()); } [TestMethod] public void Interface_explicit_25_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implementing overloaded methods should work "); + // Section 13.4 Interface implementations + // Explicitly implementing overloaded methods should work Assert.IsTrue(Interface_TestClass_explicit_25.testMethod()); } [TestMethod] public void Interface_mdfrmeth_09_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("An abstract class can implement an interface's methods as abstract"); + // Section 13.4 Interface implementations + // An abstract class can implement an interface's methods as abstract Assert.IsTrue(Interface_TestClass_mdfrmeth_09.testMethod()); } [TestMethod] public void Interface_ifreimp_01_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("A class that inherits an interface implementation is permitted to re-implement the interface by including it in the base class list"); + // Section 13.4 Interface implementations + // A class that inherits an interface implementation is permitted to re-implement the interface by including it in the base class list // Known failure Assert.IsFalse(Interface_TestClass_ifreimp_01.testMethod()); } @@ -362,8 +362,8 @@ public void Interface_ifreimp_01_Test() [TestMethod] public void Interface_ifreimp_02_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Inherited public member declarations and inherited explicit interface member declarations participate in the interface mapping process for re-implemented interfaces (Bug 90165)"); + // Section 13.4 Interface implementations + // Inherited public member declarations and inherited explicit interface member declarations participate in the interface mapping process for re-implemented interfaces (Bug 90165) // Known failure Assert.IsFalse(Interface_TestClass_ifreimp_02.testMethod()); } @@ -371,426 +371,426 @@ public void Interface_ifreimp_02_Test() [TestMethod] public void Interface_ifreimp_03_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Interface reimplementation also reimplements the interface's base interfaces. Verify mapping is done correctly. (90165)"); - OutputHelper.WriteLine("This Test is an expected fail in the baseline, but has passed in recent testing"); + // Section 13.4 Interface implementations + // Interface reimplementation also reimplements the interface's base interfaces. Verify mapping is done correctly. (90165) + // This Test is an expected fail in the baseline, but has passed in recent testing Assert.IsTrue(Interface_TestClass_ifreimp_03.testMethod()); } [TestMethod] public void Interface_abstract_01_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("An abstract class is permitted to map base-interface methods onto abstract methods"); + // Section 13.4 Interface implementations + // An abstract class is permitted to map base-interface methods onto abstract methods Assert.IsTrue(Interface_TestClass_abstract_01.testMethod()); } [TestMethod] public void Interface_abstract_02_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("The abstract methods implementing interface methods must be overridden by inheriting classes"); + // Section 13.4 Interface implementations + // The abstract methods implementing interface methods must be overridden by inheriting classes Assert.IsTrue(Interface_TestClass_abstract_02.testMethod()); } [TestMethod] public void Interface_abstract_03_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementations are permitted to call abstract methods"); + // Section 13.4 Interface implementations + // Explicit interface member implementations are permitted to call abstract methods Assert.IsTrue(Interface_TestClass_abstract_03.testMethod()); } [TestMethod] public void Interface_indexer_02_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Simplest interface indexer declaration (int)"); + // Section 13.2 Interface members + // Simplest interface indexer declaration (int) Assert.IsTrue(Interface_TestClass_indexer_02.testMethod()); } [TestMethod] public void Interface_indexer_03_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Simplest interface indexer declaration (String)"); + // Section 13.2 Interface members + // Simplest interface indexer declaration (String) Assert.IsTrue(Interface_TestClass_indexer_03.testMethod()); } [TestMethod] public void Interface_indexer_04_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Simplest interface indexer declaration (user-defined struct)"); + // Section 13.2 Interface members + // Simplest interface indexer declaration (user-defined struct) Assert.IsTrue(Interface_TestClass_indexer_04.testMethod()); } [TestMethod] public void Interface_indexer_05_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Interface indexer with multiple parameters in formal-index-parameter-list"); + // Section 13.2 Interface members + // Interface indexer with multiple parameters in formal-index-parameter-list Assert.IsTrue(Interface_TestClass_indexer_05.testMethod()); } [TestMethod] public void Interface_indexer_06_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Interface indexer with just get accessor"); + // Section 13.2 Interface members + // Interface indexer with just get accessor Assert.IsTrue(Interface_TestClass_indexer_06.testMethod()); } [TestMethod] public void Interface_indexer_07_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Interface indexer with just set accessor"); + // Section 13.2 Interface members + // Interface indexer with just set accessor Assert.IsTrue(Interface_TestClass_indexer_07.testMethod()); } [TestMethod] public void Interface_indexer_18_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Using 'new' on an interface member (indexer) that doesn't hide an inherited member should gen warning "); - OutputHelper.WriteLine("(Related Bug: 86609)"); + // Section 13.2 Interface members + // Using 'new' on an interface member (indexer) that doesn't hide an inherited member should gen warning + // (Related Bug: 86609) Assert.IsTrue(Interface_TestClass_indexer_18.testMethod()); } [TestMethod] public void Interface_meth_09_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Using 'new' on an interface member (method) that doesn't hide an inherited member should gen warning (Bug: 86609)"); + // Section 13.2 Interface members + // Using 'new' on an interface member (method) that doesn't hide an inherited member should gen warning (Bug: 86609) Assert.IsTrue(Interface_TestClass_meth_09.testMethod()); } [TestMethod] public void Interface_prop_09_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Using 'new' on an interface member (property) that doesn't hide an inherited member should gen warning (Bug: 86609)"); + // Section 13.2 Interface members + // Using 'new' on an interface member (property) that doesn't hide an inherited member should gen warning (Bug: 86609) Assert.IsTrue(Interface_TestClass_prop_09.testMethod()); } [TestMethod] public void Interface_namesig_02_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Member functions of an interface may have same name if they have diff args"); + // Section 13.2 Interface members + // Member functions of an interface may have same name if they have diff args Assert.IsTrue(Interface_TestClass_namesig_02.testMethod()); } [TestMethod] public void Interface_namesig_03_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Interface member that is hidden by an inheriting interface (without using new) gens warning"); + // Section 13.2 Interface members + // Interface member that is hidden by an inheriting interface (without using new) gens warning Assert.IsTrue(Interface_TestClass_namesig_03.testMethod()); } [TestMethod] public void Interface_namesig_04_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Interface that inherits 2 other interfaces that have a member with same sig"); + // Section 13.2 Interface members + // Interface that inherits 2 other interfaces that have a member with same sig Assert.IsTrue(Interface_TestClass_namesig_04.testMethod()); } [TestMethod] public void Interface_namesig_05_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Interface member that is hidden by an inheriting interface (using new) works correctly"); + // Section 13.2 Interface members + // Interface member that is hidden by an inheriting interface (using new) works correctly Assert.IsTrue(Interface_TestClass_namesig_05.testMethod()); } [TestMethod] public void Interface_events_08_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Using 'new' on an interface member (event) that doesn't hide an inherited member should gen warning (Bug: 118831)"); + // Section 13.2 Interface members + // Using 'new' on an interface member (event) that doesn't hide an inherited member should gen warning (Bug: 118831) Assert.IsTrue(Interface_TestClass_events_08.testMethod()); } [TestMethod] public void Interface_events_09_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Simple Event declaration within an interface"); + // Section 13.2 Interface members + // Simple Event declaration within an interface Assert.IsTrue(Interface_TestClass_events_09.testMethod()); } [TestMethod] public void Interface_maccess_01_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Inherited members with same sig, from diff interfaces, can be accessed through casting"); + // Section 13.2 Interface members + // Inherited members with same sig, from diff interfaces, can be accessed through casting Assert.IsTrue(Interface_TestClass_maccess_01.testMethod()); } [TestMethod] public void Interface_maccess_03_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Inherited members with same method names but diff args can be accessed by casting"); + // Section 13.2 Interface members + // Inherited members with same method names but diff args can be accessed by casting Assert.IsTrue(Interface_TestClass_maccess_03.testMethod()); } [TestMethod] public void Interface_maccess_04_Test() { - OutputHelper.WriteLine("Section 13.2 Interface members"); - OutputHelper.WriteLine("Inherited members with same method names but diff args should work if arg passed is not ambiguous (Regression bug: 90867)"); + // Section 13.2 Interface members + // Inherited members with same method names but diff args should work if arg passed is not ambiguous (Regression bug: 90867) Assert.IsTrue(Interface_TestClass_maccess_04.testMethod()); } [TestMethod] public void Interface_modifier_02_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify private interfaces gen error when declared in global namespace"); + // Section 13.1 Interface declarations + // Verify private interfaces gen error when declared in global namespace Assert.IsTrue(Interface_TestClass_modifier_02.testMethod()); } [TestMethod] public void Interface_modifier_03_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify protected interfaces gen error when declared in global namespace"); + // Section 13.1 Interface declarations + // Verify protected interfaces gen error when declared in global namespace Assert.IsTrue(Interface_TestClass_modifier_03.testMethod()); } [TestMethod] public void Interface_struct_impl_01_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Simple struct implementation of two interfaces"); + // Section 13.4 Interface implementations + // Simple struct implementation of two interfaces Assert.IsTrue(Interface_TestClass_struct_impl_01.testMethod()); } [TestMethod] public void Interface_struct_impl_02_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("A struct that implements an interface also implicitly implements all of the interface's base interfaces"); + // Section 13.4 Interface implementations + // A struct that implements an interface also implicitly implements all of the interface's base interfaces Assert.IsTrue(Interface_TestClass_struct_impl_02.testMethod()); } [TestMethod] public void Interface_struct_impl_04_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("A member of an interface-type can be assigned an instance of a struct that implements it"); + // Section 13.4 Interface implementations + // A member of an interface-type can be assigned an instance of a struct that implements it Assert.IsTrue(Interface_TestClass_struct_impl_04.testMethod()); } [TestMethod] public void Interface_struct_impl_05_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("A struct that implements an interface with a method, property, event, and indexer"); + // Section 13.4 Interface implementations + // A struct that implements an interface with a method, property, event, and indexer Assert.IsTrue(Interface_TestClass_struct_impl_05.testMethod()); } [TestMethod] public void Interface_struct_impl_06_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing a method that was defined identically by two different base-interfaces should work"); + // Section 13.4 Interface implementations + // Implementing a method that was defined identically by two different base-interfaces should work Assert.IsTrue(Interface_TestClass_struct_impl_06.testMethod()); } [TestMethod] public void Interface_struct_impl_07_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing a property that was defined identically by two different base-interfaces should work"); + // Section 13.4 Interface implementations + // Implementing a property that was defined identically by two different base-interfaces should work Assert.IsTrue(Interface_TestClass_struct_impl_07.testMethod()); } [TestMethod] public void Interface_struct_impl_08_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing an event that was defined identically by two different base-interfaces should work"); + // Section 13.4 Interface implementations + // Implementing an event that was defined identically by two different base-interfaces should work Assert.IsTrue(Interface_TestClass_struct_impl_08.testMethod()); } [TestMethod] public void Interface_struct_impl_09_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing an indexer that was defined identically by two different base-interfaces should work"); + // Section 13.4 Interface implementations + // Implementing an indexer that was defined identically by two different base-interfaces should work Assert.IsTrue(Interface_TestClass_struct_impl_09.testMethod()); } [TestMethod] public void Interface_struct_explicit_01_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementations"); + // Section 13.4 Interface implementations + // Explicit interface member implementations Assert.IsTrue(Interface_TestClass_struct_explicit_01.testMethod()); } [TestMethod] public void Interface_struct_explicit_03_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Implementing an iface method in a struct that doesn't list the iface as a base iface but does list a iface that inherits the iface should work"); + // Section 13.4 Interface implementations + // Implementing an iface method in a struct that doesn't list the iface as a base iface but does list a iface that inherits the iface should work Assert.IsTrue(Interface_TestClass_struct_explicit_03.testMethod()); } [TestMethod] public void Interface_struct_explicit_04_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementation of a method"); + // Section 13.4 Interface implementations + // Explicit interface member implementation of a method Assert.IsTrue(Interface_TestClass_struct_explicit_04.testMethod()); } [TestMethod] public void Interface_struct_explicit_05_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementation of a property"); + // Section 13.4 Interface implementations + // Explicit interface member implementation of a property Assert.IsTrue(Interface_TestClass_struct_explicit_05.testMethod()); } [TestMethod] public void Interface_struct_explicit_06_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementation of an event (Bug: 89766)"); + // Section 13.4 Interface implementations + // Explicit interface member implementation of an event (Bug: 89766) Assert.IsTrue(Interface_TestClass_struct_explicit_06.testMethod()); } [TestMethod] public void Interface_struct_explicit_07_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicit interface member implementation of an indexer"); + // Section 13.4 Interface implementations + // Explicit interface member implementation of an indexer Assert.IsTrue(Interface_TestClass_struct_explicit_07.testMethod()); } [TestMethod] public void Interface_struct_explicit_09_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Multiple base interfaces and explicit interface member implementations work"); + // Section 13.4 Interface implementations + // Multiple base interfaces and explicit interface member implementations work Assert.IsTrue(Interface_TestClass_struct_explicit_09.testMethod()); } [TestMethod] public void Interface_struct_explicit_10_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implemented members (method) can be called through interface instances"); + // Section 13.4 Interface implementations + // Explicitly implemented members (method) can be called through interface instances Assert.IsTrue(Interface_TestClass_struct_explicit_10.testMethod()); } [TestMethod] public void Interface_struct_explicit_11_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implemented members (property) can be called through interface instances (Bug 90570)"); + // Section 13.4 Interface implementations + // Explicitly implemented members (property) can be called through interface instances (Bug 90570) Assert.IsTrue(Interface_TestClass_struct_explicit_11.testMethod()); } [TestMethod] public void Interface_struct_explicit_12_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implemented members (indexer) can be called through interface instances (Bug 90570)"); + // Section 13.4 Interface implementations + // Explicitly implemented members (indexer) can be called through interface instances (Bug 90570) Assert.IsTrue(Interface_TestClass_struct_explicit_12.testMethod()); } [TestMethod] public void Interface_struct_explicit_13_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implemented members (event) can be called through interface instances (89766)"); + // Section 13.4 Interface implementations + // Explicitly implemented members (event) can be called through interface instances (89766) Assert.IsTrue(Interface_TestClass_struct_explicit_13.testMethod()); } [TestMethod] public void Interface_struct_explicit_19_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Explicitly implementing member from interface not in base-list (but in base-list of a base interface) should work"); + // Section 13.4 Interface implementations + // Explicitly implementing member from interface not in base-list (but in base-list of a base interface) should work Assert.IsTrue(Interface_TestClass_struct_explicit_19.testMethod()); } [TestMethod] public void Interface_struct_explicit_20_Test() { - OutputHelper.WriteLine("Section 13.4 Interface implementations"); - OutputHelper.WriteLine("Hidden base interface members may be implemented in all of the ways used in this"); + // Section 13.4 Interface implementations + // Hidden base interface members may be implemented in all of the ways used in this Assert.IsTrue(Interface_TestClass_struct_explicit_20.testMethod()); } [TestMethod] public void Interface_struct_decl_01_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest interface declared in a struct in default global namespace"); + // Section 13.1 Interface declarations + // Simplest interface declared in a struct in default global namespace Assert.IsTrue(Interface_TestClass_struct_decl_01.testMethod()); } [TestMethod] public void Interface_struct_decl_02_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest interface declared in a struct in a declared namespace"); + // Section 13.1 Interface declarations + // Simplest interface declared in a struct in a declared namespace Assert.IsTrue(Interface_TestClass_decl_02_NS.Interface_TestClass_decl_02.testMethod()); } [TestMethod] public void Interface_struct_inherit_01_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest form of interface inheritance, inheriting multiple interfaces"); + // Section 13.1 Interface declarations + // Simplest form of interface inheritance, inheriting multiple interfaces Assert.IsTrue(Interface_TestClass_struct_inherit_01.testMethod()); } [TestMethod] public void Interface_struct_modifier_01_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify public and internal interfaces are valid inside structs"); + // Section 13.1 Interface declarations + // Verify public and internal interfaces are valid inside structs Assert.IsTrue(Interface_TestClass_struct_modifier_01.testMethod()); } [TestMethod] public void Interface_struct_modifier_02_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify private interfaces are valid inside structs"); + // Section 13.1 Interface declarations + // Verify private interfaces are valid inside structs Assert.IsTrue(Interface_TestClass_struct_modifier_02.testMethod()); } [TestMethod] public void Interface_struct_modifier_03_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Verify new interface gens warning if not hiding anything"); + // Section 13.1 Interface declarations + // Verify new interface gens warning if not hiding anything Assert.IsTrue(Interface_TestClass_struct_modifier_03.testMethod()); } [TestMethod] public void Interface_struct_semicolon_01_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest interface declared (with semi-colon) in a struct in default global namespace"); + // Section 13.1 Interface declarations + // Simplest interface declared (with semi-colon) in a struct in default global namespace Assert.IsTrue(Interface_TestClass_struct_semicolon_01.testMethod()); } [TestMethod] public void Interface_struct_semicolon_02_Test() { - OutputHelper.WriteLine("Section 13.1 Interface declarations "); - OutputHelper.WriteLine("Simplest interface declared (with semi-colon) in a struct in a declared namespace"); + // Section 13.1 Interface declarations + // Simplest interface declared (with semi-colon) in a struct in a declared namespace Assert.IsTrue(Interface_TestClass_semicolon_02_NS.Interface_TestClass_semicolon_02.testMethod()); } @@ -815,7 +815,7 @@ class Interface_TestClass_decl_01 { public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -831,7 +831,7 @@ interface Interface_TestClass_decl_03_I } public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -962,7 +962,7 @@ class Interface_TestClass_inherit_04 : Interface_TestClass_inherit_04_C { public void m() { - OutputHelper.WriteLine("This works!"); + // This works! } public static void Main_old() @@ -1067,7 +1067,7 @@ class Interface_TestClass_semicolon_01 { public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -1083,7 +1083,7 @@ interface Interface_TestClass_semicolon_03_I }; public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -1149,7 +1149,7 @@ class Interface_TestClass_impl_04_C : Interface_TestClass_impl_04_I1 { public void F() { - OutputHelper.WriteLine("Interface_TestClass_impl_04_C.F()"); + // Interface_TestClass_impl_04_C.F() } } class Interface_TestClass_impl_04 @@ -1175,14 +1175,14 @@ class Interface_TestClass_impl_05_C : Interface_TestClass_impl_05_I1 { public void F() { - OutputHelper.WriteLine("Interface_TestClass_impl_05_C.F()"); + // Interface_TestClass_impl_05_C.F() } } class Interface_TestClass_impl_05_D : Interface_TestClass_impl_05_C { public void F() { - OutputHelper.WriteLine("Interface_TestClass_impl_05_D.F()"); + // Interface_TestClass_impl_05_D.F() } } class Interface_TestClass_impl_05 @@ -1211,14 +1211,14 @@ class Interface_TestClass_impl_06_C : Interface_TestClass_impl_06_I1 { public virtual void F() { - OutputHelper.WriteLine("Interface_TestClass_impl_06_C.F()"); + // Interface_TestClass_impl_06_C.F() } } class Interface_TestClass_impl_06_D : Interface_TestClass_impl_06_C { public override void F() { - OutputHelper.WriteLine("Interface_TestClass_impl_06_D.F()"); + // Interface_TestClass_impl_06_D.F() } } class Interface_TestClass_impl_06 @@ -1253,7 +1253,7 @@ class Interface_TestClass_impl_07_1 : Interface_TestClass_impl_07_I public void Method() { - OutputHelper.WriteLine("Method()"); + // Method() } public int Property { @@ -1446,14 +1446,14 @@ class Interface_TestClass_implinherit_01_1 : Interface_TestClass_implinherit_01_ { public void Paint() { - OutputHelper.WriteLine("Interface_TestClass_implinherit_01_1.Paint()"); + // Interface_TestClass_implinherit_01_1.Paint() } } class Interface_TestClass_implinherit_01_2 : Interface_TestClass_implinherit_01_1 { new public void Paint() { - OutputHelper.WriteLine("Interface_TestClass_implinherit_01_2.Paint()"); + // Interface_TestClass_implinherit_01_2.Paint() } } class Interface_TestClass_implinherit_01 @@ -1483,14 +1483,14 @@ class Interface_TestClass_implinherit_02_1 : Interface_TestClass_implinherit_02_ { public virtual void Paint() { - OutputHelper.WriteLine("Interface_TestClass_implinherit_02_1.Paint()"); + // Interface_TestClass_implinherit_02_1.Paint() } } class Interface_TestClass_implinherit_02_2 : Interface_TestClass_implinherit_02_1 { public override void Paint() { - OutputHelper.WriteLine("Interface_TestClass_implinherit_02_2.Paint()"); + // Interface_TestClass_implinherit_02_2.Paint() } } class Interface_TestClass_implinherit_02 @@ -1558,7 +1558,7 @@ class Interface_TestClass_explicit_04_2 : Interface_TestClass_explicit_04_1 { void Interface_TestClass_explicit_04_1.Method() { - OutputHelper.WriteLine("Method()"); + // Method() } } class Interface_TestClass_explicit_04 @@ -2002,7 +2002,7 @@ class Interface_TestClass_ifreimp_01_1 : Interface_TestClass_ifreimp_01_I1 { void Interface_TestClass_ifreimp_01_I1.Paint() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_01_1.Interface_TestClass_ifreimp_01_I1.Paint()"); + // Interface_TestClass_ifreimp_01_1.Interface_TestClass_ifreimp_01_I1.Paint() throw new Exception("Incorrect method got called!"); } } @@ -2010,7 +2010,7 @@ class Interface_TestClass_ifreimp_01_3 : Interface_TestClass_ifreimp_01_1, Inter { public void Paint() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_01_3.Paint()"); + // Interface_TestClass_ifreimp_01_3.Paint() } } class Interface_TestClass_ifreimp_01 @@ -2041,36 +2041,36 @@ class Interface_TestClass_ifreimp_02_2 : Interface_TestClass_ifreimp_02_I1 { void Interface_TestClass_ifreimp_02_I1.F() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_02_2.Interface_TestClass_ifreimp_02_I1.F()"); + // Interface_TestClass_ifreimp_02_2.Interface_TestClass_ifreimp_02_I1.F() throw new Exception("Incorrect method got called!"); } void Interface_TestClass_ifreimp_02_I1.G() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_02_2.Interface_TestClass_ifreimp_02_I1.G()"); + // Interface_TestClass_ifreimp_02_2.Interface_TestClass_ifreimp_02_I1.G() } public void H() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_02_2.H()"); + // Interface_TestClass_ifreimp_02_2.H() throw new Exception("Incorrect method got called!"); } public void I() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_02_2.I()"); + // Interface_TestClass_ifreimp_02_2.I() } } class Interface_TestClass_ifreimp_02_1 : Interface_TestClass_ifreimp_02_2, Interface_TestClass_ifreimp_02_I1 { public void F() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_02_1.F()"); + // Interface_TestClass_ifreimp_02_1.F() } void Interface_TestClass_ifreimp_02_I1.H() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_02_1.Interface_TestClass_ifreimp_02_I1.H()"); + // Interface_TestClass_ifreimp_02_1.Interface_TestClass_ifreimp_02_I1.H() } } class Interface_TestClass_ifreimp_02 @@ -2105,22 +2105,22 @@ class Interface_TestClass_ifreimp_03_C : Interface_TestClass_ifreimp_03_I3 { void Interface_TestClass_ifreimp_03_I2.F() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_03_C.Interface_TestClass_ifreimp_03_I2.F()"); + // Interface_TestClass_ifreimp_03_C.Interface_TestClass_ifreimp_03_I2.F() } void Interface_TestClass_ifreimp_03_I3.G() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_03_C.Interface_TestClass_ifreimp_03_I3.G()"); + // Interface_TestClass_ifreimp_03_C.Interface_TestClass_ifreimp_03_I3.G() } } class Interface_TestClass_ifreimp_03_D : Interface_TestClass_ifreimp_03_C, Interface_TestClass_ifreimp_03_I3 { public void F() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_03_D.F()"); + // Interface_TestClass_ifreimp_03_D.F() } public void G() { - OutputHelper.WriteLine("Interface_TestClass_ifreimp_03_D.G()"); + // Interface_TestClass_ifreimp_03_D.G() } } class Interface_TestClass_ifreimp_03 @@ -2352,11 +2352,11 @@ class Interface_TestClass_namesig_02_c : Interface_TestClass_namesig_02_1 { public void F(int x) { - OutputHelper.WriteLine("F(int x) works!"); + // F(int x) works! } public void F(String x) { - OutputHelper.WriteLine("F(String x) works!"); + // F(String x) works! } } class Interface_TestClass_namesig_02 @@ -2629,7 +2629,7 @@ struct Interface_TestClass_struct_impl_04_C : Interface_TestClass_struct_impl_04 { public void F() { - OutputHelper.WriteLine("Interface_TestClass_struct_impl_04_C.F()"); + // Interface_TestClass_struct_impl_04_C.F() } } class Interface_TestClass_struct_impl_04 @@ -2661,7 +2661,7 @@ struct Interface_TestClass_struct_impl_05_2 : Interface_TestClass_struct_impl_05 public void Method() { - OutputHelper.WriteLine("Method()"); + // Method() } public int Property { @@ -2844,7 +2844,7 @@ struct Interface_TestClass_struct_explicit_04_2 : Interface_TestClass_struct_exp { void Interface_TestClass_struct_explicit_04_1.Method() { - OutputHelper.WriteLine("Method()"); + // Method() } } class Interface_TestClass_struct_explicit_04 @@ -3232,7 +3232,7 @@ class Interface_TestClass_struct_decl_01 { public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -3251,7 +3251,7 @@ struct Interface_TestClass_struct_inherit_01_1 : Interface_TestClass_struct_inhe { public void m() { - OutputHelper.WriteLine("This works!"); + // This works! } } class Interface_TestClass_struct_inherit_01 @@ -3317,7 +3317,7 @@ class Interface_TestClass_struct_semicolon_01 { public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -3432,7 +3432,7 @@ public SampleOrder(DateTime purchase, double cost) // OutputHelper.WriteLine($"Data about {c.Name}"); // OutputHelper.WriteLine($"Joined on {c.DateJoined}. Made {c.PreviousOrders.Count} orders, the last on {c.LastOrder}"); - // OutputHelper.WriteLine("Reminders:"); + // // Reminders: // foreach (var item in c.Reminders) // { @@ -3467,7 +3467,7 @@ class Interface_TestClass_struct_decl_02 { public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -3490,7 +3490,7 @@ class Interface_TestClass_struct_semicolon_02 { public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -3511,7 +3511,7 @@ class Interface_TestClass_decl_02 { public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -3532,7 +3532,7 @@ interface Interface_TestClass_semicolon_04_I }; public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -3553,7 +3553,7 @@ class Interface_TestClass_semicolon_02 { public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { @@ -3574,7 +3574,7 @@ interface Interface_TestClass_decl_04_I } public static void Main_old() { - OutputHelper.WriteLine("This works!"); + // This works! } public static bool testMethod() { diff --git a/Tests/NFUnitTestLexical/UnitTestLExicalTest1.cs b/Tests/NFUnitTestLexical/UnitTestLExicalTest1.cs index 5ac278f8..964c397c 100644 --- a/Tests/NFUnitTestLexical/UnitTestLExicalTest1.cs +++ b/Tests/NFUnitTestLexical/UnitTestLExicalTest1.cs @@ -24,758 +24,758 @@ public class UnitTestLExicalTest1 [TestMethod] public void Lexical_comments_01_Test() { - OutputHelper.WriteLine("Section 2.4.4 Test"); - OutputHelper.WriteLine("Verifies valid/invalid comment"); + // Section 2.4.4 Test + // Verifies valid/invalid comment Assert.IsTrue(Lexical_TestClass_comments_01.testMethod()); } [TestMethod] public void Lexical_comments_02_Test() { - OutputHelper.WriteLine("Section 2.4.4 Test"); - OutputHelper.WriteLine("Verifies valid/invalid comment"); + // Section 2.4.4 Test + // Verifies valid/invalid comment Assert.IsTrue(Lexical_TestClass_comments_02.testMethod()); } [TestMethod] public void Lexical_comments_03_Test() { - OutputHelper.WriteLine("Section 2.4.4 Test"); - OutputHelper.WriteLine("Verifies valid/invalid comment"); + // Section 2.4.4 Test + // Verifies valid/invalid comment Assert.IsTrue(Lexical_TestClass_comments_03.testMethod()); } [TestMethod] public void Lexical_comments_04_Test() { - OutputHelper.WriteLine("Section 2.4.4 Test"); - OutputHelper.WriteLine("Verifies valid/invalid comment"); + // Section 2.4.4 Test + // Verifies valid/invalid comment Assert.IsTrue(Lexical_TestClass_comments_04.testMethod()); } [TestMethod] public void Lexical_comments_05_Test() { - OutputHelper.WriteLine("Section 2.4.4 Test"); - OutputHelper.WriteLine("Verifies valid/invalid comment"); + // Section 2.4.4 Test + // Verifies valid/invalid comment Assert.IsTrue(Lexical_TestClass_comments_05.testMethod()); } [TestMethod] public void Lexical_comments_06_Test() { - OutputHelper.WriteLine("Section 2.4.4 Test"); - OutputHelper.WriteLine("Verifies valid/invalid comment"); + // Section 2.4.4 Test + // Verifies valid/invalid comment Assert.IsTrue(Lexical_TestClass_comments_06.testMethod()); } [TestMethod] public void Lexical_comments_07_Test() { - OutputHelper.WriteLine("Section 2.4.4 Test"); - OutputHelper.WriteLine("Verifies valid/invalid comment"); + // Section 2.4.4 Test + // Verifies valid/invalid comment Assert.IsTrue(Lexical_TestClass_comments_07.testMethod()); } [TestMethod] public void Lexical_comments_10_Test() { - OutputHelper.WriteLine("Section 2.4.4 Test"); - OutputHelper.WriteLine("Verifies valid/invalid comment"); + // Section 2.4.4 Test + // Verifies valid/invalid comment Assert.IsTrue(Lexical_TestClass_comments_10.testMethod()); } [TestMethod] public void Lexical_bool_01_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify true works on bools"); + // Section 2.4.9 Test + // verify true works on bools Assert.IsTrue(Lexical_TestClass_bool_01.testMethod()); } [TestMethod] public void Lexical_bool_02_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify false works on bools"); + // Section 2.4.9 Test + // verify false works on bools Assert.IsTrue(Lexical_TestClass_bool_02.testMethod()); } [TestMethod] public void Lexical_int_01_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify 0 as int literal"); + // Section 2.4.9 Test + // verify 0 as int literal Assert.IsTrue(Lexical_TestClass_int_01.testMethod()); } [TestMethod] public void Lexical_int_02_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify positive int literals"); + // Section 2.4.9 Test + // verify positive int literals Assert.IsTrue(Lexical_TestClass_int_02.testMethod()); } [TestMethod] public void Lexical_int_03_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify negative int literals"); + // Section 2.4.9 Test + // verify negative int literals Assert.IsTrue(Lexical_TestClass_int_03.testMethod()); } [TestMethod] public void Lexical_int_04_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify negative hex literals"); + // Section 2.4.9 Test + // verify negative hex literals Assert.IsTrue(Lexical_TestClass_int_04.testMethod()); } [TestMethod] public void Lexical_int_05_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify positive hex literals"); + // Section 2.4.9 Test + // verify positive hex literals Assert.IsTrue(Lexical_TestClass_int_05.testMethod()); } [TestMethod] public void Lexical_int_06_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify 0 as hex int literal"); + // Section 2.4.9 Test + // verify 0 as hex int literal Assert.IsTrue(Lexical_TestClass_int_06.testMethod()); } [TestMethod] public void Lexical_intsuffix_01_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("L/l suffix on longs"); + // Section 2.4.9 Test + // L/l suffix on longs Assert.IsTrue(Lexical_TestClass_intsuffix_01.testMethod()); } [TestMethod] public void Lexical_intsuffix_02_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("LU, Ul,uL,ul,LU,Lu,lU,lu suffix on ulongs"); + // Section 2.4.9 Test + // LU, Ul,uL,ul,LU,Lu,lU,lu suffix on ulongs Assert.IsTrue(Lexical_TestClass_intsuffix_02.testMethod()); } [TestMethod] public void Lexical_intsuffix_03_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("LU, Ul,uL,ul,LU,Lu,lU,lu suffix on ulongs"); + // Section 2.4.9 Test + // LU, Ul,uL,ul,LU,Lu,lU,lu suffix on ulongs Assert.IsTrue(Lexical_TestClass_intsuffix_03.testMethod()); } [TestMethod] public void Lexical_intsuffix_04_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("Verify UL,Ul,uL,ul,LU,Lu,lU,lu suffix are of type ulong"); + // Section 2.4.9 Test + // Verify UL,Ul,uL,ul,LU,Lu,lU,lu suffix are of type ulong Assert.IsTrue(Lexical_TestClass_intsuffix_04.testMethod()); } [TestMethod] public void Lexical_intsuffix_06_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("Verify L, l suffixes are of type uint"); + // Section 2.4.9 Test + // Verify L, l suffixes are of type uint Assert.IsTrue(Lexical_TestClass_intsuffix_06.testMethod()); } [TestMethod] public void Lexical_intsuffix_07_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("Using the lowercase 'l' suffix should generate a level 4 warning (VS7:86407)"); + // Section 2.4.9 Test + // Using the lowercase 'l' suffix should generate a level 4 warning (VS7:86407) Assert.IsTrue(Lexical_TestClass_intsuffix_07.testMethod()); } [TestMethod] public void Lexical_suff_typepick_03_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("Verify that literals with l, L suffixes are typed according to spec"); + // Section 2.4.9 Test + // Verify that literals with l, L suffixes are typed according to spec Assert.IsTrue(Lexical_TestClass_suff_typepick_03.testMethod()); } [TestMethod] public void Lexical_real_01_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify (+/-) double double literals"); + // Section 2.4.9 Test + // verify (+/-) double double literals Assert.IsTrue(Lexical_TestClass_real_01.testMethod()); } [TestMethod] public void Lexical_real_02_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); + // Section 2.4.9 Test Assert.IsTrue(Lexical_TestClass_real_02.testMethod()); } [TestMethod] public void Lexical_real_03_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify (-/+) non-double double literals"); + // Section 2.4.9 Test + // verify (-/+) non-double double literals Assert.IsTrue(Lexical_TestClass_real_03.testMethod()); } [TestMethod] public void Lexical_real_04_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify E and e (-/+) as double literals"); + // Section 2.4.9 Test + // verify E and e (-/+) as double literals Assert.IsTrue(Lexical_TestClass_real_04.testMethod()); } [TestMethod] public void Lexical_real_05_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify E and e (-/+) as double literals"); + // Section 2.4.9 Test + // verify E and e (-/+) as double literals Assert.IsTrue(Lexical_TestClass_real_05.testMethod()); } [TestMethod] public void Lexical_real_06_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify E and e (-/+) as double literals"); + // Section 2.4.9 Test + // verify E and e (-/+) as double literals Assert.IsTrue(Lexical_TestClass_real_06.testMethod()); } [TestMethod] public void Lexical_char_01_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify keyboard symbols as chars"); + // Section 2.4.9 Test + // verify keyboard symbols as chars Assert.IsTrue(Lexical_TestClass_char_01.testMethod()); } [TestMethod] public void Lexical_char_02_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify all escape sequences in section 2.4.9.4"); + // Section 2.4.9 Test + // verify all escape sequences in section 2.4.9.4 Assert.IsTrue(Lexical_TestClass_char_02.testMethod()); } [TestMethod] public void Lexical_char_03_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("Hex encoded Unicode characters"); + // Section 2.4.9 Test + // Hex encoded Unicode characters Assert.IsTrue(Lexical_TestClass_char_03.testMethod()); } [TestMethod] public void Lexical_realsuffix_01_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("D/d suffix on double literals"); - OutputHelper.WriteLine("Real suffixes"); + // Section 2.4.9 Test + // D/d suffix on double literals + // Real suffixes Assert.IsTrue(Lexical_TestClass_realsuffix_01.testMethod()); } [TestMethod] public void Lexical_realsuffix_02_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("F/f suffix on float literals"); - OutputHelper.WriteLine("Real suffixes"); + // Section 2.4.9 Test + // F/f suffix on float literals + // Real suffixes Assert.IsTrue(Lexical_TestClass_realsuffix_02.testMethod()); } [TestMethod] public void Lexical_string_01_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify escape sequences in string literals"); + // Section 2.4.9 Test + // verify escape sequences in string literals Assert.IsTrue(Lexical_TestClass_string_01.testMethod()); } [TestMethod] public void Lexical_string_02_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify hex escape sequences in string literals"); + // Section 2.4.9 Test + // verify hex escape sequences in string literals Assert.IsTrue(Lexical_TestClass_string_02.testMethod()); } [TestMethod] public void Lexical_string_03_Test() { - OutputHelper.WriteLine("Section 2.4.9 Test"); - OutputHelper.WriteLine("verify null strings work"); + // Section 2.4.9 Test + // verify null strings work Assert.IsTrue(Lexical_TestClass_string_03.testMethod()); } [TestMethod] public void Lexical_pre_001_Test() { - OutputHelper.WriteLine("Section 2.3Preprocessing"); - OutputHelper.WriteLine("simple pre processor"); + // Section 2.3Preprocessing + // simple pre processor Assert.IsTrue(Lexical_TestClass_pre_001.testMethod()); } [TestMethod] public void Lexical_pre_004_Test() { - OutputHelper.WriteLine("Section 2.3Preprocessing"); - OutputHelper.WriteLine("Verify that class name namespace isn't searched"); + // Section 2.3Preprocessing + // Verify that class name namespace isn't searched Assert.IsTrue(Lexical_TestClass_pre_004.testMethod()); } [TestMethod] public void Lexical_pre_005_Test() { - OutputHelper.WriteLine("Section 2.3Preprocessing"); - OutputHelper.WriteLine("Verify that invalid syntax doesn't mess up compiler in non-ifdef sections"); + // Section 2.3Preprocessing + // Verify that invalid syntax doesn't mess up compiler in non-ifdef sections Assert.IsTrue(Lexical_TestClass_pre_005.testMethod()); } [TestMethod] public void Lexical_pre_008_Test() { - OutputHelper.WriteLine("Section 2.3Preprocessing"); - OutputHelper.WriteLine("Verify #elif and #else"); + // Section 2.3Preprocessing + // Verify #elif and #else Assert.IsTrue(Lexical_TestClass_pre_008.testMethod()); } [TestMethod] public void Lexical_preproc_09_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#warning verification"); + // Section 2.3 Preprocessing + // #warning verification Assert.IsTrue(Lexical_TestClass_preproc_09.testMethod()); } [TestMethod] public void Lexical_preproc_30_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verifying comments and #preprocessor items"); - OutputHelper.WriteLine("This define should not be included #define TEST "); + // Section 2.3 Preprocessing + // Verifying comments and #preprocessor items + // This define should not be included #define TEST Assert.IsTrue(Lexical_TestClass_preproc_30.testMethod()); } [TestMethod] public void Lexical_preproc_38_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the code that is skipped because of an #if is not checked by compiler at all"); + // Section 2.3 Preprocessing + // Verify the code that is skipped because of an #if is not checked by compiler at all Assert.IsTrue(Lexical_TestClass_preproc_38.testMethod()); } [TestMethod] public void Lexical_line_02_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#line: Valid integer-literal passed to #line should work correctly with a real warning"); + // Section 2.3 Preprocessing + // #line: Valid integer-literal passed to #line should work correctly with a real warning Assert.IsTrue(Lexical_TestClass_line_02.testMethod()); } [TestMethod] public void Lexical_line_03_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#line: Valid integer-literal passed to #line should work correctly with a #warning directive"); + // Section 2.3 Preprocessing + // #line: Valid integer-literal passed to #line should work correctly with a #warning directive Assert.IsTrue(Lexical_TestClass_line_03.testMethod()); } [TestMethod] public void Lexical_line_06_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#line: Valid integer-literal/string-literal passed to #line should work correctly with a real warning"); + // Section 2.3 Preprocessing + // #line: Valid integer-literal/string-literal passed to #line should work correctly with a real warning Assert.IsTrue(Lexical_TestClass_line_06.testMethod()); } [TestMethod] public void Lexical_line_07_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#line: Valid integer-literal/string-literal passed to #line should work correctly with a #warning directive"); + // Section 2.3 Preprocessing + // #line: Valid integer-literal/string-literal passed to #line should work correctly with a #warning directive Assert.IsTrue(Lexical_TestClass_line_07.testMethod()); } [TestMethod] public void Lexical_line_26_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#line: Should work cleanly inside an #if-#endif block that evaluates to false"); + // Section 2.3 Preprocessing + // #line: Should work cleanly inside an #if-#endif block that evaluates to false Assert.IsTrue(Lexical_TestClass_line_26.testMethod()); } [TestMethod] public void Lexical_line_35_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#line: #line default in a false #if block should compile cleanly"); + // Section 2.3 Preprocessing + // #line: #line default in a false #if block should compile cleanly Assert.IsTrue(Lexical_TestClass_line_35.testMethod()); } [TestMethod] public void Lexical_region_01_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Make sure #region works without banner text"); + // Section 2.3 Preprocessing + // Make sure #region works without banner text Assert.IsTrue(Lexical_TestClass_region_01.testMethod()); } [TestMethod] public void Lexical_region_02_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Make sure #region works with banner text"); + // Section 2.3 Preprocessing + // Make sure #region works with banner text Assert.IsTrue(Lexical_TestClass_region_02.testMethod()); } [TestMethod] public void Lexical_region_05_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Nesting a #region inside another should work "); + // Section 2.3 Preprocessing + // Nesting a #region inside another should work Assert.IsTrue(Lexical_TestClass_region_05.testMethod()); } [TestMethod] public void Lexical_region_06_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Nesting five #region blocks should compile successfully "); + // Section 2.3 Preprocessing + // Nesting five #region blocks should compile successfully Assert.IsTrue(Lexical_TestClass_region_06.testMethod()); } [TestMethod] public void Lexical_region_07_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Nesting two #region blocks within a single #region block should compile successfully "); + // Section 2.3 Preprocessing + // Nesting two #region blocks within a single #region block should compile successfully Assert.IsTrue(Lexical_TestClass_region_07.testMethod()); } [TestMethod] public void Lexical_region_10_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Make sure #region works with banner text enclosed in double-quotes"); + // Section 2.3 Preprocessing + // Make sure #region works with banner text enclosed in double-quotes Assert.IsTrue(Lexical_TestClass_region_10.testMethod()); } [TestMethod] public void Lexical_region_11_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("A single-line comment following a #region should compile successfully"); + // Section 2.3 Preprocessing + // A single-line comment following a #region should compile successfully Assert.IsTrue(Lexical_TestClass_region_11.testMethod()); } [TestMethod] public void Lexical_region_12_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("A single-line comment following an #endregion should compile successfully"); + // Section 2.3 Preprocessing + // A single-line comment following an #endregion should compile successfully Assert.IsTrue(Lexical_TestClass_region_12.testMethod()); } [TestMethod] public void Lexical_region_15_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Any text following the #endregion directive should be ignored"); + // Section 2.3 Preprocessing + // Any text following the #endregion directive should be ignored Assert.IsTrue(Lexical_TestClass_region_15.testMethod()); } [TestMethod] public void Lexical_lineterm_01_Test() { - OutputHelper.WriteLine("Section 2.4 Lexical Analysis"); - OutputHelper.WriteLine("Test different ways to end a line with semi-colon"); + // Section 2.4 Lexical Analysis + // Test different ways to end a line with semi-colon Assert.IsTrue(Lexical_TestClass_lineterm_01.testMethod()); } [TestMethod] public void Lexical_atkeyword_03_Test() { - OutputHelper.WriteLine("Section 2.4 Lexical Analysis - Keywords"); - OutputHelper.WriteLine("The identifiers @test and test should refer to the same variable"); + // Section 2.4 Lexical Analysis - Keywords + // The identifiers @test and test should refer to the same variable Assert.IsTrue(Lexical_TestClass_atkeyword_03.testMethod()); } [TestMethod] public void Lexical_atkeyword_04_Test() { - OutputHelper.WriteLine("Section 2.4 Lexical Analysis - Keywords"); - OutputHelper.WriteLine("Verify that 'if' can be an identifier using unicode escape sequences as well as an @keyword"); + // Section 2.4 Lexical Analysis - Keywords + // Verify that 'if' can be an identifier using unicode escape sequences as well as an @keyword Assert.IsTrue(Lexical_TestClass_atkeyword_04.testMethod()); } [TestMethod] public void Lexical_atkeyword_05_Test() { - OutputHelper.WriteLine("Section 2.4 Lexical Analysis - Keywords"); - OutputHelper.WriteLine("Verify that prefixing an identifer that is prefixed by a double underscore does not generate warning"); + // Section 2.4 Lexical Analysis - Keywords + // Verify that prefixing an identifer that is prefixed by a double underscore does not generate warning Assert.IsTrue(Lexical_TestClass_atkeyword_05.testMethod()); } [TestMethod] public void Lexical_ident_01_Test() { - OutputHelper.WriteLine("Section 2.4.7 Identifiers"); - OutputHelper.WriteLine("identifier-start-character can be alphabetic"); + // Section 2.4.7 Identifiers + // identifier-start-character can be alphabetic Assert.IsTrue(Lexical_TestClass_ident_01.testMethod()); } [TestMethod] public void Lexical_ident_02_Test() { - OutputHelper.WriteLine("Section 2.4.7 Identifiers"); - OutputHelper.WriteLine("identifier-start-character can be an underscore"); + // Section 2.4.7 Identifiers + // identifier-start-character can be an underscore Assert.IsTrue(Lexical_TestClass_ident_02.testMethod()); } [TestMethod] public void Lexical_ident_03_Test() { - OutputHelper.WriteLine("Section 2.4.7 Identifiers"); - OutputHelper.WriteLine("identifier-part-character can be a number"); + // Section 2.4.7 Identifiers + // identifier-part-character can be a number Assert.IsTrue(Lexical_TestClass_ident_03.testMethod()); } [TestMethod] public void Lexical_ident_04_Test() { - OutputHelper.WriteLine("Section 2.4.7 Identifiers"); - OutputHelper.WriteLine("identifier-part-character can be a number (in the middle)"); + // Section 2.4.7 Identifiers + // identifier-part-character can be a number (in the middle) Assert.IsTrue(Lexical_TestClass_ident_04.testMethod()); } [TestMethod] public void Lexical_ident_05_Test() { - OutputHelper.WriteLine("Section 2.4.2 Identifiers"); - OutputHelper.WriteLine("Identifiers that start with double underscores (__) should not generate a warning/error though it used to"); + // Section 2.4.2 Identifiers + // Identifiers that start with double underscores (__) should not generate a warning/error though it used to Assert.IsTrue(Lexical_TestClass_ident_05.testMethod()); } [TestMethod] public void Lexical_ident_06_Test() { - OutputHelper.WriteLine("Section 2.4.2 Identifiers"); - OutputHelper.WriteLine("Identifiers that have embedded double underscores (__) should generate a warning/error though it used to"); + // Section 2.4.2 Identifiers + // Identifiers that have embedded double underscores (__) should generate a warning/error though it used to Assert.IsTrue(Lexical_TestClass_ident_06.testMethod()); } [TestMethod] public void Lexical_ident_07_Test() { - OutputHelper.WriteLine("Section 2.4.2 Identifiers"); - OutputHelper.WriteLine("Identifiers that end with double underscores (__) should generate a warning/error though it used to"); + // Section 2.4.2 Identifiers + // Identifiers that end with double underscores (__) should generate a warning/error though it used to Assert.IsTrue(Lexical_TestClass_ident_07.testMethod()); } [TestMethod] public void Lexical_nullunicode_01_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("A \\u0000 within comments should not stop compiler from reading to EOF"); + // Section 2.5 Lexical Analysis + // A \\u0000 within comments should not stop compiler from reading to EOF Assert.IsTrue(Lexical_TestClass_nullunicode_01.testMethod()); } [TestMethod] public void Lexical_nullunicode_03_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("A \\u0000 in a string should be equal to \x0000 and \0"); + // Section 2.5 Lexical Analysis + // A \\u0000 in a string should be equal to \x0000 and \0 Assert.IsTrue(Lexical_TestClass_nullunicode_03.testMethod()); } [TestMethod] public void Lexical_nullunicode_04_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("A \\u0000 is ignored if within preprocessor-excluded code"); + // Section 2.5 Lexical Analysis + // A \\u0000 is ignored if within preprocessor-excluded code Assert.IsTrue(Lexical_TestClass_nullunicode_04.testMethod()); } [TestMethod] public void Lexical_unicode_02_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("A simple program that is saved as utf-8 with Notepad compiles and runs correctly."); + // Section 2.5 Lexical Analysis + // A simple program that is saved as utf-8 with Notepad compiles and runs correctly. Assert.IsTrue(Lexical_TestClass_unicode_02.testMethod()); } [TestMethod] public void Lexical_unicode_04_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Displaying a unicode character with OutputHelper.WriteLine(().ToString())"); + // Section 2.5 Lexical Analysis + // Displaying a unicode character with OutputHelper.WriteLine(().ToString()) Assert.IsTrue(Lexical_TestClass_unicode_04.testMethod()); } [TestMethod] public void Lexical_unicode_05_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Displaying a unicode character with OutputHelper.WriteLine(().ToString())"); - OutputHelper.WriteLine("Since the correct language is not installed on my machine, should get a 'QQQ' as output"); + // Section 2.5 Lexical Analysis + // Displaying a unicode character with OutputHelper.WriteLine(().ToString()) + // Since the correct language is not installed on my machine, should get a 'QQQ' as output Assert.IsTrue(Lexical_TestClass_unicode_05.testMethod()); } [TestMethod] public void Lexical_unicode_06_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Identifier whose name is defined with \\uXXXX works correctly (Bug 111180)"); + // Section 2.5 Lexical Analysis + // Identifier whose name is defined with \\uXXXX works correctly (Bug 111180) Assert.IsTrue(Lexical_TestClass_unicode_06.testMethod()); } [TestMethod] public void Lexical_unicode_07_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Identifier whose name starts with \\uXXXX works correctly"); + // Section 2.5 Lexical Analysis + // Identifier whose name starts with \\uXXXX works correctly Assert.IsTrue(Lexical_TestClass_unicode_07.testMethod()); } [TestMethod] public void Lexical_unicode_08_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Identifier whose name has a \\uXXXX in the middle of it works correctly"); + // Section 2.5 Lexical Analysis + // Identifier whose name has a \\uXXXX in the middle of it works correctly Assert.IsTrue(Lexical_TestClass_unicode_08.testMethod()); } [TestMethod] public void Lexical_unicode_09_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Identifier whose name ends with a \\uXXXX works correctly "); + // Section 2.5 Lexical Analysis + // Identifier whose name ends with a \\uXXXX works correctly Assert.IsTrue(Lexical_TestClass_unicode_09.testMethod()); } [TestMethod] public void Lexical_unicode_10_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Unicode escape sequence to start preprocessor identifier"); - OutputHelper.WriteLine("Bug #33538 - Fixed"); + // Section 2.5 Lexical Analysis + // Unicode escape sequence to start preprocessor identifier + // Bug #33538 - Fixed Assert.IsTrue(Lexical_TestClass_unicode_10.testMethod()); } [TestMethod] public void Lexical_unicode_11_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Unicode escape sequence to start preprocessor identifier"); - OutputHelper.WriteLine("Bug #33538 - Fixed"); + // Section 2.5 Lexical Analysis + // Unicode escape sequence to start preprocessor identifier + // Bug #33538 - Fixed Assert.IsTrue(Lexical_TestClass_unicode_11.testMethod()); } [TestMethod] public void Lexical_unicode_12_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Unicode escape sequence to start preprocessor identifier"); - OutputHelper.WriteLine("Bug #33538 - Fixed"); + // Section 2.5 Lexical Analysis + // Unicode escape sequence to start preprocessor identifier + // Bug #33538 - Fixed Assert.IsTrue(Lexical_TestClass_unicode_12.testMethod()); } [TestMethod] public void Lexical_unicode_13_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Unicode escape sequence in middle of a #define (#de\\u0066ine)"); - OutputHelper.WriteLine("Bug #33538 - Fixed"); + // Section 2.5 Lexical Analysis + // Unicode escape sequence in middle of a #define (#de\\u0066ine) + // Bug #33538 - Fixed Assert.IsTrue(Lexical_TestClass_unicode_13.testMethod()); } [TestMethod] public void Lexical_unicode_17_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("The literal \\u0000 should not be interpreted as a unicode escape sequence"); + // Section 2.5 Lexical Analysis + // The literal \\u0000 should not be interpreted as a unicode escape sequence Assert.IsTrue(Lexical_TestClass_unicode_17.testMethod()); } [TestMethod] public void Lexical_uni8digit_01_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Identifier whose name is defined with \\uXXXXXXXX works correctly"); + // Section 2.5 Lexical Analysis + // Identifier whose name is defined with \\uXXXXXXXX works correctly Assert.IsTrue(Lexical_TestClass_uni8digit_01.testMethod()); } [TestMethod] public void Lexical_uni8digit_02_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Using OutputHelper.WriteLine with \\uXXXXXXXX works correctly"); + // Section 2.5 Lexical Analysis + // Using OutputHelper.WriteLine with \\uXXXXXXXX works correctly Assert.IsTrue(Lexical_TestClass_uni8digit_02.testMethod()); } [TestMethod] public void Lexical_uni8digit_03_Test() { - OutputHelper.WriteLine("Section 2.5 Lexical Analysis"); - OutputHelper.WriteLine("Verify valid boundaries of values for \\uXXXXXXXX work correctly"); + // Section 2.5 Lexical Analysis + // Verify valid boundaries of values for \\uXXXXXXXX work correctly Assert.IsTrue(Lexical_TestClass_uni8digit_03.testMethod()); } [TestMethod] public void Lexical_atstrings_01_Test() { - OutputHelper.WriteLine("Back-Quoted String Test"); - OutputHelper.WriteLine("Newlines should be valid within @-quoted string literals"); + // Back-Quoted String Test + // Newlines should be valid within @-quoted string literals Assert.IsTrue(Lexical_TestClass_atstrings_01.testMethod()); } [TestMethod] public void Lexical_atstrings_02_Test() { - OutputHelper.WriteLine("Back-Quoted String Test"); - OutputHelper.WriteLine("Unicode escape sequences are not processed within @-quoted string literals"); + // Back-Quoted String Test + // Unicode escape sequences are not processed within @-quoted string literals Assert.IsTrue(Lexical_TestClass_atstrings_02.testMethod()); } [TestMethod] public void Lexical_atstrings_03_Test() { - OutputHelper.WriteLine("Back-Quoted String Test"); - OutputHelper.WriteLine("Slash escape sequences are not processed within @-quoted string literals"); + // Back-Quoted String Test + // Slash escape sequences are not processed within @-quoted string literals Assert.IsTrue(Lexical_TestClass_atstrings_03.testMethod()); } [TestMethod] public void Lexical_atstrings_04_Test() { - OutputHelper.WriteLine("Back-Quoted String Test"); - OutputHelper.WriteLine("Passing @-quoted strings to OutputHelper.WriteLine(().ToString()) should work"); + // Back-Quoted String Test + // Passing @-quoted strings to OutputHelper.WriteLine(().ToString()) should work Assert.IsTrue(Lexical_TestClass_atstrings_04.testMethod()); } [TestMethod] public void Lexical_mscombo_01_Test() { - OutputHelper.WriteLine("XML Doc Test (Just lexical tests, no output validation)"); - OutputHelper.WriteLine("Combination of multi and single line xml doc comments"); + // XML Doc Test (Just lexical tests, no output validation) + // Combination of multi and single line xml doc comments Assert.IsTrue(Lexical_TestClass_mscombo_01.testMethod()); } [TestMethod] public void Lexical_mscombo_05_Test() { - OutputHelper.WriteLine("XML Doc Test (Just lexical tests, no output validation)"); - OutputHelper.WriteLine("Combination of multi and single line xml doc comments"); + // XML Doc Test (Just lexical tests, no output validation) + // Combination of multi and single line xml doc comments Assert.IsTrue(Lexical_TestClass_mscombo_05.testMethod()); } @@ -1560,9 +1560,9 @@ class Lexical_TestClass_preproc_30 public static void Main_old(String[] args) { #if TEST - OutputHelper.WriteLine("Bad"); + // Bad #else - OutputHelper.WriteLine("Good"); + // Good #endif } public static bool testMethod() @@ -1578,7 +1578,7 @@ public static void Main_old(String[] args) #if foo this code should be completely skipped #else - OutputHelper.WriteLine("Else triggered"); + // Else triggered #endif } public static bool testMethod() @@ -1679,7 +1679,7 @@ public class Lexical_TestClass_region_01 public static void Main_old() { #region - OutputHelper.WriteLine("This works!"); + // This works! #endregion } public static bool testMethod() @@ -1693,7 +1693,7 @@ public class Lexical_TestClass_region_02 public static void Main_old() { #region This is the banner text - OutputHelper.WriteLine("This works!"); + // This works! #endregion } public static bool testMethod() @@ -1707,11 +1707,11 @@ public class Lexical_TestClass_region_05 public static void Main_old() { #region - OutputHelper.WriteLine("1"); + // 1 #region - OutputHelper.WriteLine("2"); + // 2 #endregion - OutputHelper.WriteLine("3"); + // 3 #endregion } public static bool testMethod() @@ -1725,23 +1725,23 @@ public class Lexical_TestClass_region_06 public static void Main_old() { #region - OutputHelper.WriteLine("1"); + // 1 #region - OutputHelper.WriteLine("2"); + // 2 #region - OutputHelper.WriteLine("3"); + // 3 #region - OutputHelper.WriteLine("4"); + // 4 #region - OutputHelper.WriteLine("5"); + // 5 #endregion - OutputHelper.WriteLine("6"); + // 6 #endregion - OutputHelper.WriteLine("7"); + // 7 #endregion - OutputHelper.WriteLine("8"); + // 8 #endregion - OutputHelper.WriteLine("9"); + // 9 #endregion } public static bool testMethod() @@ -1755,15 +1755,15 @@ public class Lexical_TestClass_region_07 public static void Main_old() { #region - OutputHelper.WriteLine("1"); + // 1 #region - OutputHelper.WriteLine("2"); + // 2 #endregion - OutputHelper.WriteLine("3"); + // 3 #region - OutputHelper.WriteLine("4"); + // 4 #endregion - OutputHelper.WriteLine("5"); + // 5 #endregion } public static bool testMethod() @@ -1777,7 +1777,7 @@ public class Lexical_TestClass_region_10 public static void Main_old() { #region "This is the banner text" - OutputHelper.WriteLine("This works!"); + // This works! #endregion } public static bool testMethod() @@ -1791,7 +1791,7 @@ public class Lexical_TestClass_region_11 public static void Main_old() { #region // This is a single-line comment - OutputHelper.WriteLine("This works!"); + // This works! #endregion } public static bool testMethod() @@ -1805,7 +1805,7 @@ public class Lexical_TestClass_region_12 public static void Main_old() { #region - OutputHelper.WriteLine("This works!"); + // This works! #endregion // This is a single-line comment } public static bool testMethod() @@ -1823,7 +1823,7 @@ public class Lexical_TestClass_region_15 public static void Main_old() { #region - OutputHelper.WriteLine("This works!"); + // This works! #endregion This text should be ignored } public static bool testMethod() @@ -1836,8 +1836,8 @@ class Lexical_TestClass_lineterm_01 { public static void Main_old(String[] args) { - OutputHelper.WriteLine("1"); // normal - OutputHelper.WriteLine("2"); // space between + // 1 // normal + // 2 // space between OutputHelper.WriteLine("3") ; // ; on the next line OutputHelper.WriteLine("4") @@ -2003,7 +2003,7 @@ public static void Main_old() { // This should not stop the compiler from moving on \u0000 - OutputHelper.WriteLine("Worked"); + // Worked } public static bool testMethod() { @@ -2053,7 +2053,7 @@ class Lexical_TestClass_unicode_02 { public static void Main_old() { - OutputHelper.WriteLine("Worked!"); + // Worked! } public static bool testMethod() { @@ -2069,7 +2069,7 @@ class Lexical_TestClass_unicode_04 { public static void Main_old() { - OutputHelper.WriteLine("\u0057"); + // \u0057 } public static bool testMethod() { @@ -2081,7 +2081,7 @@ class Lexical_TestClass_unicode_05 { public static void Main_old() { - OutputHelper.WriteLine("\u0701"); + // \u0701 } public static bool testMethod() { @@ -2182,7 +2182,7 @@ class Lexical_TestClass_uni8digit_02 { static void Main_old() { - OutputHelper.WriteLine("\U00000057ash"); + // \U00000057ash } public static bool testMethod() { @@ -2293,7 +2293,7 @@ class Lexical_TestClass_unicode_10 public static void Main_old() { #if foobar2 - OutputHelper.WriteLine("Worked!"); + // Worked! #endif } public static bool testMethod() @@ -2307,7 +2307,7 @@ class Lexical_TestClass_unicode_11 public static void Main_old() { #if middlefoobar - OutputHelper.WriteLine("Worked!"); + // Worked! #endif } public static bool testMethod() @@ -2321,7 +2321,7 @@ class Lexical_TestClass_unicode_12 public static void Main_old() { #if endf - OutputHelper.WriteLine("Worked!"); + // Worked! #endif } public static bool testMethod() @@ -2335,7 +2335,7 @@ class Lexical_TestClass_unicode_13 public static void Main_old() { #if endf2 - OutputHelper.WriteLine("Worked!"); + // Worked! #endif } public static bool testMethod() diff --git a/Tests/NFUnitTestLexical/UnitTestLexicalTest2.cs b/Tests/NFUnitTestLexical/UnitTestLexicalTest2.cs index dfe685a9..1387cd1f 100644 --- a/Tests/NFUnitTestLexical/UnitTestLexicalTest2.cs +++ b/Tests/NFUnitTestLexical/UnitTestLexicalTest2.cs @@ -73,175 +73,175 @@ class UnitTestLexicalTest2 [TestMethod] public void Lexical_pre_009_Test() { - OutputHelper.WriteLine("Section 2.3Preprocessing"); - OutputHelper.WriteLine("Verify #define and #undef"); + // Section 2.3Preprocessing + // Verify #define and #undef Assert.IsTrue(Lexical_TestClass_pre_009.testMethod()); } [TestMethod] public void Lexical_pre_012_Test() { - OutputHelper.WriteLine("Section 2.3Preprocessing"); - OutputHelper.WriteLine("Verify #if operators and parens"); + // Section 2.3Preprocessing + // Verify #if operators and parens Assert.IsTrue(Lexical_TestClass_pre_012.testMethod()); } [TestMethod] public void Lexical_pre_013_Test() { - OutputHelper.WriteLine("Section 2.3Preprocessing"); - OutputHelper.WriteLine("Verify # commands with comments"); + // Section 2.3Preprocessing + // Verify # commands with comments Assert.IsTrue(Lexical_TestClass_pre_013.testMethod()); } [TestMethod] public void Lexical_preproc_03_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#define/#undef - verify #define works"); + // Section 2.3 Preprocessing + // #define/#undef - verify #define works Assert.IsTrue(Lexical_TestClass_preproc_03.testMethod()); } [TestMethod] public void Lexical_preproc_04_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("#define/#undef - verify #undef works"); + // Section 2.3 Preprocessing + // #define/#undef - verify #undef works Assert.IsTrue(Lexical_TestClass_preproc_04.testMethod()); } [TestMethod] public void Lexical_preproc_05_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Exact example used in spec definition - 2.3.1"); + // Section 2.3 Preprocessing + // Exact example used in spec definition - 2.3.1 Assert.IsTrue(Lexical_TestClass_preproc_05.testMethod()); } [TestMethod] public void Lexical_preproc_06_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Using #undef on a non-existing identifier compiles fine"); + // Section 2.3 Preprocessing + // Using #undef on a non-existing identifier compiles fine Assert.IsTrue(Lexical_TestClass_preproc_06.testMethod()); } [TestMethod] public void Lexical_preproc_07_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Nested #if's"); + // Section 2.3 Preprocessing + // Nested #if's Assert.IsTrue(Lexical_TestClass_preproc_07.testMethod()); } [TestMethod] public void Lexical_preproc_15_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the ! operator on #identifiers"); + // Section 2.3 Preprocessing + // Verify the ! operator on #identifiers Assert.IsTrue(Lexical_TestClass_preproc_15.testMethod()); } [TestMethod] public void Lexical_preproc_16_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the ! operator on #identifiers with parenthesis"); + // Section 2.3 Preprocessing + // Verify the ! operator on #identifiers with parenthesis Assert.IsTrue(Lexical_TestClass_preproc_16.testMethod()); } [TestMethod] public void Lexical_preproc_17_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the double ampersand operator works"); + // Section 2.3 Preprocessing + // Verify the double ampersand operator works Assert.IsTrue(Lexical_TestClass_preproc_17.testMethod()); } [TestMethod] public void Lexical_preproc_18_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the double ampersand operator works with parentheses"); + // Section 2.3 Preprocessing + // Verify the double ampersand operator works with parentheses Assert.IsTrue(Lexical_TestClass_preproc_18.testMethod()); } [TestMethod] public void Lexical_preproc_19_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the || operator works "); + // Section 2.3 Preprocessing + // Verify the || operator works Assert.IsTrue(Lexical_TestClass_preproc_19.testMethod()); } [TestMethod] public void Lexical_preproc_20_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the || operator works with parentheses"); + // Section 2.3 Preprocessing + // Verify the || operator works with parentheses Assert.IsTrue(Lexical_TestClass_preproc_20.testMethod()); } [TestMethod] public void Lexical_preproc_21_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the == operator works with/without parentheses"); + // Section 2.3 Preprocessing + // Verify the == operator works with/without parentheses Assert.IsTrue(Lexical_TestClass_preproc_21.testMethod()); } [TestMethod] public void Lexical_preproc_22_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the != operator works with/without parentheses"); + // Section 2.3 Preprocessing + // Verify the != operator works with/without parentheses Assert.IsTrue(Lexical_TestClass_preproc_22.testMethod()); } [TestMethod] public void Lexical_preproc_23_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Grouping operators: ! double ampersand || != == true false"); + // Section 2.3 Preprocessing + // Grouping operators: ! double ampersand || != == true false Assert.IsTrue(Lexical_TestClass_preproc_23.testMethod()); } [TestMethod] public void Lexical_preproc_24_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verifying comments and #preprocessor items"); + // Section 2.3 Preprocessing + // Verifying comments and #preprocessor items Assert.IsTrue(Lexical_TestClass_preproc_24.testMethod()); } [TestMethod] public void Lexical_preproc_25_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verifying comments and #preprocessor items"); + // Section 2.3 Preprocessing + // Verifying comments and #preprocessor items Assert.IsTrue(Lexical_TestClass_preproc_25.testMethod()); } [TestMethod] public void Lexical_preproc_31_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verifying comments and #preprocessor items"); + // Section 2.3 Preprocessing + // Verifying comments and #preprocessor items Assert.IsTrue(Lexical_TestClass_preproc_31.testMethod()); } [TestMethod] public void Lexical_preproc_32_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify the usage of #elif"); + // Section 2.3 Preprocessing + // Verify the usage of #elif Assert.IsTrue(Lexical_TestClass_preproc_32.testMethod()); } [TestMethod] public void Lexical_preproc_39_Test() { - OutputHelper.WriteLine("Section 2.3 Preprocessing"); - OutputHelper.WriteLine("Verify that a # keyword (i.e. for) can be used as a #preprocessor identifier"); + // Section 2.3 Preprocessing + // Verify that a # keyword (i.e. for) can be used as a #preprocessor identifier Assert.IsTrue(Lexical_TestClass_preproc_39.testMethod()); } @@ -322,11 +322,11 @@ public class Lexical_TestClass_preproc_03 { public static void Main_old(String[] args) { - OutputHelper.WriteLine("Starting!"); + // Starting! #if TESTDEF - OutputHelper.WriteLine("Good"); + // Good #else - OutputHelper.WriteLine("Bad"); + // Bad #endif } public static bool testMethod() @@ -340,16 +340,16 @@ public class Lexical_TestClass_preproc_04 { public static void Main_old(String[] args) { - OutputHelper.WriteLine("Starting!"); + // Starting! #if TESTDEF3 - OutputHelper.WriteLine("TESTDEF3 is defined"); + // TESTDEF3 is defined #else - OutputHelper.WriteLine("TESTDEF3 is not defined"); + // TESTDEF3 is not defined #endif #if TESTDEF2 - OutputHelper.WriteLine("TESTDEF2 is defined"); + // TESTDEF2 is defined #else - OutputHelper.WriteLine("TESTDEF2 not defined"); + // TESTDEF2 not defined #endif } public static bool testMethod() @@ -389,13 +389,13 @@ class Lexical_TestClass_preproc_07 { public static void Main_old(String[] args) { - OutputHelper.WriteLine("Starting:"); + // Starting: #if FOO3 - OutputHelper.WriteLine("Inside FOO"); + // Inside FOO #if BAR3 - OutputHelper.WriteLine("Inside BAR"); + // Inside BAR #else - OutputHelper.WriteLine("Inside BAR's else"); + // Inside BAR's else #endif #endif } @@ -410,9 +410,9 @@ class Lexical_TestClass_preproc_15 public static void Main_old(String[] args) { #if !TEST - OutputHelper.WriteLine("Problem"); + // Problem #else - OutputHelper.WriteLine("Good"); + // Good #endif } public static bool testMethod() @@ -427,9 +427,9 @@ class Lexical_TestClass_preproc_16 public static void Main_old(String[] args) { #if !(TEST) - OutputHelper.WriteLine("Problem"); + // Problem #else - OutputHelper.WriteLine("Good"); + // Good #endif } public static bool testMethod() @@ -444,10 +444,10 @@ class Lexical_TestClass_preproc_17 public static void Main_old(String[] args) { #if TEST && TEST2 - OutputHelper.WriteLine("Good"); + // Good #endif #if TEST && TEST3 - OutputHelper.WriteLine("Problem"); + // Problem #endif } public static bool testMethod() @@ -461,10 +461,10 @@ class Lexical_TestClass_preproc_18 public static void Main_old(String[] args) { #if (TEST && TEST2) - OutputHelper.WriteLine("Good"); + // Good #endif #if (TEST && TEST3) - OutputHelper.WriteLine("Problem"); + // Problem #endif } public static bool testMethod() @@ -478,13 +478,13 @@ class Lexical_TestClass_preproc_19 public static void Main_old(String[] args) { #if TEST || TEST2 - OutputHelper.WriteLine("Good"); + // Good #endif #if TEST3 || TEST2 - OutputHelper.WriteLine("Good"); + // Good #endif #if TEST3 || TEST4 - OutputHelper.WriteLine("Problem"); + // Problem #endif } public static bool testMethod() @@ -498,13 +498,13 @@ class Lexical_TestClass_preproc_20 public static void Main_old(String[] args) { #if (TEST || TEST2) - OutputHelper.WriteLine("Good"); + // Good #endif #if (TEST3 || TEST2) - OutputHelper.WriteLine("Good"); + // Good #endif #if (TEST3 || TEST4) - OutputHelper.WriteLine("Problem"); + // Problem #endif } public static bool testMethod() @@ -518,19 +518,19 @@ class Lexical_TestClass_preproc_21 public static void Main_old(String[] args) { #if TEST == TEST2 - OutputHelper.WriteLine("Good"); + // Good #endif #if (TEST == TEST2) - OutputHelper.WriteLine("Good"); + // Good #endif #if TEST==TEST2 - OutputHelper.WriteLine("Good"); + // Good #endif #if (TEST == TEST3) - OutputHelper.WriteLine("Bad"); + // Bad #endif #if TEST3 == TEST - OutputHelper.WriteLine("Bad"); + // Bad #endif } public static bool testMethod() @@ -544,22 +544,22 @@ class Lexical_TestClass_preproc_22 public static void Main_old(String[] args) { #if TEST != TEST2 - OutputHelper.WriteLine("Bad"); + // Bad #endif #if (TEST != TEST2) - OutputHelper.WriteLine("Bad"); + // Bad #endif #if TEST!=TEST2 - OutputHelper.WriteLine("Bad"); + // Bad #endif #if (TEST != TEST3) - OutputHelper.WriteLine("Good"); + // Good #endif #if TEST3 != TEST - OutputHelper.WriteLine("Good"); + // Good #endif #if TEST3!=TEST - OutputHelper.WriteLine("Good"); + // Good #endif } public static bool testMethod() @@ -573,19 +573,19 @@ class Lexical_TestClass_preproc_23 public static void Main_old(String[] args) { #if (TEST && TEST2) || (TEST3 || TEST4) - OutputHelper.WriteLine("1 - Good"); + // 1 - Good #endif #if (TEST3 == TEST4) || (TEST == TEST2) - OutputHelper.WriteLine("2 - Good"); + // 2 - Good #endif #if (TEST != TEST3) && (TEST2 != TEST4) - OutputHelper.WriteLine("3 - Good"); + // 3 - Good #endif #if (! TEST4) && (TEST2 == TEST) - OutputHelper.WriteLine("4 - Good"); + // 4 - Good #endif #if (TEST == true) && (TEST2 != false) - OutputHelper.WriteLine("5 - Good"); + // 5 - Good #endif } public static bool testMethod() @@ -599,7 +599,7 @@ class Lexical_TestClass_preproc_24 public static void Main_old(String[] args) { #if TEST - OutputHelper.WriteLine("Good"); + // Good #endif } public static bool testMethod() @@ -613,7 +613,7 @@ class Lexical_TestClass_preproc_25 public static void Main_old(String[] args) { #if TEST - OutputHelper.WriteLine("Good"); + // Good #endif } public static bool testMethod() @@ -627,9 +627,9 @@ class Lexical_TestClass_preproc_31 public static void Main_old(String[] args) { #if TEST - OutputHelper.WriteLine("Bad"); + // Bad #else - OutputHelper.WriteLine("Good"); + // Good #endif } public static bool testMethod() @@ -643,9 +643,9 @@ class Lexical_TestClass_preproc_32 public static void Main_old(String[] args) { #if TEST3 - OutputHelper.WriteLine("Bad"); + // Bad #elif TEST2 && TEST - OutputHelper.WriteLine("Good"); + // Good #endif } public static bool testMethod() diff --git a/Tests/NFUnitTestNamespace/UnitTestNamespaceTests.cs b/Tests/NFUnitTestNamespace/UnitTestNamespaceTests.cs index 2e38e5fe..06ccae15 100644 --- a/Tests/NFUnitTestNamespace/UnitTestNamespaceTests.cs +++ b/Tests/NFUnitTestNamespace/UnitTestNamespaceTests.cs @@ -19,377 +19,377 @@ public class UnitTestNamespaceTests [TestMethod] public void NS_attribute_01_Test() { - OutputHelper.WriteLine("Section 9.1 Compilation Units"); - OutputHelper.WriteLine("Verify that the CLSCompliant attribute is allowed at the assembly level in a comp. unit"); + // Section 9.1 Compilation Units + // Verify that the CLSCompliant attribute is allowed at the assembly level in a comp. unit Assert.IsTrue(NS_TestClass_attribute_01.testMethod()); } [TestMethod] public void NS_attribute_02_Test() { - OutputHelper.WriteLine("Section 9.1 Compilation Units"); - OutputHelper.WriteLine("Verify that the CLSCompliant attribute is allowed at the module level in a comp. unit (cause a warning)"); + // Section 9.1 Compilation Units + // Verify that the CLSCompliant attribute is allowed at the module level in a comp. unit (cause a warning) Assert.IsTrue(NS_TestClass_attribute_02.testMethod()) ; } [TestMethod] public void NS_compunit_01_Test() { - OutputHelper.WriteLine("Section 9.1 Compilation Units"); - OutputHelper.WriteLine("Verify that a program with multiple files depending on each other works"); + // Section 9.1 Compilation Units + // Verify that a program with multiple files depending on each other works Assert.IsTrue(NS_TestClass_compunit_01.testMethod()) ; } [TestMethod] public void NS_compunit_03_Test() { - OutputHelper.WriteLine("Section 9.1 Compilation Units"); - OutputHelper.WriteLine("Verify three source files all requiring each other in circular fashion compiles/runs successfully"); + // Section 9.1 Compilation Units + // Verify three source files all requiring each other in circular fashion compiles/runs successfully Assert.IsTrue(NS_TestClass_compunit_03.testMethod()); } [TestMethod] public void NS_compunit_04_Test() { - OutputHelper.WriteLine("Section 9.1 Compilation Units"); - OutputHelper.WriteLine("Two source files with their own namespaces, each have a class named A, and can be used successfully by a third file"); + // Section 9.1 Compilation Units + // Two source files with their own namespaces, each have a class named A, and can be used successfully by a third file Assert.IsTrue(NS_TestClass_compunit_04.testMethod()); } [TestMethod] public void NS_decl_01_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Declare the simplest namespace possible (without semi-colon at the end)"); + // Section 9.2 Namespace Declarations + // Declare the simplest namespace possible (without semi-colon at the end) Assert.IsTrue(NS_TestClass_decl_01.A.testMethod()); } [TestMethod] public void NS_decl_02_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Declare the simplest namespace possible (with semi-colon at the end)"); + // Section 9.2 Namespace Declarations + // Declare the simplest namespace possible (with semi-colon at the end) Assert.IsTrue(NS_TestClass_decl_02.A.testMethod()); } [TestMethod] public void NS_decl_03_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Declare a namespace inside another namespace"); + // Section 9.2 Namespace Declarations + // Declare a namespace inside another namespace Assert.IsTrue(NS_TestClass_decl_03.A.testMethod()); } [TestMethod] public void NS_decl_04_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Declare a namespace inside another namespace (with semicolon at end of nested ns decl)"); + // Section 9.2 Namespace Declarations + // Declare a namespace inside another namespace (with semicolon at end of nested ns decl) Assert.IsTrue(NS_TestClass_decl_04.A.testMethod()); } [TestMethod] public void NS_decl_05_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Two separately declared namespaces in one compilation unit (file)"); + // Section 9.2 Namespace Declarations + // Two separately declared namespaces in one compilation unit (file) Assert.IsTrue(NS_TestClass_decl_05.A.testMethod()); } [TestMethod] public void NS_decl_06_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Two separately declared namespaces in one compilation unit (file)"); + // Section 9.2 Namespace Declarations + // Two separately declared namespaces in one compilation unit (file) Assert.IsTrue(NS_TestClass_decl_06.A.testMethod()); } [TestMethod] public void NS_decl_08_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Access class member declared in external namespace directly when adding a Using"); + // Section 9.2 Namespace Declarations + // Access class member declared in external namespace directly when adding a Using Assert.IsTrue(NS_TestClass_decl_08.A.testMethod()); } [TestMethod] public void NS_decl_10_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Namespace identifier with . in it"); + // Section 9.2 Namespace Declarations + // Namespace identifier with . in it Assert.IsTrue(NS_TestClass_decl_10.foo.A.testMethod()); } [TestMethod] public void NS_decl_11_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Namespace identifier with .'s in it and underscores, etc."); + // Section 9.2 Namespace Declarations + // Namespace identifier with .'s in it and underscores, etc. Assert.IsTrue(NS_TestClass_decl_11.foo.A.testMethod()); } [TestMethod] public void NS_decl_12_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Two separate namespace declarations contribute to same declaration space (with using)"); + // Section 9.2 Namespace Declarations + // Two separate namespace declarations contribute to same declaration space (with using) Assert.IsTrue(NS_TestClass_decl_12.foo.A.testMethod()); } [TestMethod] public void NS_decl_13_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Two separate namespace declarations contribute to same declaration space (direct referencing)"); + // Section 9.2 Namespace Declarations + // Two separate namespace declarations contribute to same declaration space (direct referencing) Assert.IsTrue(NS_TestClass_decl_13.foo.A.testMethod()); } [TestMethod] public void NS_decl_14_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Two separate namespace declarations contribute to same declaration space (direct referencing)"); - OutputHelper.WriteLine(" namespace declarations are in two different compilation units (files)"); + // Section 9.2 Namespace Declarations + // Two separate namespace declarations contribute to same declaration space (direct referencing) + // namespace declarations are in two different compilation units (files) Assert.IsTrue(NS_TestClass_decl_14.foo.A.testMethod()); } [TestMethod] public void NS_decl_15_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Two separate namespace declarations contribute to same declaration space (with using)"); - OutputHelper.WriteLine(" namespace declarations are in two different compilation units (files)"); + // Section 9.2 Namespace Declarations + // Two separate namespace declarations contribute to same declaration space (with using) + // namespace declarations are in two different compilation units (files) Assert.IsTrue(NS_TestClass_decl_15.foo.A.testMethod()); } [TestMethod] public void NS_decl_17_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Declare a namespace called _Foo"); + // Section 9.2 Namespace Declarations + // Declare a namespace called _Foo Assert.IsTrue(NS_TestClass_decl_17.main.testMethod()); } [TestMethod] public void NS_decl_20_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Declare an empty namespace"); + // Section 9.2 Namespace Declarations + // Declare an empty namespace Assert.IsTrue(NS_TestClass_decl_20.main.testMethod()); } [TestMethod] public void NS_decl_21_Test() { - OutputHelper.WriteLine("Section 9.2 Namespace Declarations"); - OutputHelper.WriteLine("Declare ten empty nested namespaces (with and without semi-colons)"); + // Section 9.2 Namespace Declarations + // Declare ten empty nested namespaces (with and without semi-colons) Assert.IsTrue(NS_TestClass_decl_21.main.testMethod()); } [TestMethod] public void NS_alias_01_Test() { - OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); - OutputHelper.WriteLine("Verify simplest form of alias reference to a namespace"); + // Section 9.3.1 Using alias directives + // Verify simplest form of alias reference to a namespace Assert.IsTrue(NS_TestClass_alias_01.A.testMethod()); } [TestMethod] public void NS_alias_02_Test() { - OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); - OutputHelper.WriteLine("Verify simplest form of alias reference to a namespace with .'s"); + // Section 9.3.1 Using alias directives + // Verify simplest form of alias reference to a namespace with .'s Assert.IsTrue(NS_TestClass_alias_02.A.testMethod()); } [TestMethod] public void NS_alias_03_Test() { - OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); - OutputHelper.WriteLine("Verify simplest form of alias reference to a specific type in a namespace"); + // Section 9.3.1 Using alias directives + // Verify simplest form of alias reference to a specific type in a namespace Assert.IsTrue(NS_TestClass_alias_03.A.testMethod()); } [TestMethod] public void NS_alias_04_Test() { - OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); - OutputHelper.WriteLine("Verify simplest form of alias reference to a specific type in a namespace"); + // Section 9.3.1 Using alias directives + // Verify simplest form of alias reference to a specific type in a namespace Assert.IsTrue(NS_TestClass_alias_04.B.testMethod()); } [TestMethod] public void NS_alias_10_Test() { - OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); - OutputHelper.WriteLine("Third code example in 9.3.1 - unique alias identifiers"); + // Section 9.3.1 Using alias directives + // Third code example in 9.3.1 - unique alias identifiers Assert.IsTrue(NS_TestClass_alias_10.main.testMethod()); } [TestMethod] public void NS_alias_13_Test() { - OutputHelper.WriteLine("Section 9.3.1 Using alias directives "); - OutputHelper.WriteLine("A using-alias-directive can create an alias for the namespace in which it appears"); + // Section 9.3.1 Using alias directives + // A using-alias-directive can create an alias for the namespace in which it appears Assert.IsTrue(NS_TestClass_alias_13.main.testMethod()); } [TestMethod] public void NS_alias_14_Test() { - OutputHelper.WriteLine("Section 9.3.1 Using namespace directives "); - OutputHelper.WriteLine("A using-alias-directive can create an alias for a type declared within the ns in which it appears "); + // Section 9.3.1 Using namespace directives + // A using-alias-directive can create an alias for a type declared within the ns in which it appears Assert.IsTrue(NS_TestClass_alias_14.main.testMethod()); } [TestMethod] public void NS_direct_01_Test() { - OutputHelper.WriteLine("Section 9.3.2 Using namespace directives "); - OutputHelper.WriteLine("The members of a namespace can be accessed directly post using "); + // Section 9.3.2 Using namespace directives + // The members of a namespace can be accessed directly post using Assert.IsTrue(NS_TestClass_direct_01.main.testMethod()); } [TestMethod] public void NS_direct_02_Test() { - OutputHelper.WriteLine("Section 9.3.2 Using namespace directives "); - OutputHelper.WriteLine("A newly declared class will hide a class (with the same name) brought in with a using directive"); + // Section 9.3.2 Using namespace directives + // A newly declared class will hide a class (with the same name) brought in with a using directive Assert.IsTrue(NS_TestClass_direct_02.main.testMethod()); } [TestMethod] public void NS_direct_03_Test() { - OutputHelper.WriteLine("Section 9.3.2 Using namespace directives "); - OutputHelper.WriteLine("Names imported by using-namespace-directive are hidden by same-named members "); + // Section 9.3.2 Using namespace directives + // Names imported by using-namespace-directive are hidden by same-named members Assert.IsTrue(NS_TestClass_direct_03.main.testMethod()); } [TestMethod] public void NS_direct_05_Test() { - OutputHelper.WriteLine("Section 9.3.2 Using namespace directives "); - OutputHelper.WriteLine("Ambiguous reference is overridden by using alias statement"); + // Section 9.3.2 Using namespace directives + // Ambiguous reference is overridden by using alias statement Assert.IsTrue(NS_TestClass_direct_05.main.testMethod()); } [TestMethod] public void NS_typedecl_01_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Ambiguous reference is overridden by using alias statement"); + // Section 9.5 Type declarations + // Ambiguous reference is overridden by using alias statement Assert.IsTrue(NS_TestClass_typedecl_01.testMethod()); } [TestMethod] public void NS_typedecl_06_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Declaring a class member as public is okay"); + // Section 9.5 Type declarations + // Declaring a class member as public is okay Assert.IsTrue(NS_TestClass_typedecl_06.testMethod()); } [TestMethod] public void NS_typedecl_07_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Declaring a class member as protected internal is okay"); + // Section 9.5 Type declarations + // Declaring a class member as protected internal is okay Assert.IsTrue(NS_TestClass_typedecl_07.testMethod()); } [TestMethod] public void NS_typedecl_08_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Declaring a class member as protected is okay"); + // Section 9.5 Type declarations + // Declaring a class member as protected is okay Assert.IsTrue(NS_TestClass_typedecl_08.testMethod()); } [TestMethod] public void NS_typedecl_09_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Declaring a class member as internal is okay"); + // Section 9.5 Type declarations + // Declaring a class member as internal is okay Assert.IsTrue(NS_TestClass_typedecl_09.testMethod()); } [TestMethod] public void NS_typedecl_10_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Declaring a class member as private is okay"); + // Section 9.5 Type declarations + // Declaring a class member as private is okay Assert.IsTrue(NS_TestClass_typedecl_10.testMethod()); } [TestMethod] public void NS_typedecl_11_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Declaring a struct member as public is okay"); + // Section 9.5 Type declarations + // Declaring a struct member as public is okay Assert.IsTrue(NS_TestClass_typedecl_11.testMethod()); } [TestMethod] public void NS_typedecl_12_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Declaring a struct member as internal is okay"); + // Section 9.5 Type declarations + // Declaring a struct member as internal is okay Assert.IsTrue(NS_TestClass_typedecl_12.testMethod()); } [TestMethod] public void NS_typedecl_13_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Declaring a struct member as private is okay"); + // Section 9.5 Type declarations + // Declaring a struct member as private is okay Assert.IsTrue(NS_TestClass_typedecl_13.testMethod()); } [TestMethod] public void NS_validaccess_01_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Verify all valid accessibility levels for class declarations are allowed"); + // Section 9.5 Type declarations + // Verify all valid accessibility levels for class declarations are allowed Assert.IsTrue(NS_TestClass_validaccess_01.testMethod()); } [TestMethod] public void NS_validaccess_02_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Verify all valid accessibility levels for struct declarations are allowed"); + // Section 9.5 Type declarations + // Verify all valid accessibility levels for struct declarations are allowed Assert.IsTrue(NS_TestClass_validaccess_02.testMethod()); } [TestMethod] public void NS_validaccess_03_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Verify all valid accessibility levels for interface declarations are allowed"); + // Section 9.5 Type declarations + // Verify all valid accessibility levels for interface declarations are allowed Assert.IsTrue(NS_TestClass_validaccess_03.testMethod()); } [TestMethod] public void NS_validaccess_04_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Verify all valid accessibility levels for enum declarations are allowed"); + // Section 9.5 Type declarations + // Verify all valid accessibility levels for enum declarations are allowed Assert.IsTrue(NS_TestClass_validaccess_04.testMethod()); } [TestMethod] public void NS_validaccess_05_Test() { - OutputHelper.WriteLine("Section 9.5 Type declarations "); - OutputHelper.WriteLine("Verify all valid accessibility levels for delegate declarations are allowed"); + // Section 9.5 Type declarations + // Verify all valid accessibility levels for delegate declarations are allowed Assert.IsTrue(NS_TestClass_validaccess_05.testMethod()); } [TestMethod] public void NS_contexts_025_Test() { - OutputHelper.WriteLine("Verify that you can use the qualifier in a cref attribute of xml docs tag"); + // Verify that you can use the qualifier in a cref attribute of xml docs tag Assert.IsTrue(NS_TestClass_contexts_025.Test.testMethod()); } @@ -403,7 +403,7 @@ public static void Main_old(String[] args) cA.printClassName(); cB.printClassName(); - OutputHelper.WriteLine("Class C"); + // Class C } public static bool testMethod() @@ -426,7 +426,7 @@ public static void Main_old(String[] args) cA.printClassName(); cB.printClassName(); - OutputHelper.WriteLine("Class C"); + // Class C } public static bool testMethod() @@ -626,7 +626,7 @@ class A { public static void Main_old(String[] args) { - OutputHelper.WriteLine("This worked!"); + // This worked! } public static bool testMethod() { @@ -642,7 +642,7 @@ class A { public static void Main_old(String[] args) { - OutputHelper.WriteLine("This worked!"); + // This worked! } public static bool testMethod() { @@ -1191,7 +1191,7 @@ class B : F.A { public static void Main_old(String[] args) { - OutputHelper.WriteLine("Worked!"); + // Worked! } public static bool testMethod() @@ -1362,7 +1362,7 @@ public static int Main_old() A a = new A(); a.i = 25; - OutputHelper.WriteLine("This works!"); + // This works! return 0; } @@ -1397,7 +1397,7 @@ public static int Main_old() { A a = new A(); - OutputHelper.WriteLine("This works!"); + // This works! return 0; } diff --git a/Tests/NFUnitTestStatementsTests/UnitTestStatementTests.cs b/Tests/NFUnitTestStatementsTests/UnitTestStatementTests.cs index 540e778d..4478c125 100644 --- a/Tests/NFUnitTestStatementsTests/UnitTestStatementTests.cs +++ b/Tests/NFUnitTestStatementsTests/UnitTestStatementTests.cs @@ -10,1015 +10,1015 @@ public class UnitTestStatementTests [TestMethod] public void Statements_Label_001_Test() { - OutputHelper.WriteLine("Label_001.sc"); - OutputHelper.WriteLine("Make sure labels can be declared"); + // Label_001.sc + // Make sure labels can be declared Assert.IsTrue(Statements_TestClass_Label_001.testMethod()); } [TestMethod] public void Statements_Label_002_Test() { - OutputHelper.WriteLine("Label_002.sc"); - OutputHelper.WriteLine("Make sure labels can be referenced. Assumes 'goto'"); + // Label_002.sc + // Make sure labels can be referenced. Assumes 'goto' Assert.IsTrue(Statements_TestClass_Label_002.testMethod()); } [TestMethod] public void Statements_Label_004_Test() { - OutputHelper.WriteLine("Label_004.sc"); - OutputHelper.WriteLine("Make sure labels can be associated with an empty statement"); + // Label_004.sc + // Make sure labels can be associated with an empty statement Assert.IsTrue(Statements_TestClass_Label_004.testMethod()); } [TestMethod] public void Statements_Decl_001_Test() { - OutputHelper.WriteLine("Decl_001.sc"); - OutputHelper.WriteLine("Declare a local variable of an intrinsic type"); + // Decl_001.sc + // Declare a local variable of an intrinsic type Assert.IsTrue(Statements_TestClass_Decl_001.testMethod()); } [TestMethod] public void Statements_Decl_002_Test() { - OutputHelper.WriteLine("Decl_002.sc"); - OutputHelper.WriteLine("Declare a local variable of an intrinsic type and initialize it"); + // Decl_002.sc + // Declare a local variable of an intrinsic type and initialize it Assert.IsTrue(Statements_TestClass_Decl_002.testMethod()); } [TestMethod] public void Statements_Decl_003_Test() { - OutputHelper.WriteLine("Decl_003.sc"); - OutputHelper.WriteLine("Declare a local variable of an intrinsic type and initialize it"); - OutputHelper.WriteLine("with an expression."); + // Decl_003.sc + // Declare a local variable of an intrinsic type and initialize it + // with an expression. Assert.IsTrue(Statements_TestClass_Decl_003.testMethod()); } [TestMethod] public void Statements_Decl_004_Test() { - OutputHelper.WriteLine("Decl_004.sc"); - OutputHelper.WriteLine("Declare a local variable of an external object type"); + // Decl_004.sc + // Declare a local variable of an external object type Assert.IsTrue(Statements_TestClass_Decl_004.testMethod()); } [TestMethod] public void Statements_Decl_007_Test() { - OutputHelper.WriteLine("Decl_007.sc"); - OutputHelper.WriteLine("Declare a series of local variables of an intrinsic type with commas"); + // Decl_007.sc + // Declare a series of local variables of an intrinsic type with commas Assert.IsTrue(Statements_TestClass_Decl_007.testMethod()); } [TestMethod] public void Statements_Decl_009_Test() { - OutputHelper.WriteLine("Decl_009.sc"); - OutputHelper.WriteLine("Declare a series of local variables of an intrinsic type with commas and"); - OutputHelper.WriteLine("initial assignments."); + // Decl_009.sc + // Declare a series of local variables of an intrinsic type with commas and + // initial assignments. Assert.IsTrue(Statements_TestClass_Decl_009.testMethod()); } [TestMethod] public void Statements_Decl_010_Test() { - OutputHelper.WriteLine("Decl_010.sc"); - OutputHelper.WriteLine("Declare a local variable of an intrinsic type as an array"); + // Decl_010.sc + // Declare a local variable of an intrinsic type as an array Assert.IsTrue(Statements_TestClass_Decl_010.testMethod()); } [TestMethod] public void Statements_Decl_012_Test() { - OutputHelper.WriteLine("Decl_012.sc"); - OutputHelper.WriteLine("Declare a local variable of an intrinsic type as an array, allocate and reference it."); + // Decl_012.sc + // Declare a local variable of an intrinsic type as an array, allocate and reference it. Assert.IsTrue(Statements_TestClass_Decl_012.testMethod()); } [TestMethod] public void Statements_Decl_014_Test() { - OutputHelper.WriteLine("Decl_014.sc"); - OutputHelper.WriteLine("Declare a local variable of an intrinsic type as an initialized array"); + // Decl_014.sc + // Declare a local variable of an intrinsic type as an initialized array Assert.IsTrue(Statements_TestClass_Decl_014.testMethod()); } [TestMethod] public void Statements_Decl_016_Test() { - OutputHelper.WriteLine("Decl_016.sc"); - OutputHelper.WriteLine("Correctly declare a local variable of a type that has no default constructor"); - OutputHelper.WriteLine("as an array."); + // Decl_016.sc + // Correctly declare a local variable of a type that has no default constructor + // as an array. Assert.IsTrue(Statements_TestClass_Decl_016.testMethod()); } [TestMethod] public void Statements_Block_001_Test() { - OutputHelper.WriteLine("Block_001.sc"); - OutputHelper.WriteLine("Statements_TestClass_? Several types of statement blocks. Statement blocks"); - OutputHelper.WriteLine("are so fundamental, that most can be tested in one pass."); - OutputHelper.WriteLine("Note that by the nature of this code, many warnings"); - OutputHelper.WriteLine("could/should be generated about items that are never reached."); + // Block_001.sc + // Statements_TestClass_? Several types of statement blocks. Statement blocks + // are so fundamental, that most can be tested in one pass. + // Note that by the nature of this code, many warnings + // could/should be generated about items that are never reached. Assert.IsTrue(Statements_TestClass_Block_001.testMethod()); } [TestMethod] public void Statements_Empty_001_Test() { - OutputHelper.WriteLine("Empty_001.sc"); - OutputHelper.WriteLine("Statements_TestClass_? Several scenarios for empty statement. Emtpy statements"); - OutputHelper.WriteLine("are so fundamental, that most can be tested in one pass."); - OutputHelper.WriteLine("Note that by the nature of this code, many warnings"); - OutputHelper.WriteLine("could/should be generated about items that are never reached."); + // Empty_001.sc + // Statements_TestClass_? Several scenarios for empty statement. Emtpy statements + // are so fundamental, that most can be tested in one pass. + // Note that by the nature of this code, many warnings + // could/should be generated about items that are never reached. Assert.IsTrue(Statements_TestClass_Empty_001.testMethod()); } [TestMethod] public void Statements_Expr_002_Test() { - OutputHelper.WriteLine("Expr_002.sc"); - OutputHelper.WriteLine("Use an expression with side effects."); + // Expr_002.sc + // Use an expression with side effects. Assert.IsTrue(Statements_TestClass_Expr_002.testMethod()); } [TestMethod] public void Statements_Expr_003_Test() { - OutputHelper.WriteLine("Expr_003.sc"); - OutputHelper.WriteLine("Use an expression with side effects and multiple l-values."); + // Expr_003.sc + // Use an expression with side effects and multiple l-values. Assert.IsTrue(Statements_TestClass_Expr_003.testMethod()); } [TestMethod] public void Statements_Expr_004_Test() { - OutputHelper.WriteLine("Expr_004.sc"); - OutputHelper.WriteLine("Run a quick test of common operator/assignment combos"); + // Expr_004.sc + // Run a quick test of common operator/assignment combos Assert.IsTrue(Statements_TestClass_Expr_004.testMethod()); } [TestMethod] public void Statements_Expr_006_Test() { - OutputHelper.WriteLine(" complex assignment"); + // complex assignment Assert.IsTrue(Statements_TestClass_Expr_006.testMethod()); } [TestMethod] public void Statements_if_001_Test() { - OutputHelper.WriteLine("if_001.sc"); - OutputHelper.WriteLine("Simple boolean if with a single statement"); + // if_001.sc + // Simple boolean if with a single statement Assert.IsTrue(Statements_TestClass_if_001.testMethod()); } [TestMethod] public void Statements_if_003_Test() { - OutputHelper.WriteLine("if_003.sc"); - OutputHelper.WriteLine("Simple boolean if with a block statement"); + // if_003.sc + // Simple boolean if with a block statement Assert.IsTrue(Statements_TestClass_if_003.testMethod()); } [TestMethod] public void Statements_if_005_Test() { - OutputHelper.WriteLine("if_005.sc"); - OutputHelper.WriteLine("Simple boolean if with a single statement and else"); + // if_005.sc + // Simple boolean if with a single statement and else Assert.IsTrue(Statements_TestClass_if_005.testMethod()); } [TestMethod] public void Statements_if_007_Test() { - OutputHelper.WriteLine("if_007.sc"); - OutputHelper.WriteLine("Simple boolean if with a block statement"); + // if_007.sc + // Simple boolean if with a block statement Assert.IsTrue(Statements_TestClass_if_007.testMethod()); } [TestMethod] public void Statements_if_009_Test() { - OutputHelper.WriteLine("if_009.sc"); - OutputHelper.WriteLine("Nest ifs with elses without blocks. Statements_TestClass_? that the 'else' ambiguity from"); - OutputHelper.WriteLine("C/C++ is handled the same way (else bound to closest if)"); + // if_009.sc + // Nest ifs with elses without blocks. Statements_TestClass_? that the 'else' ambiguity from + // C/C++ is handled the same way (else bound to closest if) Assert.IsTrue(Statements_TestClass_if_009.testMethod()); } [TestMethod] public void Statements_switch_001_Test() { - OutputHelper.WriteLine("switch_001.sc"); - OutputHelper.WriteLine("Empty switch"); + // switch_001.sc + // Empty switch Assert.IsTrue(Statements_TestClass_switch_001.testMethod()); } [TestMethod] public void Statements_switch_002_Test() { - OutputHelper.WriteLine("switch_002.sc"); - OutputHelper.WriteLine("Default only switch"); + // switch_002.sc + // Default only switch Assert.IsTrue(Statements_TestClass_switch_002.testMethod()); } [TestMethod] public void Statements_switch_003_Test() { - OutputHelper.WriteLine("switch_003.sc"); - OutputHelper.WriteLine("Switch with single case without break - no default"); + // switch_003.sc + // Switch with single case without break - no default Assert.IsTrue(Statements_TestClass_switch_003.testMethod()); } [TestMethod] public void Statements_switch_004_Test() { - OutputHelper.WriteLine("switch_004.sc"); - OutputHelper.WriteLine("Switch with one case, using break"); + // switch_004.sc + // Switch with one case, using break Assert.IsTrue(Statements_TestClass_switch_004.testMethod()); } [TestMethod] public void Statements_switch_005_Test() { - OutputHelper.WriteLine("switch_005.sc"); - OutputHelper.WriteLine("Switch with two cases, using break"); + // switch_005.sc + // Switch with two cases, using break Assert.IsTrue(Statements_TestClass_switch_005.testMethod()); } [TestMethod] public void Statements_switch_006_Test() { - OutputHelper.WriteLine("switch_006.sc"); - OutputHelper.WriteLine("Switch with one case and a default"); + // switch_006.sc + // Switch with one case and a default Assert.IsTrue(Statements_TestClass_switch_006.testMethod()); } [TestMethod] public void Statements_switch_007_Test() { - OutputHelper.WriteLine("switch_007.sc"); - OutputHelper.WriteLine("Switch with two cases and a default"); + // switch_007.sc + // Switch with two cases and a default Assert.IsTrue(Statements_TestClass_switch_007.testMethod()); } [TestMethod] public void Statements_switch_010_Test() { - OutputHelper.WriteLine("switch_010.sc"); - OutputHelper.WriteLine("Switch with a const variable in a case"); + // switch_010.sc + // Switch with a const variable in a case Assert.IsTrue(Statements_TestClass_switch_010.testMethod()); } [TestMethod] public void Statements_switch_012_Test() { - OutputHelper.WriteLine("switch_012.sc"); - OutputHelper.WriteLine("Multiple case labels"); + // switch_012.sc + // Multiple case labels Assert.IsTrue(Statements_TestClass_switch_012.testMethod()); } [TestMethod] public void Statements_switch_013_Test() { - OutputHelper.WriteLine("switch_013.sc"); - OutputHelper.WriteLine("test goto all over"); - OutputHelper.WriteLine("Expected Output"); + // switch_013.sc + // test goto all over + // Expected Output Assert.IsTrue(Statements_TestClass_switch_013.testMethod()); } [TestMethod] public void Statements_switch_015_Test() { - OutputHelper.WriteLine("switch_015.sc"); - OutputHelper.WriteLine("Run a switch over a specific type: byte"); + // switch_015.sc + // Run a switch over a specific type: byte Assert.IsTrue(Statements_TestClass_switch_015.testMethod()); } [TestMethod] public void Statements_switch_016_Test() { - OutputHelper.WriteLine("switch_016.sc"); - OutputHelper.WriteLine("Run a switch over a specific type: char"); + // switch_016.sc + // Run a switch over a specific type: char Assert.IsTrue(Statements_TestClass_switch_016.testMethod()); } [TestMethod] public void Statements_switch_017_Test() { - OutputHelper.WriteLine("switch_017.sc"); - OutputHelper.WriteLine("Run a switch over a specific type: short"); + // switch_017.sc + // Run a switch over a specific type: short Assert.IsTrue(Statements_TestClass_switch_017.testMethod()); } [TestMethod] public void Statements_switch_018_Test() { - OutputHelper.WriteLine("switch_018.sc"); - OutputHelper.WriteLine("Run a switch over a specific type: int"); + // switch_018.sc + // Run a switch over a specific type: int Assert.IsTrue(Statements_TestClass_switch_018.testMethod()); } [TestMethod] public void Statements_switch_019_Test() { - OutputHelper.WriteLine("switch_019.sc"); - OutputHelper.WriteLine("Run a switch over a specific type: long"); + // switch_019.sc + // Run a switch over a specific type: long Assert.IsTrue(Statements_TestClass_switch_019.testMethod()); } [TestMethod] public void Statements_switch_023_Test() { - OutputHelper.WriteLine("switch_023.sc"); - OutputHelper.WriteLine("Run a switch over a specific type: enum"); + // switch_023.sc + // Run a switch over a specific type: enum Assert.IsTrue(Statements_TestClass_switch_023.testMethod()); } [TestMethod] public void Statements_switch_030_Test() { - OutputHelper.WriteLine(" switch on int variable, float case"); + // switch on int variable, float case Assert.IsTrue(Statements_TestClass_switch_030.testMethod()); } [TestMethod] public void Statements_switch_031_Test() { - OutputHelper.WriteLine(" switch with holes in range"); + // switch with holes in range Assert.IsTrue(Statements_TestClass_switch_031.testMethod()); } [TestMethod] public void Statements_switch_032_Test() { - OutputHelper.WriteLine(" switch: default case at top"); + // switch: default case at top Assert.IsTrue(Statements_TestClass_switch_032.testMethod()); } [TestMethod] public void Statements_switch_033_Test() { - OutputHelper.WriteLine(" switch: default case in middle"); + // switch: default case in middle Assert.IsTrue(Statements_TestClass_switch_033.testMethod()); } [TestMethod] public void Statements_switch_034_Test() { - OutputHelper.WriteLine(" switch: default case in middle"); + // switch: default case in middle Assert.IsTrue(Statements_TestClass_switch_034.testMethod()); } [TestMethod] public void Statements_switch_035_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_035.testMethod()); } [TestMethod] public void Statements_switch_036_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_036.testMethod()); } [TestMethod] public void Statements_switch_037_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_037.testMethod()); } [TestMethod] public void Statements_switch_038_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_038.testMethod()); } [TestMethod] public void Statements_switch_039_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_039.testMethod()); } [TestMethod] public void Statements_switch_040_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_040.testMethod()); } [TestMethod] public void Statements_switch_041_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_041.testMethod()); } [TestMethod] public void Statements_switch_042_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_042.testMethod()); } [TestMethod] public void Statements_switch_044_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. Assert.IsTrue(Statements_TestClass_switch_044.testMethod()); } [TestMethod] public void Statements_switch_047_Test() { - OutputHelper.WriteLine("Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of "); - OutputHelper.WriteLine("the switch expression to one of the following possible governing types: sbyte, byte, short,"); - OutputHelper.WriteLine("ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if "); - OutputHelper.WriteLine("more than one such implicit conversion exists, a compile-time error occurs."); - OutputHelper.WriteLine("Ensure error is emmited on when more than one implicit conversion to an acceptable governing type is defined"); + // Otherwise, exactly one user-defined implicit conversion (�6.4) must exist from the type of + // the switch expression to one of the following possible governing types: sbyte, byte, short, + // ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if + // more than one such implicit conversion exists, a compile-time error occurs. + // Ensure error is emmited on when more than one implicit conversion to an acceptable governing type is defined Assert.IsTrue(Statements_TestClass_switch_047.testMethod()); } [TestMethod] public void Statements_switch_049_Test() { - OutputHelper.WriteLine("warning CS1522: Empty switch block"); + // warning CS1522: Empty switch block Assert.IsTrue(Statements_TestClass_switch_049.testMethod()); } [TestMethod] public void Statements_switch_string_001_Test() { - OutputHelper.WriteLine(" switch on string: null"); + // switch on string: null Assert.IsTrue(Statements_TestClass_switch_string_001.testMethod()); } [TestMethod] public void Statements_dowhile_001_Test() { - OutputHelper.WriteLine("dowhile_001.sc"); - OutputHelper.WriteLine("do/while with a single statement"); + // dowhile_001.sc + // do/while with a single statement Assert.IsTrue(Statements_TestClass_dowhile_001.testMethod()); } [TestMethod] public void Statements_dowhile_002_Test() { - OutputHelper.WriteLine("dowhile_002.sc"); - OutputHelper.WriteLine("do/while with a compound statement"); + // dowhile_002.sc + // do/while with a compound statement Assert.IsTrue(Statements_TestClass_dowhile_002.testMethod()); } [TestMethod] public void Statements_dowhile_003_Test() { - OutputHelper.WriteLine("dowhile_003.sc"); - OutputHelper.WriteLine("verify known false condition executes only once with single statement"); + // dowhile_003.sc + // verify known false condition executes only once with single statement Assert.IsTrue(Statements_TestClass_dowhile_003.testMethod()); } [TestMethod] public void Statements_dowhile_004_Test() { - OutputHelper.WriteLine("dowhile_004.sc"); - OutputHelper.WriteLine("verify known true condition executes with single statement"); + // dowhile_004.sc + // verify known true condition executes with single statement Assert.IsTrue(Statements_TestClass_dowhile_004.testMethod()); } [TestMethod] public void Statements_dowhile_005_Test() { - OutputHelper.WriteLine("dowhile_005.sc"); - OutputHelper.WriteLine("verify known false condition executes once with compound statements"); + // dowhile_005.sc + // verify known false condition executes once with compound statements Assert.IsTrue(Statements_TestClass_dowhile_005.testMethod()); } [TestMethod] public void Statements_dowhile_006_Test() { - OutputHelper.WriteLine("dowhile_006.sc"); - OutputHelper.WriteLine("verify known true condition executes with compound statements"); + // dowhile_006.sc + // verify known true condition executes with compound statements Assert.IsTrue(Statements_TestClass_dowhile_006.testMethod()); } [TestMethod] public void Statements_for_001_Test() { - OutputHelper.WriteLine("for_001.sc"); - OutputHelper.WriteLine("empty for loop"); + // for_001.sc + // empty for loop Assert.IsTrue(Statements_TestClass_for_001.testMethod()); } [TestMethod] public void Statements_for_003_Test() { - OutputHelper.WriteLine("for_003.sc"); - OutputHelper.WriteLine("empty initializer in for loop"); + // for_003.sc + // empty initializer in for loop Assert.IsTrue(Statements_TestClass_for_003.testMethod()); } [TestMethod] public void Statements_for_004_Test() { - OutputHelper.WriteLine("for_004.sc"); - OutputHelper.WriteLine("empty iterator in for loop"); + // for_004.sc + // empty iterator in for loop Assert.IsTrue(Statements_TestClass_for_004.testMethod()); } [TestMethod] public void Statements_for_006_Test() { - OutputHelper.WriteLine("for_006.sc"); - OutputHelper.WriteLine("Full normal for loop"); + // for_006.sc + // Full normal for loop Assert.IsTrue(Statements_TestClass_for_006.testMethod()); } [TestMethod] public void Statements_for_007_Test() { - OutputHelper.WriteLine("for_007.sc"); - OutputHelper.WriteLine("Full normal for loop with a compound statement"); + // for_007.sc + // Full normal for loop with a compound statement Assert.IsTrue(Statements_TestClass_for_007.testMethod()); } [TestMethod] public void Statements_for_008_Test() { - OutputHelper.WriteLine("for_008.sc"); - OutputHelper.WriteLine("Multiple declarations in initializer"); + // for_008.sc + // Multiple declarations in initializer Assert.IsTrue(Statements_TestClass_for_008.testMethod()); } [TestMethod] public void Statements_for_009_Test() { - OutputHelper.WriteLine("for_009.sc"); - OutputHelper.WriteLine("Statements_TestClass_? statement expression lists in for initializer"); + // for_009.sc + // Statements_TestClass_? statement expression lists in for initializer Assert.IsTrue(Statements_TestClass_for_009.testMethod()); } [TestMethod] public void Statements_for_010_Test() { - OutputHelper.WriteLine("for_010.sc"); - OutputHelper.WriteLine("Statements_TestClass_? statement expression lists in for iterator"); + // for_010.sc + // Statements_TestClass_? statement expression lists in for iterator Assert.IsTrue(Statements_TestClass_for_010.testMethod()); } [TestMethod] public void Statements_for_011_Test() { - OutputHelper.WriteLine("for_011.sc"); - OutputHelper.WriteLine("Statements_TestClass_? statement expression lists in for initializer and iterator"); + // for_011.sc + // Statements_TestClass_? statement expression lists in for initializer and iterator Assert.IsTrue(Statements_TestClass_for_011.testMethod()); } [TestMethod] public void Statements_for_013_Test() { - OutputHelper.WriteLine("for_013.sc"); - OutputHelper.WriteLine("Verify conditional evaluates before iterator"); + // for_013.sc + // Verify conditional evaluates before iterator Assert.IsTrue(Statements_TestClass_for_013.testMethod()); } [TestMethod] public void Statements_for_014_Test() { - OutputHelper.WriteLine("for_014.sc"); - OutputHelper.WriteLine("Verify method calls work ok in all for loop areas"); + // for_014.sc + // Verify method calls work ok in all for loop areas Assert.IsTrue(Statements_TestClass_for_014.testMethod()); } [TestMethod] public void Statements_char_in_string_s01_Test() { - OutputHelper.WriteLine("Optimization to foreach (char c in String) by treating String as a char array"); + // Optimization to foreach (char c in String) by treating String as a char array Assert.IsTrue(Statements_TestClass_char_in_string_s01.testMethod()); } [TestMethod] public void Statements_char_in_string_ex01_Test() { - OutputHelper.WriteLine("Optimization to foreach (char c in String) by treating String as a char array"); + // Optimization to foreach (char c in String) by treating String as a char array Assert.IsTrue(Statements_TestClass_char_in_string_ex01.testMethod()); } [TestMethod] public void Statements_while_001_Test() { - OutputHelper.WriteLine("while_001.sc"); - OutputHelper.WriteLine("while with a single statement"); + // while_001.sc + // while with a single statement Assert.IsTrue(Statements_TestClass_while_001.testMethod()); } [TestMethod] public void Statements_while_002_Test() { - OutputHelper.WriteLine("while_002.sc"); - OutputHelper.WriteLine("while with a compound statement"); + // while_002.sc + // while with a compound statement Assert.IsTrue(Statements_TestClass_while_002.testMethod()); } [TestMethod] public void Statements_while_003_Test() { - OutputHelper.WriteLine("while_003.sc"); - OutputHelper.WriteLine("verify known false condition doesn't execute with single statement"); + // while_003.sc + // verify known false condition doesn't execute with single statement Assert.IsTrue(Statements_TestClass_while_003.testMethod()); } [TestMethod] public void Statements_while_004_Test() { - OutputHelper.WriteLine("while_004.sc"); - OutputHelper.WriteLine("verify known true condition executes with single statement"); + // while_004.sc + // verify known true condition executes with single statement Assert.IsTrue(Statements_TestClass_while_004.testMethod()); } [TestMethod] public void Statements_while_005_Test() { - OutputHelper.WriteLine("while_005.sc"); - OutputHelper.WriteLine("verify known false condition doesn't execute with compound statements"); + // while_005.sc + // verify known false condition doesn't execute with compound statements Assert.IsTrue(Statements_TestClass_while_005.testMethod()); } [TestMethod] public void Statements_while_006_Test() { - OutputHelper.WriteLine("while_006.sc"); - OutputHelper.WriteLine("verify known true condition executes with compound statements"); + // while_006.sc + // verify known true condition executes with compound statements Assert.IsTrue(Statements_TestClass_while_006.testMethod()); } [TestMethod] public void Statements_break_001_Test() { - OutputHelper.WriteLine("break_001.sc"); - OutputHelper.WriteLine("Make sure break works in all basic single statement loops"); + // break_001.sc + // Make sure break works in all basic single statement loops Assert.IsTrue(Statements_TestClass_break_001.testMethod()); } [TestMethod] public void Statements_break_002_Test() { - OutputHelper.WriteLine("break_002.sc"); - OutputHelper.WriteLine("Make sure break works in all basic compound statement loops"); + // break_002.sc + // Make sure break works in all basic compound statement loops Assert.IsTrue(Statements_TestClass_break_002.testMethod()); } [TestMethod] public void Statements_break_003_Test() { - OutputHelper.WriteLine("break_003.sc"); - OutputHelper.WriteLine("Make sure break optional on end of switch"); + // break_003.sc + // Make sure break optional on end of switch Assert.IsTrue(Statements_TestClass_break_003.testMethod()); } [TestMethod] public void Statements_break_006_Test() { - OutputHelper.WriteLine("break_006.sc"); - OutputHelper.WriteLine("break in an if successfully breaks loop"); + // break_006.sc + // break in an if successfully breaks loop Assert.IsTrue(Statements_TestClass_break_006.testMethod()); } [TestMethod] public void Statements_break_007_Test() { - OutputHelper.WriteLine("break_007.sc"); - OutputHelper.WriteLine("break in a blocked if successfully breaks loop"); + // break_007.sc + // break in a blocked if successfully breaks loop Assert.IsTrue(Statements_TestClass_break_007.testMethod()); } [TestMethod] public void Statements_break_010_Test() { - OutputHelper.WriteLine("break_010.sc"); - OutputHelper.WriteLine("Make sure break correctly when nested"); + // break_010.sc + // Make sure break correctly when nested Assert.IsTrue(Statements_TestClass_break_010.testMethod()); } [TestMethod] public void Statements_continue_001_Test() { - OutputHelper.WriteLine("continue_001.sc"); - OutputHelper.WriteLine("Make sure continue works in all basic single statement loops"); + // continue_001.sc + // Make sure continue works in all basic single statement loops Assert.IsTrue(Statements_TestClass_continue_001.testMethod()); } [TestMethod] public void Statements_continue_002_Test() { - OutputHelper.WriteLine("continue_002.sc"); - OutputHelper.WriteLine("Make sure continue works in all basic compound statement loops"); - OutputHelper.WriteLine("Expected Output"); + // continue_002.sc + // Make sure continue works in all basic compound statement loops + // Expected Output Assert.IsTrue(Statements_TestClass_continue_002.testMethod()); } [TestMethod] public void Statements_continue_006_Test() { - OutputHelper.WriteLine("continue_006.sc"); - OutputHelper.WriteLine("continue in an if successfully continues loop"); + // continue_006.sc + // continue in an if successfully continues loop Assert.IsTrue(Statements_TestClass_continue_006.testMethod()); } [TestMethod] public void Statements_continue_007_Test() { - OutputHelper.WriteLine("continue_007.sc"); - OutputHelper.WriteLine("continue in a block if successfully continues loop"); + // continue_007.sc + // continue in a block if successfully continues loop Assert.IsTrue(Statements_TestClass_continue_007.testMethod()); } [TestMethod] public void Statements_continue_010_Test() { - OutputHelper.WriteLine("continue_010.sc"); - OutputHelper.WriteLine("Make sure continue works correctly when nested"); + // continue_010.sc + // Make sure continue works correctly when nested Assert.IsTrue(Statements_TestClass_continue_010.testMethod()); } [TestMethod] public void Statements_goto_001_Test() { - OutputHelper.WriteLine("goto_001.sc"); - OutputHelper.WriteLine("simple goto to adjust flow control"); + // goto_001.sc + // simple goto to adjust flow control Assert.IsTrue(Statements_TestClass_goto_001.testMethod()); } [TestMethod] public void Statements_goto_008_Test() { - OutputHelper.WriteLine("goto_008.sc"); - OutputHelper.WriteLine("goto currect case"); + // goto_008.sc + // goto currect case Assert.IsTrue(Statements_TestClass_goto_008.testMethod()); } [TestMethod] public void Statements_goto_009_Test() { - OutputHelper.WriteLine("goto_009.sc"); - OutputHelper.WriteLine("goto a different case"); - OutputHelper.WriteLine("Expected Output"); + // goto_009.sc + // goto a different case + // Expected Output Assert.IsTrue(Statements_TestClass_goto_009.testMethod()); } [TestMethod] public void Statements_goto_010_Test() { - OutputHelper.WriteLine("goto_010.sc"); - OutputHelper.WriteLine("goto default correctly"); + // goto_010.sc + // goto default correctly Assert.IsTrue(Statements_TestClass_goto_010.testMethod()); } [TestMethod] public void Statements_goto_014_Test() { - OutputHelper.WriteLine("goto_014.sc"); - OutputHelper.WriteLine("simple gotos to test jumping to parent process."); + // goto_014.sc + // simple gotos to test jumping to parent process. Assert.IsTrue(Statements_TestClass_goto_014.testMethod()); } [TestMethod] public void Statements_goto_017_Test() { - OutputHelper.WriteLine(" some gotos"); + // some gotos Assert.IsTrue(Statements_TestClass_goto_017.testMethod()); } [TestMethod] public void Statements_goto_018_Test() { - OutputHelper.WriteLine(" try/catch/finally with goto"); + // try/catch/finally with goto Assert.IsTrue(Statements_TestClass_goto_018.testMethod()); } [TestMethod] public void Statements_return_001_Test() { - OutputHelper.WriteLine("return_001.sc"); - OutputHelper.WriteLine("simple void return on a void method"); + // return_001.sc + // simple void return on a void method Assert.IsTrue(Statements_TestClass_return_001.testMethod()); } [TestMethod] public void Statements_return_004_Test() { - OutputHelper.WriteLine("return_004.sc"); - OutputHelper.WriteLine("simple return a normal type, assigning, and ignoring return value"); + // return_004.sc + // simple return a normal type, assigning, and ignoring return value Assert.IsTrue(Statements_TestClass_return_004.testMethod()); } [TestMethod] public void Statements_return_006_Test() { - OutputHelper.WriteLine("return_006.sc"); - OutputHelper.WriteLine("simple return a type mismatch that has an implicit conversion"); + // return_006.sc + // simple return a type mismatch that has an implicit conversion Assert.IsTrue(Statements_TestClass_return_006.testMethod()); } [TestMethod] public void Statements_return_008_Test() { - OutputHelper.WriteLine("return_008.sc"); - OutputHelper.WriteLine("simple return a type mismatch that has an explicit convertion conversion,"); - OutputHelper.WriteLine("applying the cast"); + // return_008.sc + // simple return a type mismatch that has an explicit convertion conversion, + // applying the cast Assert.IsTrue(Statements_TestClass_return_008.testMethod()); } [TestMethod] public void Statements_return_009_Test() { - OutputHelper.WriteLine("return_009.sc"); - OutputHelper.WriteLine("return of a struct"); + // return_009.sc + // return of a struct Assert.IsTrue(Statements_TestClass_return_009.testMethod()); } [TestMethod] public void Statements_return_010_Test() { - OutputHelper.WriteLine("return_010.sc"); - OutputHelper.WriteLine("return of a class"); + // return_010.sc + // return of a class Assert.IsTrue(Statements_TestClass_return_010.testMethod()); } [TestMethod] public void Statements_return_013_Test() { - OutputHelper.WriteLine("return_013.sc"); - OutputHelper.WriteLine("simple falloff on a void method"); + // return_013.sc + // simple falloff on a void method Assert.IsTrue(Statements_TestClass_return_013.testMethod()); } [TestMethod] public void Statements_return_014_Test() { - OutputHelper.WriteLine("return_014.sc"); - OutputHelper.WriteLine("verify that a 'throw' is adequate for flow control analysis of return type"); + // return_014.sc + // verify that a 'throw' is adequate for flow control analysis of return type Assert.IsTrue(Statements_TestClass_return_014.testMethod()); } [TestMethod] public void Statements_throw_001_Test() { - OutputHelper.WriteLine("throw_001.sc"); - OutputHelper.WriteLine("simple throw"); + // throw_001.sc + // simple throw Assert.IsTrue(Statements_TestClass_throw_001.testMethod()); } [TestMethod] public void Statements_throw_005_Test() { - OutputHelper.WriteLine("throw_005.sc"); - OutputHelper.WriteLine("simple throw with output"); + // throw_005.sc + // simple throw with output Assert.IsTrue(Statements_TestClass_throw_005.testMethod()); } [TestMethod] public void Statements_trycatch_001_Test() { - OutputHelper.WriteLine("trycatch_001.sc"); - OutputHelper.WriteLine("simple throw"); + // trycatch_001.sc + // simple throw Assert.IsTrue(Statements_TestClass_trycatch_001.testMethod()); } [TestMethod] public void Statements_trycatch_006_Test() { - OutputHelper.WriteLine("trycatch_006.sc"); - OutputHelper.WriteLine("simple system generated System.Exception"); + // trycatch_006.sc + // simple system generated System.Exception Assert.IsTrue(Statements_TestClass_trycatch_006.testMethod()); } [TestMethod] public void Statements_trycatch_007_Test() { - OutputHelper.WriteLine("trycatch_007.sc"); - OutputHelper.WriteLine("simple re-throw"); + // trycatch_007.sc + // simple re-throw Assert.IsTrue(Statements_TestClass_trycatch_007.testMethod()); } [TestMethod] public void Statements_tryfinally_001_Test() { - OutputHelper.WriteLine("tryfinally_001.sc"); - OutputHelper.WriteLine("simple finally"); + // tryfinally_001.sc + // simple finally Assert.IsTrue(Statements_TestClass_tryfinally_001.testMethod()); } [TestMethod] public void Statements_tryfinally_002_Test() { - OutputHelper.WriteLine("tryfinally_002.sc"); - OutputHelper.WriteLine("simple finally inside try/catch"); + // tryfinally_002.sc + // simple finally inside try/catch Assert.IsTrue(Statements_TestClass_tryfinally_002.testMethod()); } [TestMethod] public void Statements_tryfinally_003_Test() { - OutputHelper.WriteLine("tryfinally_003.sc"); - OutputHelper.WriteLine("simple finally outside try/catch"); + // tryfinally_003.sc + // simple finally outside try/catch Assert.IsTrue(Statements_TestClass_tryfinally_003.testMethod()); } [TestMethod] public void Statements_tryfinally_004_Test() { - OutputHelper.WriteLine("tryfinally_004.sc"); - OutputHelper.WriteLine("simple finally passed 'over' by a goto"); + // tryfinally_004.sc + // simple finally passed 'over' by a goto Assert.IsTrue(Statements_TestClass_tryfinally_004.testMethod()); } [TestMethod] public void Statements_tryfinally_006_Test() { - OutputHelper.WriteLine("tryfinally_006.sc"); - OutputHelper.WriteLine("simple finally exited by throw"); + // tryfinally_006.sc + // simple finally exited by throw Assert.IsTrue(Statements_TestClass_tryfinally_006.testMethod()); } [TestMethod] public void Statements_tryfinally_007_Test() { - OutputHelper.WriteLine("tryfinally_007.sc"); - OutputHelper.WriteLine("simple finally exited by throw in a called method"); + // tryfinally_007.sc + // simple finally exited by throw in a called method Assert.IsTrue(Statements_TestClass_tryfinally_007.testMethod()); } [TestMethod] public void Statements_tryfinally_008_Test() { - OutputHelper.WriteLine("tryfinally_008.sc"); - OutputHelper.WriteLine("simple finally exited by return"); + // tryfinally_008.sc + // simple finally exited by return Assert.IsTrue(Statements_TestClass_tryfinally_008.testMethod()); } [TestMethod] public void Statements_tryfinally_009_Test() { - OutputHelper.WriteLine("tryfinally_009.sc"); - OutputHelper.WriteLine("simple finally exited by continue"); + // tryfinally_009.sc + // simple finally exited by continue Assert.IsTrue(Statements_TestClass_tryfinally_009.testMethod()); } [TestMethod] public void Statements_tryfinally_010_Test() { - OutputHelper.WriteLine("tryfinally_010.sc"); - OutputHelper.WriteLine("simple finally exited by break"); + // tryfinally_010.sc + // simple finally exited by break Assert.IsTrue(Statements_TestClass_tryfinally_010.testMethod()); } [TestMethod] public void Statements_tryfinally_011_Test() { - OutputHelper.WriteLine("tryfinally_011.sc"); - OutputHelper.WriteLine("simple finally exited by break (where break is outside try)"); + // tryfinally_011.sc + // simple finally exited by break (where break is outside try) Assert.IsTrue(Statements_TestClass_tryfinally_011.testMethod()); } [TestMethod] public void Statements_tryfinally_012_Test() { - OutputHelper.WriteLine("tryfinally_012.sc"); - OutputHelper.WriteLine("simple finally exited by system System.Exception"); + // tryfinally_012.sc + // simple finally exited by system System.Exception Assert.IsTrue(Statements_TestClass_tryfinally_012.testMethod()); } @@ -1031,160 +1031,160 @@ public void Statements_tryfinally_013_Test() [TestMethod] public void Statements_Using_001_Test() { - OutputHelper.WriteLine("using_001.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Cast a class to IDisposable explicitly, use that in the using statement. (1.a)"); + // using_001.cs + // Statements_TestClass_? the using statement. + // Cast a class to IDisposable explicitly, use that in the using statement. (1.a) Assert.IsTrue(Statements_TestClass_Using_001.testMethod()); } [TestMethod] public void Statements_Using_002_Test() { - OutputHelper.WriteLine("using_002.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Use a class directly in using (1.b)"); + // using_002.cs + // Statements_TestClass_? the using statement. + // Use a class directly in using (1.b) Assert.IsTrue(Statements_TestClass_Using_002.testMethod()); } [TestMethod] public void Statements_Using_003_Test() { - OutputHelper.WriteLine("using_003.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Creation of class as part of using statement (1.c)"); + // using_003.cs + // Statements_TestClass_? the using statement. + // Creation of class as part of using statement (1.c) Assert.IsTrue(Statements_TestClass_Using_003.testMethod()); } [TestMethod] public void Statements_Using_005_Test() { - OutputHelper.WriteLine("using_005.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("A class that explicitly implements IDisposable. (1.e)"); + // using_005.cs + // Statements_TestClass_? the using statement. + // A class that explicitly implements IDisposable. (1.e) Assert.IsTrue(Statements_TestClass_Using_005.testMethod()); } [TestMethod] public void Statements_Using_009_Test() { - OutputHelper.WriteLine("using_009.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Statements_TestClass_? the behavior if the used variable is nulled-out in the using block (4)"); + // using_009.cs + // Statements_TestClass_? the using statement. + // Statements_TestClass_? the behavior if the used variable is nulled-out in the using block (4) Assert.IsTrue(Statements_TestClass_Using_009.testMethod()); } [TestMethod] public void Statements_Using_010_Test() { - OutputHelper.WriteLine("using_010.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Dispose() called during normal exit (5.a)"); + // using_010.cs + // Statements_TestClass_? the using statement. + // Dispose() called during normal exit (5.a) Assert.IsTrue(Statements_TestClass_Using_010.testMethod()); } [TestMethod] public void Statements_Using_011_Test() { - OutputHelper.WriteLine("using_011.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Dispose() called after throw (5.b)"); - OutputHelper.WriteLine("Expected Output"); + // using_011.cs + // Statements_TestClass_? the using statement. + // Dispose() called after throw (5.b) + // Expected Output Assert.IsTrue(Statements_TestClass_Using_011.testMethod()); } [TestMethod] public void Statements_Using_012_Test() { - OutputHelper.WriteLine("using_012.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Dispose() called for two objects during normal exit. (5.c)"); + // using_012.cs + // Statements_TestClass_? the using statement. + // Dispose() called for two objects during normal exit. (5.c) Assert.IsTrue(Statements_TestClass_Using_012.testMethod()); } [TestMethod] public void Statements_Using_013_Test() { - OutputHelper.WriteLine("using_013.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Dispose() called for first objects with System.Exception thrown before second block. (5.d)"); + // using_013.cs + // Statements_TestClass_? the using statement. + // Dispose() called for first objects with System.Exception thrown before second block. (5.d) Assert.IsTrue(Statements_TestClass_Using_013.testMethod()); } [TestMethod] public void Statements_Using_014_Test() { - OutputHelper.WriteLine("using_014.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Dispose() called for first objects with System.Exception thrown after second block. (5.e)"); + // using_014.cs + // Statements_TestClass_? the using statement. + // Dispose() called for first objects with System.Exception thrown after second block. (5.e) Assert.IsTrue(Statements_TestClass_Using_014.testMethod()); } [TestMethod] public void Statements_Using_015_Test() { - OutputHelper.WriteLine("using_015.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Dispose() called for both objects when System.Exception thrown inside second block. (5.f)"); + // using_015.cs + // Statements_TestClass_? the using statement. + // Dispose() called for both objects when System.Exception thrown inside second block. (5.f) Assert.IsTrue(Statements_TestClass_Using_015.testMethod()); } [TestMethod] public void Statements_Using_017_Test() { - OutputHelper.WriteLine("using_017.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Dispose() called for both objects when System.Exception thrown in compound case (5.h)"); + // using_017.cs + // Statements_TestClass_? the using statement. + // Dispose() called for both objects when System.Exception thrown in compound case (5.h) Assert.IsTrue(Statements_TestClass_Using_017.testMethod()); } [TestMethod] public void Statements_Using_018_Test() { - OutputHelper.WriteLine("using_018.cs"); - OutputHelper.WriteLine("Statements_TestClass_? the using statement."); - OutputHelper.WriteLine("Dispose() called for both objects in compound using. (5.g)"); + // using_018.cs + // Statements_TestClass_? the using statement. + // Dispose() called for both objects in compound using. (5.g) Assert.IsTrue(Statements_TestClass_Using_018.testMethod()); } [TestMethod] public void Statements_lock001_Test() { - OutputHelper.WriteLine("The expression of a lock statement must denote a value of a reference-type"); + // The expression of a lock statement must denote a value of a reference-type Assert.IsTrue(Statements_TestClass_lock001.testMethod()); } [TestMethod] public void Statements_lock003_Test() { - OutputHelper.WriteLine("The System.Type object of a class can conveniently be used as the mutual-exclusion lock for static methods of the class"); + // The System.Type object of a class can conveniently be used as the mutual-exclusion lock for static methods of the class Assert.IsTrue(Statements_TestClass_lock003.testMethod()); } [TestMethod] public void Statements_lock004_Test() { - OutputHelper.WriteLine("possible mistaken null statement when semi-column appears directly after lock()"); + // possible mistaken null statement when semi-column appears directly after lock() Assert.IsTrue(Statements_TestClass_lock004.testMethod()); } [TestMethod] public void Statements_lock005_Test() { - OutputHelper.WriteLine("this as the lock expression in a reference type"); + // this as the lock expression in a reference type Assert.IsTrue(Statements_TestClass_lock005.testMethod()); } [TestMethod] public void Statements_lock007_Test() { - OutputHelper.WriteLine("nested lock statements"); + // nested lock statements Assert.IsTrue(Statements_TestClass_lock007.testMethod()); } [TestMethod] public void Statements_enum_002_Test() { - OutputHelper.WriteLine(" enum: comparing constant casted to an enum type to a variable"); + // enum: comparing constant casted to an enum type to a variable Assert.IsTrue(Statements_TestClass_enum_002.testMethod()); } @@ -1192,11 +1192,11 @@ public class Res1 : IDisposable { public void Dispose() { - OutputHelper.WriteLine("Res1.Dispose()"); + // Res1.Dispose() } public void Func() { - OutputHelper.WriteLine("Res1.Func()"); + // Res1.Func() } public void Throw() { @@ -1208,11 +1208,11 @@ public class Res2 : IDisposable { public void Dispose() { - OutputHelper.WriteLine("Res2.Dispose()"); + // Res2.Dispose() } public void Func() { - OutputHelper.WriteLine("Res2.Func()"); + // Res2.Func() } public void Throw() { @@ -1225,11 +1225,11 @@ public class ResExplicit : IDisposable { void IDisposable.Dispose() { - OutputHelper.WriteLine("ResExplicit.Dispose()"); + // ResExplicit.Dispose() } public void Func() { - OutputHelper.WriteLine("ResExplicit.Func()"); + // ResExplicit.Func() } public void Throw() { @@ -1242,11 +1242,11 @@ public class NonRes1 { public void GarbageDisposal() { - OutputHelper.WriteLine("NonRes1.GarbageDisposal()"); + // NonRes1.GarbageDisposal() } public void Func() { - OutputHelper.WriteLine("NonRes1.Func()"); + // NonRes1.Func() } public void Throw() { @@ -1259,11 +1259,11 @@ public class NonRes2 { public void Dispose() { - OutputHelper.WriteLine("NonRes2.Dispose()"); + // NonRes2.Dispose() } public void Func() { - OutputHelper.WriteLine("NonRes2.Func()"); + // NonRes2.Func() } public void Throw() { @@ -1478,17 +1478,17 @@ public static int Main_old(string[] args) f[i] = foo = new Foo(i); if (foo.GetInt() != i) { - OutputHelper.WriteLine("new Foo() didn't take"); + // new Foo() didn't take return (1); } if (f[i].GetInt() != i) { - OutputHelper.WriteLine("Array didn't get updated"); + // Array didn't get updated return (1); } if (f[i] != foo) { - OutputHelper.WriteLine("Array element and foo are different"); + // Array element and foo are different return (i); } } @@ -1761,28 +1761,28 @@ public class Statements_TestClass_Expr_004 public static int Main_old(string[] args) { int i = 0; - OutputHelper.WriteLine("Adding 5"); + // Adding 5 i += 5; // i == 5 if (i != 5) return (1); - OutputHelper.WriteLine("Subtracting 3"); + // Subtracting 3 i -= 3; // i == 2 if (i != 2) return (1); - OutputHelper.WriteLine("Multiplying by 4"); + // Multiplying by 4 i *= 4; // i == 8 if (i != 8) return (1); - OutputHelper.WriteLine("Dividing by 2"); + // Dividing by 2 i /= 2; // i == 4 if (i != 4) return (1); - OutputHelper.WriteLine("Left Shifting 3"); + // Left Shifting 3 i <<= 3; // i == 32 if (i != 32) return (1); - OutputHelper.WriteLine("Right Shifting 2"); + // Right Shifting 2 i >>= 2; // i == 8 if (i != 8) return (1); - OutputHelper.WriteLine("ANDing against logical not"); + // ANDing against logical not i &= ~i; // i = 0 if (i != 0) return (1); - OutputHelper.WriteLine("ORing by 0xBeaf"); + // ORing by 0xBeaf i |= 48815; // i = 0xBeaf if (i != 0xBeaf) return (1); return (true ? 0 : 1); @@ -2114,32 +2114,32 @@ public static int Main_old(string[] args) { case 0: ret--; // 2 - OutputHelper.WriteLine("case 0: "); + // case 0: OutputHelper.WriteLine(ret.ToString()); goto case 9999; case 2: ret--; // 4 - OutputHelper.WriteLine("case 2: "); + // case 2: OutputHelper.WriteLine(ret.ToString()); goto case 255; case 6: // start here ret--; // 5 - OutputHelper.WriteLine("case 5: "); + // case 5: OutputHelper.WriteLine(ret.ToString()); goto case 2; case 9999: ret--; // 1 - OutputHelper.WriteLine("case 9999: "); + // case 9999: OutputHelper.WriteLine(ret.ToString()); goto default; case 0xff: ret--; // 3 - OutputHelper.WriteLine("case 0xff: "); + // case 0xff: OutputHelper.WriteLine(ret.ToString()); goto case 0; default: ret--; - OutputHelper.WriteLine("Default: "); + // Default: OutputHelper.WriteLine(ret.ToString()); if (ret > 0) { @@ -2148,7 +2148,7 @@ public static int Main_old(string[] args) break; case -1: ret = 999; - OutputHelper.WriteLine("case -1: "); + // case -1: OutputHelper.WriteLine(ret.ToString()); break; } @@ -2192,8 +2192,6 @@ private static int DoByte() ret--; break; } - if (ret > 0) - OutputHelper.WriteLine("byte failed"); return (ret); } @@ -2236,8 +2234,6 @@ private static int DoChar() ret--; break; } - if (ret > 0) - OutputHelper.WriteLine("char failed"); return (ret); } public static bool testMethod() @@ -2278,8 +2274,6 @@ private static int DoShort() ret--; break; } - if (ret > 0) - OutputHelper.WriteLine("short failed"); return (ret); } @@ -2322,8 +2316,6 @@ private static int DoInt() ret--; break; } - if (ret > 0) - OutputHelper.WriteLine("int failed"); return (ret); } public static bool testMethod() @@ -2364,8 +2356,6 @@ private static int DoLong() ret--; break; } - if (ret > 0) - OutputHelper.WriteLine("long failed"); return (ret); } @@ -2414,8 +2404,6 @@ private static int DoEnum() ret--; break; } - if (ret > 0) - OutputHelper.WriteLine("enum failed"); return (ret); } public static bool testMethod() @@ -2527,7 +2515,7 @@ public static int Main_old(string[] args) switch (t) { case 1: - OutputHelper.WriteLine("a"); + // a return 0; default: return 1; @@ -2825,7 +2813,7 @@ public static int Main_old(string[] args) switch (s) { case null: - OutputHelper.WriteLine("null"); + // null return 0; default: return 1; @@ -3061,12 +3049,12 @@ public static int Main_old(string[] args) } if (i + 1 != j) { - OutputHelper.WriteLine("Failure: i + 1 != j"); + // Failure: i + 1 != j return (1); } if (j + 1 != k) { - OutputHelper.WriteLine("Failure: j + 1 != k"); + // Failure: j + 1 != k return (1); } return (ret); @@ -3089,12 +3077,12 @@ public static int Main_old(string[] args) } if (i + 1 != j) { - OutputHelper.WriteLine("Failure: i + 1 != j"); + // Failure: i + 1 != j return (1); } if (j + 1 != k) { - OutputHelper.WriteLine("Failure: j + 1 != k"); + // Failure: j + 1 != k return (1); } return (ret); @@ -3118,12 +3106,12 @@ public static int Main_old(string[] args) } if (i + 1 != j) { - OutputHelper.WriteLine("Failure: i + 1 != j"); + // Failure: i + 1 != j return (1); } if (j + 1 != k) { - OutputHelper.WriteLine("Failure: j + 1 != k"); + // Failure: j + 1 != k return (1); } return (ret); @@ -3213,7 +3201,7 @@ public static int Main_old() foreach (char C in Str) { return 1; - OutputHelper.WriteLine("Fail"); + // Fail } } catch (System.Exception) @@ -3307,7 +3295,7 @@ public static int Main_old(string[] args) bool bFalse = false; while (bFalse) { - OutputHelper.WriteLine("Hello World"); + // Hello World return (1); } return (0); @@ -3325,7 +3313,7 @@ public static int Main_old(string[] args) bool bTrue = true; while (bTrue) { - OutputHelper.WriteLine("Hello World"); + // Hello World return (0); } return (1); @@ -3485,19 +3473,19 @@ public static int Main_old(string[] args) { int i = 5; int ret = 0; - OutputHelper.WriteLine("Doing while"); + // Doing while while (--i != 0) continue; if (i != 0) return (1); - OutputHelper.WriteLine("Doing do/while"); + // Doing do/while i = 5; do continue; while (--i != 0); if (i != 0) return (1); - OutputHelper.WriteLine("Doing for"); + // Doing for for (i = 5; i != 0; i--) continue; int[] iArr = new int[20]; @@ -4270,13 +4258,13 @@ private int Method() } catch (System.Exception e) { - OutputHelper.WriteLine("Rethrow"); + // Rethrow throw; } } catch (System.Exception e) { - OutputHelper.WriteLine("Recatch"); + // Recatch return (0); } return (1); @@ -4799,7 +4787,7 @@ public static void Main_old() } catch { - OutputHelper.WriteLine("System.Exception caught"); + // System.Exception caught } } public static bool testMethod() @@ -4847,7 +4835,7 @@ public static void Main_old() } catch { - OutputHelper.WriteLine("System.Exception caught"); + // System.Exception caught } } public static bool testMethod() @@ -4875,7 +4863,7 @@ public static void Main_old() } catch { - OutputHelper.WriteLine("System.Exception caught"); + // System.Exception caught } } public static bool testMethod() @@ -4903,7 +4891,7 @@ public static void Main_old() } catch { - OutputHelper.WriteLine("System.Exception caught"); + // System.Exception caught } } public static bool testMethod() @@ -4929,7 +4917,7 @@ public static void Main_old() } catch { - OutputHelper.WriteLine("System.Exception caught"); + // System.Exception caught } } public static bool testMethod() diff --git a/Tests/NFUnitTestStruct/UnitTestStructs.cs b/Tests/NFUnitTestStruct/UnitTestStructs.cs index 54665ed2..257824c3 100644 --- a/Tests/NFUnitTestStruct/UnitTestStructs.cs +++ b/Tests/NFUnitTestStruct/UnitTestStructs.cs @@ -40,7 +40,7 @@ public void Structs12_Test() [TestMethod] public void Structs13_Test() { - OutputHelper.WriteLine("Expected failure, see 16852 for more details"); + // Expected failure, see 16852 for more details StructsTestClass_13_Notes.Note(); Assert.IsTrue(StructsTestClass_13.testMethod()); @@ -199,7 +199,7 @@ class StructsTestClass_01_Notes { public static void Note() { - OutputHelper.WriteLine(" Declaring a struct with and without a trailing semicolon. "); + // Declaring a struct with and without a trailing semicolon. } } struct StructsTestClass_01_Struct1 @@ -226,7 +226,7 @@ class StructsTestClass_04_Notes { public static void Note() { - OutputHelper.WriteLine(" Verify all valid protection levels for members and methods"); + // Verify all valid protection levels for members and methods } } struct StructsTestClass_04_Struct1 @@ -273,7 +273,7 @@ class StructsTestClass_11_Notes { public static void Note() { - OutputHelper.WriteLine(" Verify struct can implement an interface."); + // Verify struct can implement an interface. } } interface Inter1 @@ -297,7 +297,7 @@ class StructsTestClass_12_Notes { public static void Note() { - OutputHelper.WriteLine(" Verify struct can implement multiple interfaces."); + // Verify struct can implement multiple interfaces. } } interface StructsTestClass_12_Inter1 @@ -331,7 +331,7 @@ class StructsTestClass_13_Notes { public static void Note() { - OutputHelper.WriteLine(" Verify struct can implement multiple interfaces that contain methods with identical signatures."); + // Verify struct can implement multiple interfaces that contain methods with identical signatures. } } interface StructsTestClass_13_Inter1 @@ -375,7 +375,7 @@ class StructsTestClass_14_Notes { public static void Note() { - OutputHelper.WriteLine(" Verify that a struct can contain a class"); + // Verify that a struct can contain a class } } class StructsTestClass_14_Class1 @@ -402,7 +402,7 @@ class StructsTestClass_15_Notes { public static void Note() { - OutputHelper.WriteLine(" Verify that a struct can contain another sruct"); + // Verify that a struct can contain another sruct } } struct StructsTestClass_15_Struct1 @@ -430,7 +430,7 @@ class StructsTestClass_19_Notes { public static void Note() { - OutputHelper.WriteLine("Attempt to use an empty StructsTestClass_19_Struct"); + // Attempt to use an empty StructsTestClass_19_Struct } } struct StructsTestClass_19_Struct1 @@ -454,7 +454,7 @@ class StructsTestClass_21_Notes { public static void Note() { - OutputHelper.WriteLine("attempt to return a struct"); + // attempt to return a struct } } public struct StructsTestClass_21_Struct1 @@ -490,7 +490,7 @@ class StructsTestClass_23_Notes { public static void Note() { - OutputHelper.WriteLine("struct like an object"); + // struct like an object } } struct StructsTestClass_23_Struct1 @@ -515,7 +515,7 @@ class StructsTestClass_24_Notes { public static void Note() { - OutputHelper.WriteLine(" struct values aren't changed when boxed and passed as interfaces."); + // struct values aren't changed when boxed and passed as interfaces. } } public interface Interface1 @@ -557,7 +557,7 @@ class StructsTestClass_26_Notes { public static void Note() { - OutputHelper.WriteLine(" StructsTestClass_26_A ttempt to make a parameterized conStructsTestClass_26_Structor for a StructsTestClass_?_Struct."); + // StructsTestClass_26_A ttempt to make a parameterized conStructsTestClass_26_Structor for a StructsTestClass_?_Struct. } } struct StructsTestClass_26_Struct1 @@ -581,7 +581,7 @@ class StructsTestClass_28_Notes { public static void Note() { - OutputHelper.WriteLine(" Explicit test of object boxing conversions to and from a StructsTestClass_28_Struct."); + // Explicit test of object boxing conversions to and from a StructsTestClass_28_Struct. } } struct StructsTestClass_28_Struct1 @@ -606,7 +606,7 @@ class StructsTestClass_29_Notes { public static void Note() { - OutputHelper.WriteLine(" StructsTestClass_29 conStructsTestClass_29_Structor forwarding works for StructsTestClass_?_Structs"); + // StructsTestClass_29 conStructsTestClass_29_Structor forwarding works for StructsTestClass_?_Structs } } struct Foo @@ -642,7 +642,7 @@ class StructsTestClass_32_Notes { public static void Note() { - OutputHelper.WriteLine(" nested struct should work"); + // nested struct should work } } public struct StructsTestClass_32_Struct @@ -672,7 +672,7 @@ class StructsTestClass_33_Notes { public static void Note() { - OutputHelper.WriteLine(" nested class inside struct should work"); + // nested class inside struct should work } } public struct StructsTestClass_33_Struct @@ -702,7 +702,7 @@ class StructsTestClass_34_Notes { public static void Note() { - OutputHelper.WriteLine(" nested struct should work"); + // nested struct should work } } public struct StructsTestClass_34_Struct @@ -742,7 +742,7 @@ class StructsTestClass_35_Notes { public static void Note() { - OutputHelper.WriteLine(" cast struct to inherited interface type"); + // cast struct to inherited interface type } } public interface StructsTestClass_35_Interface @@ -772,7 +772,7 @@ class StructsTestClass_36_Notes { public static void Note() { - OutputHelper.WriteLine(" cast struct to inherited interface type"); + // cast struct to inherited interface type } } public interface StructsTestClass_36_Interface @@ -802,7 +802,7 @@ class StructsTestClass_37_Notes { public static void Note() { - OutputHelper.WriteLine(" cast struct to inherited interface type"); + // cast struct to inherited interface type } } public interface StructsTestClass_37_Interface @@ -838,7 +838,7 @@ class StructsTestClass_38_Notes { public static void Note() { - OutputHelper.WriteLine(" cast struct to inherited interface type through function"); + // cast struct to inherited interface type through function } } public interface StructsTestClass_38_Interface @@ -880,7 +880,7 @@ class StructsTestClass_40_Notes { public static void Note() { - OutputHelper.WriteLine(" property in struct"); + // property in struct } } public struct StructsTestClass_40_Struct @@ -908,7 +908,7 @@ class StructsTestClass_41_Notes { public static void Note() { - OutputHelper.WriteLine(" indexer in struct"); + // indexer in struct } } public struct StructsTestClass_41_Struct @@ -936,7 +936,7 @@ class StructsTestClass_42_Notes { public static void Note() { - OutputHelper.WriteLine(" interface indexer in StructsTestClass_42_Struct"); + // interface indexer in StructsTestClass_42_Struct } } public interface StructsTestClass_42_Interface @@ -968,7 +968,7 @@ class StructsTestClass_43_Notes { public static void Note() { - OutputHelper.WriteLine(" delegate in struct"); + // delegate in struct } } public struct StructsTestClass_43_Struct @@ -995,7 +995,7 @@ class StructsTestClass_44_Notes { public static void Note() { - OutputHelper.WriteLine(" delegate in struct assing interface as a delegate argument"); + // delegate in struct assing interface as a delegate argument } } public interface StructsTestClass_44_Interface @@ -1026,7 +1026,7 @@ class StructsTestClass_55_Notes { public static void Note() { - OutputHelper.WriteLine("The this object cannot be used before all of its fields are assigned to"); + // The this object cannot be used before all of its fields are assigned to } } public struct StructsTestClass_55 diff --git a/Tests/NFUnitTestSystemLib/UnitTestDateTime.cs b/Tests/NFUnitTestSystemLib/UnitTestDateTime.cs index 976266d5..df12f3bc 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestDateTime.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestDateTime.cs @@ -21,11 +21,11 @@ public void DateTime_ConstructorTest1() /// 2. Verifies that the created object is a DateTime /// - OutputHelper.WriteLine("Creating new DateTime Object"); + // Creating new DateTime Object DateTime dt = new DateTime(); OutputHelper.WriteLine(dt.ToString()); Type type = dt.GetType(); - OutputHelper.WriteLine("Verifying its type"); + // Verifying its type Assert.IsType(type, Type.GetType("System.DateTime")); } @@ -38,7 +38,7 @@ public void DateTime_ConstructorTest2() /// /// - OutputHelper.WriteLine("Generating 10 random DateTime and Verifying"); + // Generating 10 random DateTime and Verifying for (int i = 0; i < 10; i++) { DateTime dt = GetRandomDateTime(); @@ -64,7 +64,7 @@ public void DateTime_ConstructorTest3() /// 2. Verifies the DateTimes are equal to DateTime.MinValue, DateTime.MaxValue /// /// - OutputHelper.WriteLine("Creating Minimum DateTime and verifying"); + // Creating Minimum DateTime and verifying DateTime minDT1 = DateTime.MinValue; DateTime minDT2 = new DateTime(); DateTime minDT3 = new DateTime(504911232000000000); @@ -74,14 +74,14 @@ public void DateTime_ConstructorTest3() (DateTime.Compare(minDT2, minDT3) != 0) || (DateTime.Compare(minDT3, minDT4) != 0)) { - OutputHelper.WriteLine("DateTime.MinValue = '" + minDT1.Ticks + "'ticks,"); - OutputHelper.WriteLine(" new DateTime() = '" + minDT2.Ticks + "'ticks,"); - OutputHelper.WriteLine("new DateTime(0) = '" + minDT3.Ticks + "'ticks."); + // DateTime.MinValue = '" + minDT1.Ticks + "'ticks, + // new DateTime() = '" + minDT2.Ticks + "'ticks, + // new DateTime(0) = '" + minDT3.Ticks + "'ticks. throw new Exception("Expected 'DateTime.MinValue' is equal to 'new DateTime()', " + "equal to 'new DateTime(0)', equal to 'new DateTime(1, 1, 1, 0, 0, 0, 0)' but got "); } - OutputHelper.WriteLine("Creating Maximum DateTime and verifying"); + // Creating Maximum DateTime and verifying DateTime maxDateTime = new DateTime(946708127999999999); Assert.IsTrue(DateTime.MaxValue.Equals(maxDateTime)); } @@ -94,13 +94,13 @@ public void DateTime_CompareToTest4() /// 2. Verifies that they CompareTo each other /// /// - OutputHelper.WriteLine("Generating random DateTimes b/n 1000 - 9000"); - OutputHelper.WriteLine("comparing eachother with DateTime.CompareTo and verifying"); + // Generating random DateTimes b/n 1000 - 9000 + // comparing eachother with DateTime.CompareTo and verifying DateTime dt1 = DateTime_btwn_1801_And_2801(); DateTime dt2 = new DateTime(year, month, day, hour, minute, second, millisec); - OutputHelper.WriteLine("Comparing two equal DateTimes"); + // Comparing two equal DateTimes Assert.AreEqual(dt1.CompareTo(dt2), 0); - OutputHelper.WriteLine("Comparing Unequal DateTimes and Verifying"); + // Comparing Unequal DateTimes and Verifying dt2 = dt1.Add(new TimeSpan(1)); Assert.IsFalse(dt1.CompareTo(dt2) >= 0); Assert.IsFalse(dt2.CompareTo(dt1) <= 0); @@ -114,7 +114,7 @@ public void DateTime_EqualsTest5() /// 2. Verifies that they Equals each other /// /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt1 = GetRandomDateTime(); DateTime dt2 = new DateTime(ticks); Assert.IsTrue(dt1.Equals(dt2)); @@ -128,7 +128,7 @@ public void DateTime_ToStringTest06() /// 2. Verifies that it correctly returns a string from ToString /// /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); int[] intArr = new int[] { dt.Month, dt.Day, dt.Year, dt.Hour, dt.Minute, dt.Second }; string[] strArr = new string[] { "", "", "", "", "", "" }; @@ -164,13 +164,13 @@ public void DateTime_ToStringTest08() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); OutputHelper.WriteLine($"Test DateTime is: {dt}"); - OutputHelper.WriteLine("DateTime.ToString(String) using specified formats and Verifying"); + // DateTime.ToString(String) using specified formats and Verifying // ShortDatePattern string specifier1 = "d"; @@ -214,7 +214,7 @@ public void DateTime_ToStringTest09() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -284,7 +284,7 @@ public void DateTime_ToStringTest10() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -369,7 +369,7 @@ public void DateTime_ToStringTest11() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -457,7 +457,7 @@ public void DateTime_ToStringTest12() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -514,7 +514,7 @@ public void DateTime_ToStringTest13() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -573,7 +573,7 @@ public void DateTime_ToStringTest14() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -640,7 +640,7 @@ public void DateTime_ToStringTest15() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -726,7 +726,7 @@ public void DateTime_ToStringTest16() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -829,7 +829,7 @@ public void DateTime_ToStringTest17() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -890,7 +890,7 @@ public void DateTime_ToStringTest18() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -938,7 +938,7 @@ public void DateTime_ToStringTest19() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -983,7 +983,7 @@ public void DateTime_ToStringTest20() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -1044,7 +1044,7 @@ public void DateTime_ToStringTest21() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -1129,7 +1129,7 @@ public void DateTime_ToStringTest22() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -1188,7 +1188,7 @@ public void DateTime_ToStringTest23() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -1263,7 +1263,7 @@ public void DateTime_ToStringTest24() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -1309,7 +1309,7 @@ public void DateTime_ToStringTest25() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -1364,7 +1364,7 @@ public void DateTime_ToStringTest26() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -1424,7 +1424,7 @@ public void DateTime_ToStringTest27() /// 1. Creates a DateTime /// 2. Verifies DateTime.ToString (String) returns correct String using a specified format /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime dt = GetRandomDateTime(); @@ -1465,7 +1465,7 @@ public void DateTime_AddTest8() /// 2. Runs the Add function and verifies output /// /// - OutputHelper.WriteLine("Generating random DateTimes "); + // Generating random DateTimes DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); TimeSpan ts; Random random = new Random(); @@ -1480,7 +1480,7 @@ public void DateTime_AddTest8() { ts = new TimeSpan(random.Next(1000)); } - OutputHelper.WriteLine("Adding '" + ts.ToString() + "' Timespan to '" + dt1.ToString() + "'"); + // Adding '" + ts.ToString() + "' Timespan to '" + dt1.ToString() + "' DateTime dt2 = dt1.Add(ts); Assert.AreEqual(dt2.Ticks, (dt1.Ticks + ts.Ticks)); } @@ -1494,15 +1494,15 @@ public void DateTime_AddDays_PositiveTest9() /// 2. Runs the AddDays function and verifies output /// /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random +ve Days and verifying"); + // Adding Random +ve Days and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double dy = random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + dy + "' days to '" + dt1.ToString() + "'"); + // Adding '" + dy + "' days to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddDays(dy); if (!CheckDeviation((long)(dt1.Ticks + (dy * TimeSpan.TicksPerDay)), dt2.Ticks)) { @@ -1522,17 +1522,17 @@ public void DateTime_AddDays_NegativeTest10() /// /// - OutputHelper.WriteLine("This is fixed, DateTime.AddXXXX methods do not handle negative"); - OutputHelper.WriteLine("values correctly on Device, see 22728 for details"); - OutputHelper.WriteLine("Generating random DateTime"); + // This is fixed, DateTime.AddXXXX methods do not handle negative + // values correctly on Device, see 22728 for details + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random -ve Days and verifying"); + // Adding Random -ve Days and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double dy = -random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + dy + "' days to '" + dt1.ToString() + "'"); + // Adding '" + dy + "' days to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddDays(dy); if (!CheckDeviation((long)(dt1.Ticks + (dy * TimeSpan.TicksPerDay)), dt2.Ticks)) { @@ -1552,15 +1552,15 @@ public void DateTime_AddHours_PositiveTest11() /// /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random +ve Hours and verifying"); + // Adding Random +ve Hours and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double hr = random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + hr + "' hours to '" + dt1.ToString() + "'"); + // Adding '" + hr + "' hours to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddHours(hr); if (!CheckDeviation((long)(dt1.Ticks + (hr * TimeSpan.TicksPerHour)), dt2.Ticks)) { @@ -1580,17 +1580,17 @@ public void DateTime_AddHours_NegativeTest12() /// /// - OutputHelper.WriteLine("This is fixed, DateTime.AddXXXX methods do not handle negative"); - OutputHelper.WriteLine("values correctly on Device, see 22728 for details"); - OutputHelper.WriteLine("Generating random DateTime"); + // This is fixed, DateTime.AddXXXX methods do not handle negative + // values correctly on Device, see 22728 for details + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random -ve Hours and verifying"); + // Adding Random -ve Hours and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double hr = -random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + hr + "' hours to '" + dt1.ToString() + "'"); + // Adding '" + hr + "' hours to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddHours(hr); if (!CheckDeviation((long)(dt1.Ticks + (hr * TimeSpan.TicksPerHour)), dt2.Ticks)) { @@ -1608,15 +1608,15 @@ public void DateTime_AddMilliseconds_PositiveTest13() /// 1. Creates a DateTime /// 2. Runs the AddMilliseconds function and verifies output /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random +ve Milliseconds and verifying"); + // Adding Random +ve Milliseconds and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double msec = random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + msec + "' milliseconds to '" + dt1.ToString() + "'"); + // Adding '" + msec + "' milliseconds to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddMilliseconds(msec); if (!CheckDeviation((long)(dt1.Ticks + (msec * TimeSpan.TicksPerMillisecond)), dt2.Ticks)) { @@ -1634,17 +1634,17 @@ public void DateTime_AddMilliseconds_NegativeTest14() /// 1. Creates a DateTime /// 2. Runs the AddMilliseconds function and verifies output /// - OutputHelper.WriteLine("This is fixed, DateTime.AddXXXX methods do not handle negative"); - OutputHelper.WriteLine("values correctly on Device, see 22728 for details"); - OutputHelper.WriteLine("Generating random DateTime"); + // This is fixed, DateTime.AddXXXX methods do not handle negative + // values correctly on Device, see 22728 for details + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random -ve Milliseconds and verifying"); + // Adding Random -ve Milliseconds and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double msec = -random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + msec + "' milliseconds to '" + dt1.ToString() + "'"); + // Adding '" + msec + "' milliseconds to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddMilliseconds(msec); if (!CheckDeviation((long)(dt1.Ticks + (msec * TimeSpan.TicksPerMillisecond)), dt2.Ticks)) { @@ -1662,15 +1662,15 @@ public void DateTime_AddMinutes_PositiveTest15() /// 1. Creates a DateTime /// 2. Runs the AddMinutes function and verifies output /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random +ve Minutes and verifying"); + // Adding Random +ve Minutes and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double mnts = random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + mnts + "' minutes to '" + dt1.ToString() + "'"); + // Adding '" + mnts + "' minutes to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddMinutes(mnts); if (!CheckDeviation((long)(dt1.Ticks + (mnts * TimeSpan.TicksPerMinute)), dt2.Ticks)) { @@ -1688,17 +1688,17 @@ public void DateTime_AddMinutes_NegativeTest16() /// 1. Creates a DateTime /// 2. Runs the AddMinutes function and verifies output /// - OutputHelper.WriteLine("This is fixed, DateTime.AddXXXX methods do not handle negative"); - OutputHelper.WriteLine("values correctly on Device, see 22728 for details"); - OutputHelper.WriteLine("Generating random DateTime"); + // This is fixed, DateTime.AddXXXX methods do not handle negative + // values correctly on Device, see 22728 for details + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random -ve Minutes and verifying"); + // Adding Random -ve Minutes and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double mnts = -random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + mnts + "' minutes to '" + dt1.ToString() + "'"); + // Adding '" + mnts + "' minutes to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddMinutes(mnts); if (!CheckDeviation((long)(dt1.Ticks + (mnts * TimeSpan.TicksPerMinute)), dt2.Ticks)) { @@ -1716,15 +1716,15 @@ public void DateTime_AddSeconds_PositiveTest18() /// 1. Creates a DateTime /// 2. Runs the AddSeconds function and verifies output /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random +ve Seconds and verifying"); + // Adding Random +ve Seconds and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double sec = random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + sec + "' seconds to '" + dt1.ToString() + "'"); + // Adding '" + sec + "' seconds to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddSeconds(sec); if (!CheckDeviation((long)(dt1.Ticks + (sec * TimeSpan.TicksPerSecond)), dt2.Ticks)) { @@ -1742,17 +1742,17 @@ public void DateTime_AddSeconds_NegativeTest19() /// 1. Creates a DateTime /// 2. Runs the AddSeconds function and verifies output /// - OutputHelper.WriteLine("This is fixed, DateTime.AddXXXX methods do not handle negative"); - OutputHelper.WriteLine("values correctly on Device, see 22728 for details"); - OutputHelper.WriteLine("Generating random DateTime"); + // This is fixed, DateTime.AddXXXX methods do not handle negative + // values correctly on Device, see 22728 for details + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random -ve Seconds and verifying"); + // Adding Random -ve Seconds and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; double sec = -random.Next(1000) * rdmFraction[random.Next(rdmFraction.Length)]; - OutputHelper.WriteLine("Adding '" + sec + "' seconds to '" + dt1.ToString() + "'"); + // Adding '" + sec + "' seconds to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddSeconds(sec); if (!CheckDeviation((long)(dt1.Ticks + (sec * TimeSpan.TicksPerSecond)), dt2.Ticks)) { @@ -1770,15 +1770,15 @@ public void DateTime_AddTicks_PositiveTest20() /// 1. Creates a DateTime /// 2. Runs the AddTicks function and verifies output /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random +ve Ticks and verifying"); + // Adding Random +ve Ticks and verifying for (int i = 0; i < dt1Arr.Length; i++) { DateTime dt1 = dt1Arr[i]; long ticks = (long)random.Next(1000); - OutputHelper.WriteLine("Adding '" + ticks + "' ticks to '" + dt1.ToString() + "'"); + // Adding '" + ticks + "' ticks to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddTicks(ticks); Assert.AreEqual(dt2.Ticks, (dt1.Ticks + ticks)); } @@ -1791,15 +1791,15 @@ public void DateTime_AddTicks_NegativeTest21() /// 1. Creates a DateTime /// 2. Runs the AddTicks function and verifies output /// - OutputHelper.WriteLine("Generating random DateTime"); + // Generating random DateTime DateTime[] dt1Arr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); - OutputHelper.WriteLine("Adding Random -ve Ticks and verifying"); + // Adding Random -ve Ticks and verifying for (int i = 0; i < 10; i++) { DateTime dt1 = dt1Arr[i]; long ticks = -(long)random.Next(1000); - OutputHelper.WriteLine("Adding '" + ticks + "' ticks to '" + dt1.ToString() + "'"); + // Adding '" + ticks + "' ticks to '" + dt1.ToString() + "' DateTime dt2 = dt1.AddTicks(ticks); Assert.AreEqual(dt2.Ticks, (dt1.Ticks + ticks)); } @@ -1812,17 +1812,17 @@ public void DateTime_Compare_Test23() /// 1. Creates two DateTimes /// 2. Verifies that they Compare with each other /// - OutputHelper.WriteLine("Creating two Random but equal DateTime b/n 1000 - 9000"); - OutputHelper.WriteLine("Comparing eachother with DateTime.Compare and Verifying"); + // Creating two Random but equal DateTime b/n 1000 - 9000 + // Comparing eachother with DateTime.Compare and Verifying DateTime dt1 = DateTime_btwn_1801_And_2801(); DateTime dt2 = new DateTime(year, month, day, hour, minute, second, millisec); - OutputHelper.WriteLine("Comparing equal DateTimes and Verifying"); + // Comparing equal DateTimes and Verifying if (DateTime.Compare(dt1, dt2) != 0) { throw new Exception("Expected DateTime.Compare(" + dt1.ToString() + ", " + dt2.ToString() + ") returns '0' but got '" + DateTime.Compare(dt1, dt2) + "'"); } - OutputHelper.WriteLine("Comparing Unequal DateTimes and Verifying"); + // Comparing Unequal DateTimes and Verifying dt2 = dt1.Add(new TimeSpan(1)); if (DateTime.Compare(dt1, dt2) >= 0) { @@ -1843,16 +1843,16 @@ public void DateTime_DaysInMonth_Test24() /// /// 1. Verifies the accuracy of the DaysInMonth method /// - OutputHelper.WriteLine("Generates a random year and month, and"); + // Generates a random year and month, and Random random = new Random(); - OutputHelper.WriteLine("Verifies the number of days in the specific month/year"); + // Verifies the number of days in the specific month/year for (int i = 0; i < 100; i++) { int yr = random.Next(9999) + 1; int mnth = random.Next(12) + 1; DaysInMonthTest(yr, mnth); } - OutputHelper.WriteLine("Verifying no. of days in Feb, for 20th and 21st centuries"); + // Verifying no. of days in Feb, for 20th and 21st centuries for (int yr = 1900; yr < 2100; yr += 4) { DaysInMonthTest(yr, 2); @@ -1862,8 +1862,8 @@ public void DateTime_DaysInMonth_Test24() [TestMethod] public void DateTime_EqualsTest25() { - OutputHelper.WriteLine("Creating random-equal DateTimes"); - OutputHelper.WriteLine("And Verifying they are equal"); + // Creating random-equal DateTimes + // And Verifying they are equal DateTime dt1 = DateTime_btwn_1801_And_2801(); DateTime dt2 = new DateTime(year, month, day, hour, minute, second, millisec); Assert.IsTrue(DateTime.Equals(dt1, dt2)); @@ -1875,8 +1875,8 @@ public void DateTime_EqualsTest25() [TestMethod] public void DateTime_Subtract_DateTimeTest26() { - OutputHelper.WriteLine("Creating two Random DateTimes,"); - OutputHelper.WriteLine("dt1.Subtract(dt2) and verifying"); + // Creating two Random DateTimes, + // dt1.Subtract(dt2) and verifying DateTime dt1 = GetRandomDateTime(); DateTime dt2 = GetRandomDateTime(); TimeSpan ts1 = dt1.Subtract(dt2); @@ -1888,8 +1888,8 @@ public void DateTime_Subtract_DateTimeTest26() [TestMethod] public void DateTime_Subtract_TimeSpanTest27() { - OutputHelper.WriteLine("Creating now DateTime"); - OutputHelper.WriteLine("Subtracting random timespans and "); + // Creating now DateTime + // Subtracting random timespans and DateTime[] dtArr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); TimeSpan ts; @@ -1918,8 +1918,8 @@ public void DateTime_Subtract_TimeSpanTest27() [TestMethod] public void DateTime_op_AdditionTest30() { - OutputHelper.WriteLine("Creating Random DateTimes,"); - OutputHelper.WriteLine("Adds a specified period of time and verifying"); + // Creating Random DateTimes, + // Adds a specified period of time and verifying DateTime[] dtArr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); @@ -1944,8 +1944,8 @@ public void DateTime_op_AdditionTest30() [TestMethod] public void DateTime_op_Subtraction_DateTimeTest31() { - OutputHelper.WriteLine("Creating Random DateTimes,"); - OutputHelper.WriteLine("Subtracting one from the other and verifying"); + // Creating Random DateTimes, + // Subtracting one from the other and verifying DateTime[] dtArr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); for (int i = 0; i < dtArr.Length; i++) @@ -1960,8 +1960,8 @@ public void DateTime_op_Subtraction_DateTimeTest31() [TestMethod] public void DateTime_op_Subtraction_TimeSpanTest32() { - OutputHelper.WriteLine("Creating Random DateTime,"); - OutputHelper.WriteLine("Subtracting random TimeSpan and verifying"); + // Creating Random DateTime, + // Subtracting random TimeSpan and verifying DateTime[] dtArr = Get_ArrayOfRandomDateTimes(); Random random = new Random(); for (int i = 0; i < dtArr.Length; i++) @@ -1977,9 +1977,9 @@ public void DateTime_op_Subtraction_TimeSpanTest32() [TestMethod] public void DateTime_op_EqualityTest33() { - OutputHelper.WriteLine("Creating Random DateTime,"); - OutputHelper.WriteLine("Creating another DateTime equal to previous one"); - OutputHelper.WriteLine("Verifying the two DateTimes are equal using '=='"); + // Creating Random DateTime, + // Creating another DateTime equal to previous one + // Verifying the two DateTimes are equal using '==' DateTime dt1 = GetRandomDateTime(); DateTime dt2 = new DateTime(dt1.Ticks); @@ -1993,9 +1993,9 @@ public void DateTime_op_EqualityTest33() [TestMethod] public void DateTime_op_InequalityTest34() { - OutputHelper.WriteLine("Creating Random DateTime,"); - OutputHelper.WriteLine("Creating another Different DateTime"); - OutputHelper.WriteLine("Verifying the two DateTimes are not equal using '!='"); + // Creating Random DateTime, + // Creating another Different DateTime + // Verifying the two DateTimes are not equal using '!=' DateTime dt1 = GetRandomDateTime(); DateTime dt2 = new DateTime(dt1.Ticks + 100); @@ -2009,9 +2009,9 @@ public void DateTime_op_InequalityTest34() [TestMethod] public void DateTime_op_LessThanTest35() { - OutputHelper.WriteLine("Creating Random DateTime,"); - OutputHelper.WriteLine("Creating another Different DateTime greater than previous one"); - OutputHelper.WriteLine("Verifying 1st DateTime is less than 2nd using '<'"); + // Creating Random DateTime, + // Creating another Different DateTime greater than previous one + // Verifying 1st DateTime is less than 2nd using '<' DateTime dt1 = GetRandomDateTime(); DateTime dt2 = new DateTime(year + 1, month, day, hour, minute, second, millisec); @@ -2025,10 +2025,10 @@ public void DateTime_op_LessThanTest35() [TestMethod] public void DateTime_op_LessThanOrEqualTest36() { - OutputHelper.WriteLine("Creating Random DateTime, Creaing 2nd equal DateTime"); - OutputHelper.WriteLine("Creating 3rd Different DateTime greater than previous two"); - OutputHelper.WriteLine("Verifying 1st DateTime is less than or equal to 2nd DateTime using '<='"); - OutputHelper.WriteLine("Verifying 1st DateTime is less than or equal to 3rd DateTime using '<='"); + // Creating Random DateTime, Creaing 2nd equal DateTime + // Creating 3rd Different DateTime greater than previous two + // Verifying 1st DateTime is less than or equal to 2nd DateTime using '<=' + // Verifying 1st DateTime is less than or equal to 3rd DateTime using '<=' DateTime dt1 = GetRandomDateTime(); DateTime dt2 = new DateTime(year, month, day, hour, minute, second, millisec); DateTime dt3 = new DateTime(year + 1, month, day, hour, minute, second, millisec); @@ -2047,9 +2047,9 @@ public void DateTime_op_LessThanOrEqualTest36() [TestMethod] public void DateTime_op_GreaterThanTest37() { - OutputHelper.WriteLine("Creating Random DateTime,"); - OutputHelper.WriteLine("Creating another Different DateTime greater than previous one"); - OutputHelper.WriteLine("Verifying 2nd DateTime is greater than 1st using '>'"); + // Creating Random DateTime, + // Creating another Different DateTime greater than previous one + // Verifying 2nd DateTime is greater than 1st using '>' DateTime dt1 = GetRandomDateTime(); DateTime dt2 = new DateTime(year + 1, month, day, hour, minute, second, millisec); @@ -2063,10 +2063,10 @@ public void DateTime_op_GreaterThanTest37() [TestMethod] public void DateTime_op_GreaterThanOrEqualTest38() { - OutputHelper.WriteLine("Creating Random DateTime, Creaing 2nd equal DateTime"); - OutputHelper.WriteLine("Creating 3rd Different DateTime greater than previous two"); - OutputHelper.WriteLine("Verifying 1st DateTime is greater than or equal to 2nd DateTime using '>='"); - OutputHelper.WriteLine("Verifying 3rd DateTime is greater than or equal to 1st DateTime using '>='"); + // Creating Random DateTime, Creaing 2nd equal DateTime + // Creating 3rd Different DateTime greater than previous two + // Verifying 1st DateTime is greater than or equal to 2nd DateTime using '>=' + // Verifying 3rd DateTime is greater than or equal to 1st DateTime using '>=' DateTime dt1 = GetRandomDateTime(); DateTime dt2 = new DateTime(year, month, day, hour, minute, second, millisec); DateTime dt3 = new DateTime(year + 1, month, day, hour, minute, second, millisec); @@ -2088,7 +2088,7 @@ public void DateTime_MinValueTest39() /// /// 1. Verifies the MinValue property /// - OutputHelper.WriteLine("Getting the Min. DateTime and Verifying"); + // Getting the Min. DateTime and Verifying DateTime field = DateTime.MinValue; OutputHelper.WriteLine(field.Ticks.ToString()); Assert.AreEqual(field.Ticks, 504911232000000000); @@ -2100,7 +2100,7 @@ public void DateTime_MaxValueTest40() /// /// 1. Verifies the MinValue property /// - OutputHelper.WriteLine("Getting the Max. DateTime and Verifying"); + // Getting the Max. DateTime and Verifying DateTime field = DateTime.MaxValue; OutputHelper.WriteLine(field.Ticks.ToString()); Assert.AreEqual(field.Ticks, 946708127999999999); @@ -2112,7 +2112,7 @@ public void DateTime_DateTest41() /// /// 1. Verifies the Date property /// - OutputHelper.WriteLine("Creating a DateTime, getting the Date and Verifying"); + // Creating a DateTime, getting the Date and Verifying DateTime dt = GetRandomDateTime(); DateTime _date = dt.Date; if ((_date.Year != dt.Year) || (_date.Month != dt.Month) || (_date.Day != dt.Day) || @@ -2130,7 +2130,7 @@ public void DateTime_DayTest42() /// /// 1. Verifies the Day property /// - OutputHelper.WriteLine("Creating a DateTime, getting the Day and Verifying"); + // Creating a DateTime, getting the Day and Verifying DateTime testDateTime = GetRandomDateTime(); Int32 _day = testDateTime.Day; Assert.AreEqual(_day, day); @@ -2142,7 +2142,7 @@ public void DateTime_DayOfWeekTest43() /// /// 1. Verifies the DayOfWeek property /// - OutputHelper.WriteLine("Creating a DateTime, getting the DayOfWeek and Verifying"); + // Creating a DateTime, getting the DayOfWeek and Verifying DateTime testDateTime = new DateTime(2005, 1, 28); DayOfWeek prop = testDateTime.DayOfWeek; Assert.AreEqual((int)prop, (int)DayOfWeek.Friday); @@ -2154,8 +2154,8 @@ public void DateTime_DayOfYearTest44() /// /// 1. Verifies the DayOfYear property /// - OutputHelper.WriteLine("Creating a DateTime, getting the DayOfYear and Verifying"); - OutputHelper.WriteLine("DateTime::DayOfYear - Normal "); + // Creating a DateTime, getting the DayOfYear and Verifying + // DateTime::DayOfYear - Normal DateTime testDateTime = new DateTime(2005, 1, 1); int _dayOfYear = testDateTime.DayOfYear; Assert.AreEqual(_dayOfYear, 1); @@ -2167,7 +2167,7 @@ public void DateTime_HourTest45() /// /// 1. Verifies the Hour property /// - OutputHelper.WriteLine("Creating a DateTime, getting the Hour and Verifying"); + // Creating a DateTime, getting the Hour and Verifying DateTime testDateTime = GetRandomDateTime(); Int32 _hour = testDateTime.Hour; Assert.AreEqual(_hour, hour); @@ -2179,7 +2179,7 @@ public void DateTime_MillisecondTest46() /// /// 1. Verifies the Millisecond property /// - OutputHelper.WriteLine("Creating a DateTime, getting the Milliseconds and Verifying"); + // Creating a DateTime, getting the Milliseconds and Verifying DateTime testDateTime = GetRandomDateTime(); Int32 _mSec = testDateTime.Millisecond; Assert.AreEqual(_mSec, millisec); @@ -2191,7 +2191,7 @@ public void DateTime_MinuteTest47() /// /// 1. Verifies the Minute property /// - OutputHelper.WriteLine("Creating a DateTime, getting the Minute and Verifying"); + // Creating a DateTime, getting the Minute and Verifying DateTime testDateTime = GetRandomDateTime(); Int32 _minute = testDateTime.Minute; Assert.AreEqual(_minute, minute); @@ -2203,7 +2203,7 @@ public void DateTime_MonthTest48() /// /// 1. Verifies the Month property /// - OutputHelper.WriteLine("Creating a DateTime, getting the Month and Verifying"); + // Creating a DateTime, getting the Month and Verifying DateTime testDateTime = GetRandomDateTime(); Int32 _month = testDateTime.Month; Assert.AreEqual(_month, month); @@ -2216,10 +2216,10 @@ public void DateTime_NowTest49() /// 1. Creates 2 DateTimes /// 2. Verifies they are equal in all but Seconds and Millisecond /// - OutputHelper.WriteLine("Creating 2 DateTimes and verifying they are equal in yy/mm/dd/hr/mn"); + // Creating 2 DateTimes and verifying they are equal in yy/mm/dd/hr/mn DateTime test0 = DateTime.UtcNow; DateTime test1 = DateTime.UtcNow; - OutputHelper.WriteLine("Verifying"); + // Verifying if ((test0.Year != test1.Year) || (test0.Month != test1.Month) || (test0.Day != test1.Day) || (test0.Hour != test1.Hour) || (test0.Minute != test1.Minute)) @@ -2235,7 +2235,7 @@ public void DateTime_SecondTest51() /// /// 1. Verifies the Second property /// - OutputHelper.WriteLine("Creating a DateTime, getting the Second and Verifying"); + // Creating a DateTime, getting the Second and Verifying DateTime testDateTime = GetRandomDateTime(); Int32 _sec = testDateTime.Second; Assert.AreEqual(_sec, second); @@ -2247,7 +2247,7 @@ public void DateTime_TicksTest52() /// /// 1. Verifies the Ticks property /// - OutputHelper.WriteLine("Creating a DateTime, getting the Ticks and Verifying"); + // Creating a DateTime, getting the Ticks and Verifying DateTime testDateTime = new System.DateTime(504911232000000000); long _ticks = testDateTime.Ticks; Assert.AreEqual(_ticks, 504911232000000000); @@ -2259,7 +2259,7 @@ public void DateTime_YearTest54() /// /// 1. Verifies the Year property /// - OutputHelper.WriteLine("Creating a DateTime.Today, getting the year and Verifying"); + // Creating a DateTime.Today, getting the year and Verifying DateTime testDateTime = GetRandomDateTime(); Int32 _year = testDateTime.Year; Assert.AreEqual(_year, year); @@ -2273,16 +2273,16 @@ public void DateTime_YearTest54() [TestMethod] public void DateTime_BelowMinDateTime_ArgumentOutOfRangeExceptionTest58() { - OutputHelper.WriteLine("Creating a DateTime with -ve Ticks and,"); - OutputHelper.WriteLine("verifying ArgumentOutOfRangeException is thrown"); + // Creating a DateTime with -ve Ticks and, + // verifying ArgumentOutOfRangeException is thrown Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { DateTime dt = new DateTime(-(new Random().Next(10) + 1)); }); } [TestMethod] public void DateTime_AboveMaxDatTime_ArgumentOutOfRangeExceptionTest59() { - OutputHelper.WriteLine("Creating a DateTime later than DateTime.MaxValue and,"); - OutputHelper.WriteLine("verifying ArgumentOutOfRangeException is thrown"); + // Creating a DateTime later than DateTime.MaxValue and, + // verifying ArgumentOutOfRangeException is thrown Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { DateTime dt1 = new DateTime(DateTime.MaxValue.Ticks + 1); }); Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { DateTime dt2 = new DateTime(10000, 1, 1, 0, 0, 0, 0); }); } @@ -2471,7 +2471,7 @@ private bool CheckDeviation(long dTicks1, long dTicks2) //fail if deviates by more than 0.05ms (500 ticks) if (diff > 500) { - OutputHelper.WriteLine("Difference ticks = '" + diff.ToString() + "'"); + // Difference ticks = '" + diff.ToString() + "' return false; } return true; @@ -2480,7 +2480,7 @@ private bool CheckDeviation(long dTicks1, long dTicks2) public void DaysInMonthTest(int yr, int mnth) { int daysInMonth = DateTime.DaysInMonth(yr, mnth); - OutputHelper.WriteLine("Got " + daysInMonth + " number of days in " + mnth + "/" + yr + " mm/yr"); + // Got " + daysInMonth + " number of days in " + mnth + "/" + yr + " mm/yr if (mnth == 2) { if (IsLeapYear(yr)) diff --git a/Tests/NFUnitTestSystemLib/UnitTestGCTest.cs b/Tests/NFUnitTestSystemLib/UnitTestGCTest.cs index 859f02f0..1f017a38 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestGCTest.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestGCTest.cs @@ -21,7 +21,7 @@ class FinalizeObject { if (m_hasFinalized1 == false) { - OutputHelper.WriteLine("First finalization"); + // First finalization // Put this object back into a root by creating // a reference to it. @@ -36,7 +36,7 @@ class FinalizeObject } else { - OutputHelper.WriteLine("Second finalization"); + // Second finalization m_hasFinalized2 = true; } } @@ -58,16 +58,16 @@ class FinalizeObject // /// 6. Verify that object has been collected // /// // /// - // OutputHelper.WriteLine("Tests ReRegisterForFinalize"); - // OutputHelper.WriteLine("Create a FinalizeObject."); + // // Tests ReRegisterForFinalize + // // Create a FinalizeObject. // FinalizeObject mfo = new FinalizeObject(); // m_hasFinalized1 = false; // m_hasFinalized2 = false; - // OutputHelper.WriteLine("Release reference"); + // // Release reference // mfo = null; - // OutputHelper.WriteLine("Allow GC"); + // // Allow GC // GC.WaitForPendingFinalizers(); // int sleepTime = 1000; // int slept = 0; @@ -83,7 +83,7 @@ class FinalizeObject // // FinalizeObject.m_currentInstance field. Setting this value // // to null and forcing another garbage collection will now // // cause the object to Finalize permanently. - // OutputHelper.WriteLine("Reregister and allow for GC"); + // // Reregister and allow for GC // FinalizeObject.m_currentInstance = null; // GC.WaitForPendingFinalizers(); // sleepTime = 1000; @@ -110,17 +110,17 @@ class FinalizeObject // /// 6. Verify that object has not been collected // /// // /// - // OutputHelper.WriteLine("Tests SuppressFinalize"); - // OutputHelper.WriteLine("Create a FinalizeObject."); + // // Tests SuppressFinalize + // // Create a FinalizeObject. // FinalizeObject mfo = new FinalizeObject(); // m_hasFinalized1 = false; // m_hasFinalized2 = false; - // OutputHelper.WriteLine("Releasing"); + // // Releasing // System.GC.SuppressFinalize(mfo); // mfo = null; - // OutputHelper.WriteLine("Allow GC"); + // // Allow GC // GC.WaitForPendingFinalizers(); // int sleepTime = 1000; // int slept = 0; @@ -145,26 +145,26 @@ class FinalizeObject // /// 6. Verify that object has not been collected // /// // /// - // OutputHelper.WriteLine("Tests WaitForPendingFinalizers, dependant on test 1"); - // OutputHelper.WriteLine("will auto-fail if test 1 fails."); + // // Tests WaitForPendingFinalizers, dependant on test 1 + // // will auto-fail if test 1 fails. // Assert.IsTrue(m_Test1Result); - // OutputHelper.WriteLine("Create a FinalizeObject."); + // // Create a FinalizeObject. // FinalizeObject mfo = new FinalizeObject(); // m_hasFinalized1 = false; // m_hasFinalized2 = false; - // OutputHelper.WriteLine("Releasing"); + // // Releasing // mfo = null; - // OutputHelper.WriteLine("Wait for GC"); + // // Wait for GC // GC.WaitForPendingFinalizers(); // System.GC.WaitForPendingFinalizers(); - // OutputHelper.WriteLine("Releasing again"); + // // Releasing again // FinalizeObject.m_currentInstance = null; - // OutputHelper.WriteLine("Wait for GC"); + // // Wait for GC // GC.WaitForPendingFinalizers(); // System.GC.WaitForPendingFinalizers(); diff --git a/Tests/NFUnitTestSystemLib/UnitTestGuid.cs b/Tests/NFUnitTestSystemLib/UnitTestGuid.cs index 1a3e49a9..7b351c3f 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestGuid.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestGuid.cs @@ -214,10 +214,10 @@ public void Guid_CompareTo_Test9() /// Guid guid1 = Guid.Empty; - OutputHelper.WriteLine("Verifing any instance of Guid, regardless of its value, is greater than null"); + // Verifing any instance of Guid, regardless of its value, is greater than null Assert.AreEqual(guid1.CompareTo(null), 1); Byte[] _bArr = new Byte[16]; - OutputHelper.WriteLine("Creating a Guid with all bytes zero"); + // Creating a Guid with all bytes zero Guid guid2 = new Guid(_bArr); Assert.AreEqual(guid1.CompareTo(guid2), 0); Guid guid3 = new Guid(0x4dff36b5, 0x9dde, 0x4f76, 0x9a, 0x2a, 0x96, 0x43, 0x50, 0x47, 0x06, 0x3d); @@ -278,13 +278,13 @@ public void Guid_Equals_Test11() /// /// - OutputHelper.WriteLine("Creating 3 Guids with Guid.Empty and hex values"); + // Creating 3 Guids with Guid.Empty and hex values Guid guid11 = Guid.Empty; Guid guid12 = new Guid(0x4dff36b5, 0x9dde, 0x4f76, 0x9a, 0x2a, 0x96, 0x43, 0x50, 0x47, 0x06, 0x3d); Guid guid13 = new Guid(0x7FFFFFFF, 0x7FFF, 0x7FFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF); Guid[] gArr1 = new Guid[] { guid11, guid12, guid13 }; - OutputHelper.WriteLine("Creating Guids with 16 bytes constructor"); + // Creating Guids with 16 bytes constructor Byte[] _bArr1 = new Byte[16]; Guid guid21 = new Guid(_bArr1); Byte[] _bArr2 = new Byte[] { 181, 54, 255, 77, 222, 157, 118, 79, 154, 42, 150, 67, 80, 71, 6, 61 }; @@ -293,7 +293,7 @@ public void Guid_Equals_Test11() Guid guid23 = new Guid(_bArr3); Guid[] gArr2 = new Guid[] { guid21, guid22, guid23 }; - OutputHelper.WriteLine("Creating 3 Guids with Guid(int, short, short, byte ....) constructor"); + // Creating 3 Guids with Guid(int, short, short, byte ....) constructor Guid guid31 = new Guid(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); Guid guid32 = new Guid(1308571317, 40414, 20342, 154, 42, 150, 67, 80, 71, 6, 61); Guid guid33 = new Guid(int.MaxValue, short.MaxValue, short.MaxValue, byte.MaxValue, byte.MaxValue, diff --git a/Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs b/Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs index a8c76a3d..89ea8ecd 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestInitLocalTests.cs @@ -44,8 +44,8 @@ private bool Method2(float f) [TestMethod] public void SystemType1_GetType_Test() { - OutputHelper.WriteLine("Checking reflection types to assure that they are boxed when used as local variables"); - OutputHelper.WriteLine("and when they are assigned to non-valuetype containers (which used to crash)"); + // Checking reflection types to assure that they are boxed when used as local variables + // and when they are assigned to non-valuetype containers (which used to crash) ArrayList list = new ArrayList(); int i = 0; diff --git a/Tests/NFUnitTestSystemLib/UnitTestStringTests.cs b/Tests/NFUnitTestSystemLib/UnitTestStringTests.cs index b088bf2f..5a79db2d 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestStringTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestStringTests.cs @@ -17,21 +17,21 @@ class UnitTestStringTests [TestMethod] public void Ctor_Test() { - OutputHelper.WriteLine("Test of the standard constructor"); + // Test of the standard constructor char[] car = new Char[] { 'a', 'b', 'c', 'd' }; - OutputHelper.WriteLine("Char [], start, number"); + // Char [], start, number string str = new string(car, 1, 2); Assert.AreEqual(str, "bc"); str = new string(car, 0, 4); Assert.AreEqual(str, "abcd"); - OutputHelper.WriteLine("Char []"); + // Char [] str = new string(car); Assert.AreEqual(str, "abcd"); - OutputHelper.WriteLine("Char, number"); + // Char, number str = new string('\n', 33); Assert.AreEqual(str.Length, 33); for (int i = 0; i < str.Length; i++) @@ -39,17 +39,17 @@ public void Ctor_Test() Assert.AreEqual(str[i], '\n'); } - OutputHelper.WriteLine("Char, string terminator known failure. "); + // Char, string terminator known failure. char[] car2 = new char[] { (char)0, (char)65 }; string s = new string(car2); Assert.AreEqual(s, "\0A"); - OutputHelper.WriteLine("This was previously bug 20620"); + // This was previously bug 20620 - OutputHelper.WriteLine("new char[0]"); + // new char[0] str = new string(new char[0]); Assert.AreEqual(str, string.Empty); - OutputHelper.WriteLine("null"); + // null str = new string(null); Assert.AreEqual(str, string.Empty); } @@ -57,21 +57,21 @@ public void Ctor_Test() [TestMethod] public void CompareTo_Test3() { - OutputHelper.WriteLine("Test of the CompareTo method"); + // Test of the CompareTo method string str = "hello"; object ob = "Hello"; - OutputHelper.WriteLine("NormalCompareTo"); + // NormalCompareTo Assert.AreEqual(str.CompareTo((object)"hello"), 0); Assert.IsTrue(str.CompareTo(ob) > 0); Assert.IsTrue(str.CompareTo((object)"zello") < 0); - OutputHelper.WriteLine("CompareTo null"); + // CompareTo null Assert.IsTrue(str.CompareTo((object)null) > 0); } [TestMethod] public void GetHashCode_Test4() { - OutputHelper.WriteLine("Test of the GetHashCode method"); + // Test of the GetHashCode method string[] strs = new string[] { "abcd", "bcda", "cdab", "dabc" }; for (int i = 0; i < 4; i++) @@ -95,9 +95,9 @@ public void GetHashCode_Test4() [TestMethod] public void Equals_Test5() { - OutputHelper.WriteLine("This verifies the String.Equals functionality."); - OutputHelper.WriteLine("It compares the string value using the Equals function"); - OutputHelper.WriteLine("to valid and invalid values as well as casted object values."); + // This verifies the String.Equals functionality. + // It compares the string value using the Equals function + // to valid and invalid values as well as casted object values. string str = "abcd"; object ob2 = "bcd"; @@ -121,7 +121,7 @@ public void Equals_Test5() [TestMethod] public void ToString_Test6() { - OutputHelper.WriteLine("Test of the ToString method"); + // Test of the ToString method string str = "abc"; Assert.AreEqual(str, str.ToString()); Assert.AreEqual(str, str.ToString().ToString().ToString()); @@ -131,7 +131,7 @@ public void ToString_Test6() [TestMethod] public void ToCharArray_Test13() { - OutputHelper.WriteLine("Test of the ToCharArray method"); + // Test of the ToCharArray method char[] car1 = new Char[] { 'a', 'b', 'c', 'd' }; char[] car2 = new Char[] { }; @@ -140,13 +140,13 @@ public void ToCharArray_Test13() string str2 = "abcde"; string str3 = "ABCD"; - OutputHelper.WriteLine("With 0 args"); + // With 0 args CollectionAssert.AreEqual(str1.ToCharArray(), car1); CollectionAssert.AreNotEqual(str2.ToCharArray(), car1); CollectionAssert.AreNotEqual(str3.ToCharArray(), car1); CollectionAssert.AreNotEqual(str1.ToCharArray(), car2); - OutputHelper.WriteLine("With 1 args"); + // With 1 args CollectionAssert.AreNotEqual(str1.ToCharArray(0, 3), car1); CollectionAssert.AreEqual(str2.ToCharArray(0, 4), car1); CollectionAssert.AreNotEqual(str3.ToCharArray(0, 3), car1); @@ -156,7 +156,7 @@ public void ToCharArray_Test13() [TestMethod] public void Split_Test15() { - OutputHelper.WriteLine("Testing the Split method"); + // Testing the Split method char[] car1 = new Char[] { '@', 'q' }; char[] car2 = new Char[] { }; string str1 = "ab@cd"; @@ -168,9 +168,9 @@ public void Split_Test15() Assert.AreEqual(str2.Split(car1)[1], ""); Assert.AreEqual(str1.Split(car2)[0], "ab@cd"); - OutputHelper.WriteLine("Verify split with a count"); - OutputHelper.WriteLine("This is currently a known issue"); - OutputHelper.WriteLine("20659 String.Split with a count parameter always returns the whole string."); + // Verify split with a count + // This is currently a known issue + // 20659 String.Split with a count parameter always returns the whole string. string[] oneTwoThree = "1 2 3".Split(new char[] { ' ' }, 1); Assert.IsTrue(oneTwoThree.Length <= 1); } @@ -178,7 +178,7 @@ public void Split_Test15() [TestMethod] public void Substring_Test17() { - OutputHelper.WriteLine("Testing the Substring method"); + // Testing the Substring method string str1 = "abcde"; Assert.AreEqual(str1.Substring(0), str1); @@ -190,7 +190,7 @@ public void Substring_Test17() [TestMethod] public void Trim_Test19() { - OutputHelper.WriteLine("Testing the Trim method"); + // Testing the Trim method char[] car1 = new Char[] { '@', 'q' }; string str1 = " abc@de "; @@ -204,7 +204,7 @@ public void Trim_Test19() [TestMethod] public void TrimStart_Test20() { - OutputHelper.WriteLine("Testing the TrimStart method"); + // Testing the TrimStart method char[] car1 = new Char[] { '@', 'q' }; string str1 = " abc@de "; @@ -218,7 +218,7 @@ public void TrimStart_Test20() [TestMethod] public void TrimEnd_Test21() { - OutputHelper.WriteLine("Testing the TrimEnd method"); + // Testing the TrimEnd method char[] car1 = new Char[] { '@', 'q' }; string str1 = " abc@de "; @@ -232,7 +232,7 @@ public void TrimEnd_Test21() [TestMethod] public void IndexOf_Test28() { - OutputHelper.WriteLine("Testing the IndexOf method"); + // Testing the IndexOf method string str1 = "@ abc@de "; Assert.AreEqual(str1.IndexOf('@'), 0); @@ -246,7 +246,7 @@ public void IndexOf_Test28() [TestMethod] public void IndexOfAny_Test31() { - OutputHelper.WriteLine("Testing the IndexOfAny method"); + // Testing the IndexOfAny method string str1 = "@ abc@de "; char[] car1 = new Char[] { '@', 'b' }; @@ -258,7 +258,7 @@ public void IndexOfAny_Test31() [TestMethod] public void LastIndexOf_Test37() { - OutputHelper.WriteLine("Testing the LastIndexOf method"); + // Testing the LastIndexOf method string str1 = "@ abc@de "; Assert.AreEqual(str1.LastIndexOf('@'), 5); @@ -272,7 +272,7 @@ public void LastIndexOf_Test37() [TestMethod] public void LastIndexOfAny_Test40() { - OutputHelper.WriteLine("Testing the LastIndexOfAny method"); + // Testing the LastIndexOfAny method string str1 = "@ abc@de "; char[] car1 = new Char[] { '@', 'b' }; @@ -285,7 +285,7 @@ public void LastIndexOfAny_Test40() [TestMethod] public void ToLower_Test51() { - OutputHelper.WriteLine("Testing the ToLower method"); + // Testing the ToLower method string str1 = "@ ABC@de "; Assert.AreEqual(str1.ToLower(), "@ abc@de "); @@ -294,7 +294,7 @@ public void ToLower_Test51() [TestMethod] public void ToUpper_Test52() { - OutputHelper.WriteLine("Testing the ToUpper method"); ; + // Testing the ToUpper method ; string str1 = "@ ABC@de "; Assert.AreEqual(str1.ToUpper(), "@ ABC@DE "); @@ -303,7 +303,7 @@ public void ToUpper_Test52() [TestMethod] public void Length_Test71() { - OutputHelper.WriteLine("Testing the Length property"); ; + // Testing the Length property ; string str1 = "@ ABC@de "; Assert.AreEqual(str1.Length, 9); @@ -341,7 +341,7 @@ public void FormatWithNull() [TestMethod] public void Contains_String() { - OutputHelper.WriteLine("Test of Contains"); + // Test of Contains string s = "Hello"; string value = "ello"; @@ -372,7 +372,7 @@ public void Contains_String() [TestMethod] public void ZeroLengthContains_StringComparison() { - OutputHelper.WriteLine("Test of Zero Length Contains"); + // Test of Zero Length Contains var a = new char[3]; @@ -396,7 +396,7 @@ public void ZeroLengthContains_StringComparison() [TestMethod] public void ContainsMatch_StringComparison() { - OutputHelper.WriteLine("Test of Contains match"); + // Test of Contains match string value = "456"; @@ -408,7 +408,7 @@ public void ContainsMatch_StringComparison() [TestMethod] public void ContainsMatchDifferentSpans_StringComparison() { - OutputHelper.WriteLine("Test of Contains match with differnet lengths"); + // Test of Contains match with differnet lengths string value1 = "4567"; string value2 = "456"; @@ -421,7 +421,7 @@ public void ContainsMatchDifferentSpans_StringComparison() [TestMethod] public void ContainsNoMatch_StringComparison() { - OutputHelper.WriteLine("Test of Contains with no match"); + // Test of Contains with no match for (int length = 1; length < 150; length++) { @@ -450,7 +450,7 @@ public void ContainsNoMatch_StringComparison() [TestMethod] public void MakeSureNoContainsChecksGoOutOfRange_StringComparison() { - OutputHelper.WriteLine("Test of Contains with no match out of range"); + // Test of Contains with no match out of range for (int length = 0; length < 100; length++) { @@ -480,7 +480,7 @@ public void MakeSureNoContainsChecksGoOutOfRange_StringComparison() [TestMethod] public static void StartsWith_StringComparison() { - OutputHelper.WriteLine("Test of StartsWith"); + // Test of StartsWith string s = "Hello"; string value = "H"; @@ -538,7 +538,7 @@ public static void StartsWith_StringComparison() [TestMethod] public static void StartsWith_NullInStrings() { - OutputHelper.WriteLine("Test of StartsWith with null strings"); + // Test of StartsWith with null strings Assert.IsFalse("\0test".StartsWith("test")); Assert.IsFalse("te\0st".StartsWith("test")); @@ -550,7 +550,7 @@ public static void StartsWith_NullInStrings() [TestMethod] public static void StartsWith_Invalid() { - OutputHelper.WriteLine("Test of invalid StartsWith"); + // Test of invalid StartsWith string s = "Hello"; @@ -561,7 +561,7 @@ public static void StartsWith_Invalid() [TestMethod] public static void ZeroLengthStartsWith_Char() { - OutputHelper.WriteLine("Test of StartsWith with zero length char"); + // Test of StartsWith with zero length char var a = new char[3]; @@ -574,7 +574,7 @@ public static void ZeroLengthStartsWith_Char() [TestMethod] public static void EndsWith_Invalid() { - OutputHelper.WriteLine("Test of invalid EndsWith"); + // Test of invalid EndsWith string s = "Hello"; @@ -585,7 +585,7 @@ public static void EndsWith_Invalid() [TestMethod] public static void SameSpanStartsWith_Char() { - OutputHelper.WriteLine("Test of StartsWith with self"); + // Test of StartsWith with self string s1 = "456"; @@ -595,7 +595,7 @@ public static void SameSpanStartsWith_Char() [TestMethod] public static void LengthMismatchStartsWith_Char() { - OutputHelper.WriteLine("Test of StartsWith with length mismatch and chars"); + // Test of StartsWith with length mismatch and chars char[] a = { '4', '5', '6' }; @@ -608,7 +608,7 @@ public static void LengthMismatchStartsWith_Char() [TestMethod] public static void StartsWithMatch_Char() { - OutputHelper.WriteLine("Test of StartsWith with matching chars"); + // Test of StartsWith with matching chars char[] a = { '4', '5', '6' }; @@ -621,7 +621,7 @@ public static void StartsWithMatch_Char() [TestMethod] public static void StartsWithNoMatch_Char() { - OutputHelper.WriteLine("Test of StartsWith with no matching chars"); + // Test of StartsWith with no matching chars for (int length = 1; length < 32; length++) { @@ -647,7 +647,7 @@ public static void StartsWithNoMatch_Char() [TestMethod] public static void MakeSureNoStartsWithChecksGoOutOfRange_Char() { - OutputHelper.WriteLine("Test of StartsWith with no matching chars and going out of range"); + // Test of StartsWith with no matching chars and going out of range for (int length = 0; length < 100; length++) { @@ -668,7 +668,7 @@ public static void MakeSureNoStartsWithChecksGoOutOfRange_Char() [TestMethod] public static void ZeroLengthStartsWith_StringComparison() { - OutputHelper.WriteLine("Test of StartsWith with zero length"); + // Test of StartsWith with zero length var a = new char[3]; @@ -683,7 +683,7 @@ public static void ZeroLengthStartsWith_StringComparison() [TestMethod] public static void SameSpanStartsWith_StringComparison() { - OutputHelper.WriteLine("Test of StartsWith with self"); + // Test of StartsWith with self string s1 = "456"; Assert.IsTrue(s1.StartsWith(s1)); @@ -692,7 +692,7 @@ public static void SameSpanStartsWith_StringComparison() [TestMethod] public static void LengthMismatchStartsWith_StringComparison() { - OutputHelper.WriteLine("Test of StartsWith with length mismatch"); + // Test of StartsWith with length mismatch string value = "456"; @@ -704,7 +704,7 @@ public static void LengthMismatchStartsWith_StringComparison() [TestMethod] public static void StartsWithMatch_StringComparison() { - OutputHelper.WriteLine("Test of StartsWith with match with different lengths"); + // Test of StartsWith with match with different lengths string value = "456"; @@ -716,7 +716,7 @@ public static void StartsWithMatch_StringComparison() [TestMethod] public static void EndsWith_StringComparison() { - OutputHelper.WriteLine("Test of EndsWith"); + // Test of EndsWith string s = "Hello"; string value = "o"; @@ -755,7 +755,7 @@ public static void EndsWith_StringComparison() [TestMethod] public static void EndsWith_NullInStrings() { - OutputHelper.WriteLine("Test of EndsWith with null strings"); + // Test of EndsWith with null strings Assert.IsTrue("te\0st".EndsWith("e\0st")); Assert.IsFalse("te\0st".EndsWith("test")); @@ -766,7 +766,7 @@ public static void EndsWith_NullInStrings() [TestMethod] public static void ZeroLengthEndsWith_Char() { - OutputHelper.WriteLine("Test of EndsWith with chars"); + // Test of EndsWith with chars var a = new char[3]; @@ -779,7 +779,7 @@ public static void ZeroLengthEndsWith_Char() [TestMethod] public static void SameSpanEndsWith_Char() { - OutputHelper.WriteLine("Test of EndsWith with self"); + // Test of EndsWith with self string s = "456"; bool b = s.EndsWith(s); @@ -789,7 +789,7 @@ public static void SameSpanEndsWith_Char() [TestMethod] public static void LengthMismatchEndsWith_Char() { - OutputHelper.WriteLine("Test of EndsWith with length mismatch"); + // Test of EndsWith with length mismatch string value = "456"; @@ -802,7 +802,7 @@ public static void LengthMismatchEndsWith_Char() [TestMethod] public static void EndsWithMatch_Char() { - OutputHelper.WriteLine("Test of EndsWith match with chars"); + // Test of EndsWith match with chars string value = "456"; @@ -815,7 +815,7 @@ public static void EndsWithMatch_Char() [TestMethod] public static void EndsWithNoMatch_Char() { - OutputHelper.WriteLine("Test of EndsWith with no match"); + // Test of EndsWith with no match for (int length = 1; length < 32; length++) { @@ -842,7 +842,7 @@ public static void EndsWithNoMatch_Char() [TestMethod] public static void ZeroLengthEndsWith_StringComparison() { - OutputHelper.WriteLine("Test of EndsWith with zero length"); + // Test of EndsWith with zero length var a = new char[3]; @@ -857,7 +857,7 @@ public static void ZeroLengthEndsWith_StringComparison() [TestMethod] public static void MakeSureNoEndsWithChecksGoOutOfRange_Char() { - OutputHelper.WriteLine("Test of EndsWith with no match and going out of range"); + // Test of EndsWith with no match and going out of range for (int length = 0; length < 100; length++) { @@ -878,7 +878,7 @@ public static void MakeSureNoEndsWithChecksGoOutOfRange_Char() [TestMethod] public static void LengthMismatchEndsWith_StringComparison() { - OutputHelper.WriteLine("Test of EndsWith with lenght mismatch"); + // Test of EndsWith with lenght mismatch string value = "456"; @@ -890,7 +890,7 @@ public static void LengthMismatchEndsWith_StringComparison() [TestMethod] public static void EndsWithMatch_StringComparison() { - OutputHelper.WriteLine("Test of EndsWith with substrings"); + // Test of EndsWith with substrings string value = "456"; @@ -902,7 +902,7 @@ public static void EndsWithMatch_StringComparison() [TestMethod] public static void EndsWithMatchDifferentSpans_StringComparison() { - OutputHelper.WriteLine("Test of EndsWith with natch on different comparisons"); + // Test of EndsWith with natch on different comparisons string value1 = "7456"; string value2 = "456"; @@ -915,7 +915,7 @@ public static void EndsWithMatchDifferentSpans_StringComparison() [TestMethod] public static void EndsWithNoMatch_StringComparison() { - OutputHelper.WriteLine("Test of EndsWith with no match on different lengths and comparisons"); + // Test of EndsWith with no match on different lengths and comparisons for (int length = 1; length < 150; length++) { @@ -940,7 +940,7 @@ public static void EndsWithNoMatch_StringComparison() [TestMethod] public static void MakeSureNoEndsWithChecksGoOutOfRange_StringComparison() { - OutputHelper.WriteLine("Test of EndsWith with no match and gogin out of range"); + // Test of EndsWith with no match and gogin out of range for (int length = 0; length < 100; length++) { @@ -960,7 +960,7 @@ public static void MakeSureNoEndsWithChecksGoOutOfRange_StringComparison() [TestMethod] public static void EndsWithNoMatchNonOrdinal_StringComparison() { - OutputHelper.WriteLine("Test of EndsWith with no match on different ordinal comparisons"); + // Test of EndsWith with no match on different ordinal comparisons string s = "dabc"; string value = "aDc"; diff --git a/Tests/NFUnitTestSystemLib/UnitTestTimeSpan.cs b/Tests/NFUnitTestSystemLib/UnitTestTimeSpan.cs index a15ea104..6dcc3754 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestTimeSpan.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestTimeSpan.cs @@ -37,7 +37,7 @@ public bool CCtorHelper(ref TimeSpan ts) } catch { - OutputHelper.WriteLine("Exception Caught"); + // Exception Caught testResult = false; } OutputHelper.WriteLine((testResult ? "PASS" : "FAIL")); @@ -51,7 +51,7 @@ public void CCtor_Test() /// 1. Test copy constructor /// /// - OutputHelper.WriteLine("Copy Constructor test"); + // Copy Constructor test TimeSpan ts = new TimeSpan(); OutputHelper.WriteLine(ts.ToString()); Assert.IsTrue(CCtorHelper(ref ts)); @@ -88,7 +88,7 @@ public void Ctor64Helper(Int64 i64) /// 1. Test constructor /// /// - OutputHelper.WriteLine("Constructor test"); + // Constructor test TimeSpan ts = new TimeSpan(i64); long days = i64 / m_TicksPerDay; @@ -116,10 +116,10 @@ public void Ctor_with_Int64() /// 1. Test constructor with Int64 /// /// - OutputHelper.WriteLine("Constructor test for 64 bit int"); + // Constructor test for 64 bit int Int64 i64 = 0; - OutputHelper.WriteLine("Normal"); + // Normal Random random = new Random(); for (int i = 0; i < 5; i++) @@ -129,7 +129,7 @@ public void Ctor_with_Int64() Ctor64Helper(i64); } - OutputHelper.WriteLine("Max and Min values"); + // Max and Min values i64 = 0x7fffffffffffffff; Ctor64Helper(i64); Ctor64Helper(TimeSpan.MaxValue.Ticks); @@ -175,7 +175,7 @@ public void CtorHelper(int[] vals) m_TicksPerMinute + vals[3] * m_TicksPerSecond + vals[4] * m_TicksPerMillisecond; break; default: - OutputHelper.WriteLine("Invalid parameter!"); + // Invalid parameter! throw new Exception("Invalid parameter!"); break; } @@ -202,7 +202,7 @@ public void Ctor_Test1() /// 1. Test constructor with Hour Minute Second /// /// - OutputHelper.WriteLine("Constructor test H:M:S"); + // Constructor test H:M:S OutputHelper.WriteLine(m_TicksPerDay.ToString() + " == " + TimeSpan.TicksPerDay.ToString()); @@ -233,7 +233,7 @@ public void Ctor_Test2() /// 1. Test constructor with Day Hour Minute Second /// /// - OutputHelper.WriteLine("Constructor test D:H:M:S"); + // Constructor test D:H:M:S int[] vals = new int[4]; Random random = new Random(); @@ -254,9 +254,9 @@ public void Ctor_Test3() /// 1. Test constructor with Day Hour Minute Second Millisecond /// /// - OutputHelper.WriteLine("Constructor test D:H:M:S:MS"); + // Constructor test D:H:M:S:MS - OutputHelper.WriteLine("TimeSpan::Ctor - Normal "); + // TimeSpan::Ctor - Normal int[] vals = new int[5]; Random random = new Random(); @@ -280,10 +280,10 @@ public void CompareTo_Test4() /// 2. Test the CompareTo method /// /// - OutputHelper.WriteLine("Testing the CompareTo method"); + // Testing the CompareTo method Random random = new Random(); - OutputHelper.WriteLine("Creating TimeSpan"); + // Creating TimeSpan int day = random.Next(10 * 365) + 1; //days int hour = random.Next(23); //hours int minute = random.Next(59); //minutes @@ -291,7 +291,7 @@ public void CompareTo_Test4() int msec = random.Next(999); //milliseconds TimeSpan ts1 = new TimeSpan(day, hour, minute, second, msec); - OutputHelper.WriteLine("Testing CompareTo"); + // Testing CompareTo Assert.AreEqual(-1, ts1.CompareTo(new TimeSpan(day + 1, hour, minute, second, msec))); OutputHelper.WriteLine(ts1.CompareTo(new TimeSpan(day + 1, hour, minute, second, msec)).ToString()); Assert.AreEqual(1, ts1.CompareTo(new TimeSpan(day, hour - 1, minute, second, msec))); @@ -308,10 +308,10 @@ public void GetHashCode_Test5() /// 2. Test that GetHashCode returns differently for different TimeSpans /// /// - OutputHelper.WriteLine("Testing the GetHashCode method"); + // Testing the GetHashCode method Random random = new Random(); - OutputHelper.WriteLine("Test that GetHashCode returns the same for the same TimeSpan"); + // Test that GetHashCode returns the same for the same TimeSpan for (int i = 0; i < 30; i++) { int hours = random.Next(23); @@ -325,10 +325,10 @@ public void GetHashCode_Test5() } TimeSpan ts1 = new TimeSpan(1, 1, 1); - OutputHelper.WriteLine("Test that GetHashCode returns differently for different TimeSpans"); - OutputHelper.WriteLine("This may fail erroneously."); - OutputHelper.WriteLine("From the docs two different TimeSpans may have same hashcode"); - OutputHelper.WriteLine("But, for the most part the values should be different."); + // Test that GetHashCode returns differently for different TimeSpans + // This may fail erroneously. + // From the docs two different TimeSpans may have same hashcode + // But, for the most part the values should be different. for (int i = 0; i < 5; i++) { TimeSpan ts2 = new TimeSpan(random.Next(23), @@ -353,7 +353,7 @@ public void Equals_Test6() /// 1. Test the Equals method /// /// - OutputHelper.WriteLine("Testing the Equals method"); + // Testing the Equals method Random random = new Random(); // verify same timespan computes to same hash for (int i = 0; i < 5; i++) @@ -364,11 +364,11 @@ public void Equals_Test6() TimeSpan ts01 = new TimeSpan(hours, minutes, seconds); TimeSpan ts02 = new TimeSpan(hours, minutes, seconds); OutputHelper.WriteLine(ts01.ToString() + " == " + ts02.ToString()); - OutputHelper.WriteLine("Expected true"); + // Expected true Assert.IsTrue(ts01.Equals(ts02)); TimeSpan ts03 = new TimeSpan(hours, minutes, seconds); TimeSpan ts04 = new TimeSpan(hours + 1, minutes - 1, seconds + 1); - OutputHelper.WriteLine("Expected false"); + // Expected false Assert.IsFalse(ts03.Equals(ts04)); } } @@ -380,7 +380,7 @@ public void ToString_Test7() /// 1. Test the ToString method /// /// - OutputHelper.WriteLine("Testing ToString method"); + // Testing ToString method Random random = new Random(); for (int i = 0; i < 5; i++) { @@ -416,9 +416,9 @@ public void Add_Test8() /// 1. Test the binary + operator /// /// - OutputHelper.WriteLine("Testing the + operator"); + // Testing the + operator - OutputHelper.WriteLine("TimeSpan::Add - Normal "); + // TimeSpan::Add - Normal Random random = new Random(); for (int i = 0; i < 5; i++) { @@ -482,7 +482,7 @@ public void Compare_Test9() /// /// - OutputHelper.WriteLine("Testing the Compare method"); + // Testing the Compare method Random random = new Random(); int day = random.Next(10 * 365) + 1; //days @@ -515,7 +515,7 @@ public void Duration_Test10() /// 1. Test the Duration property with several random TimeSpans /// /// - OutputHelper.WriteLine("Testing Duration property"); + // Testing Duration property Random random = new Random(); for (int i = 0; i < 5; i++) { @@ -537,7 +537,7 @@ public void Negate_Test12() /// 1. Test the Negate method /// /// - OutputHelper.WriteLine("Testing the Negate method"); + // Testing the Negate method Random random = new Random(); for (int i = 0; i < 5; i++) { @@ -561,7 +561,7 @@ public void Subtract_Test13() /// 1. Test subtraction, the binary - operator /// /// - OutputHelper.WriteLine("Testing the binary - operator"); + // Testing the binary - operator Random random = new Random(); for (int i = 0; i < 5; i++) @@ -666,8 +666,8 @@ public void FromTicks_Test14() /// 1. Testing the use of ticks in constructors /// /// - OutputHelper.WriteLine("Testing the use of ticks, ticks per increment specified in this file"); - OutputHelper.WriteLine("TimeSpan::FromTicks - Normal "); + // Testing the use of ticks, ticks per increment specified in this file + // TimeSpan::FromTicks - Normal Random random = new Random(); int max = 5000; int maxOthers = 200; @@ -724,7 +724,7 @@ public void op_UnaryNegation_Test15() /// 1. Test negation, the unary - operator /// /// - OutputHelper.WriteLine("Testing the unary - operator"); + // Testing the unary - operator Random random = new Random(); int mxd = 24000; @@ -797,7 +797,7 @@ public void op_Subtraction_Test16() /// 1. Test subtraction, the binary - operator with non TimeSpan args /// /// - OutputHelper.WriteLine("Testing the binary - operator with non TimeSpan args"); + // Testing the binary - operator with non TimeSpan args Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -824,7 +824,7 @@ public void op_UnaryPlus_Test17() /// 1. Test the unary + operator /// /// - OutputHelper.WriteLine("Testing the unary + operator"); + // Testing the unary + operator Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -849,7 +849,7 @@ public void op_Addition_Test18() /// 1. Test the binary + operator with non-TimeSpan args /// /// - OutputHelper.WriteLine("Testing the binary + operator with non-TimeSpan args"); + // Testing the binary + operator with non-TimeSpan args Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -885,7 +885,7 @@ public void op_Equality_Test19() /// 1. Test equality, the binary == operator /// /// - OutputHelper.WriteLine("Testing the == operator"); + // Testing the == operator Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -926,7 +926,7 @@ public void op_Inequality_Test20() /// 1. Test inequality, the binary != operator /// /// - OutputHelper.WriteLine("Testing the != operator"); + // Testing the != operator Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -969,13 +969,13 @@ private bool LTGTHelper(int days1, int hours1, int mins1, int secs1, int ms1, in testResult &= ((ts1 >= ts2) == expected); else { - OutputHelper.WriteLine("Test Error: Invalid opcode"); + // Test Error: Invalid opcode testResult = false; } } catch { - OutputHelper.WriteLine("Exception Caught"); + // Exception Caught testResult = false; } return testResult; @@ -988,7 +988,7 @@ public void op_LessThan_Test21() /// 1. Testing the binary Less Than operator /// /// - OutputHelper.WriteLine("Testing the Less Than operator"); + // Testing the Less Than operator Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -1020,7 +1020,7 @@ public void op_LessThanOrEqual_Test22() /// 1. Test the binary Less Than Equals operator /// /// - OutputHelper.WriteLine("Testing the Less Than Equals operator"); + // Testing the Less Than Equals operator Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -1052,7 +1052,7 @@ public void op_GreaterThan_Test23() /// 1. Test the binary Greater Than operator /// /// - OutputHelper.WriteLine("Testing the Greater Than operator"); + // Testing the Greater Than operator Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -1084,7 +1084,7 @@ public void op_GreaterThanOrEqual_Test24() /// 1. Test the binary Greater Than Equals operator /// /// - OutputHelper.WriteLine("Testing the Greater Than Equals operator"); + // Testing the Greater Than Equals operator Random random = new Random(); int mxd = 24000; int mx = 10000; @@ -1128,9 +1128,9 @@ public void Ticks_Test28() /// 1. Test the Ticks Property /// /// - OutputHelper.WriteLine("Testing the Ticks Property"); + // Testing the Ticks Property - OutputHelper.WriteLine("TimeSpan::Ticks - Normal "); + // TimeSpan::Ticks - Normal Random random = new Random(); int max = 24000; int maxOthers = 10000; diff --git a/Tests/NFUnitTestSystemLib/UnitTestTypeTests.cs b/Tests/NFUnitTestSystemLib/UnitTestTypeTests.cs index 609697c2..6580cac9 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestTypeTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestTypeTests.cs @@ -191,37 +191,37 @@ public void SystemType1_GetTypeNew_Test() Assembly Int32Assm = Assembly.Load("mscorlib"); - OutputHelper.WriteLine("This tests the Assembly.GetType(String) by passing \"Namespace.Class\""); + // This tests the Assembly.GetType(String) by passing \"Namespace.Class\" Type myType0 = Int32Assm.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType0.FullName); Assert.IsType(myType0, testInt32.GetType()); - OutputHelper.WriteLine("This tests the Type.GetType(String) by passing \"Namespace.Class\""); + // This tests the Type.GetType(String) by passing \"Namespace.Class\" Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.FullName); Assert.IsType(myType1, testInt32.GetType()); - OutputHelper.WriteLine("This tests the Type.GetType(String) by passing \"Namespace.Class, assembly\""); + // This tests the Type.GetType(String) by passing \"Namespace.Class, assembly\" Type myType2 = Type.GetType("System.Int32, mscorlib"); OutputHelper.WriteLine("The full name is " + myType2.FullName); Assert.IsType(myType2, testInt32.GetType()); - OutputHelper.WriteLine("This tests the Type.GetType(String) by passing \"Namespace.Class, assembly, Version=\"a.b.c.d\"\""); + // This tests the Type.GetType(String) by passing \"Namespace.Class, assembly, Version=\"a.b.c.d\"\" string typeName3 = "System.Int32, mscorlib, Version=" + Int32Assm.GetName().Version.ToString(); Type myType3 = Type.GetType(typeName3); OutputHelper.WriteLine("The full name is " + myType3.FullName); Assert.IsType(myType3, testInt32.GetType()); - OutputHelper.WriteLine("This tests the Type.GetType() method for nested classes"); + // This tests the Type.GetType() method for nested classes TestObject1 testTestObject1 = new TestObject1(); Type myType4 = testTestObject1.GetType(); OutputHelper.WriteLine("The full name is " + myType4.FullName); Assert.IsType(myType4, Type.GetType("NFUnitTestSystemLib.UnitTestTypeTests+TestObject1")); - OutputHelper.WriteLine("Since NoneSuch does not exist in this assembly, "); - OutputHelper.WriteLine("GetType throws a TypeLoadException."); + // Since NoneSuch does not exist in this assembly, + // GetType throws a TypeLoadException. Assert.ThrowsException(typeof(NullReferenceException), () => { Type myType5 = Type.GetType("NoneSuch"); @@ -261,7 +261,7 @@ public void SystemType1_Type_Names_Test() [TestMethod] public void SystemType2_Assembly_Test() { - OutputHelper.WriteLine("This tests the Assembly property"); + // This tests the Assembly property //Assigned and manipulated to avoid compiler warning int testInt32 = -1; @@ -280,7 +280,7 @@ public void SystemType2_Assembly_Test() [TestMethod] public void SystemType3_BaseType_Test() { - OutputHelper.WriteLine("This tests the BaseType() method"); + // This tests the BaseType() method //Assigned and manipulated to avoid compiler warning int testInt32 = -1; @@ -298,7 +298,7 @@ public void SystemType3_BaseType_Test() [TestMethod] public void SystemType4_DeclaringType_Test() { - OutputHelper.WriteLine("This tests the DeclaringType property"); + // This tests the DeclaringType property //Assigned and manipulated to avoid compiler warning int testInt32 = -1; @@ -319,7 +319,7 @@ public void SystemType4_DeclaringType_Test() [TestMethod] public void SystemType5_GetConstructor_Test() { - OutputHelper.WriteLine("This tests the GetConstructor(Type[]) method"); + // This tests the GetConstructor(Type[]) method TestObject2 testTestObject2 = new TestObject2(5); Type myType2 = testTestObject2.GetType(); OutputHelper.WriteLine("The full name is " + myType2.FullName); @@ -333,7 +333,7 @@ public void SystemType5_GetConstructor_Test() [TestMethod] public void SystemType6_GetElementType_Test() { - OutputHelper.WriteLine("This tests the GetElementType() method"); + // This tests the GetElementType() method //Assigned and manipulated to avoid compiler warning int testInt32 = -1; @@ -351,48 +351,48 @@ public void SystemType6_GetElementType_Test() [TestMethod] public void SystemType7_GetField_Test() { - OutputHelper.WriteLine("This tests the GetField(String) "); - OutputHelper.WriteLine("and the GetField(String,BindingFlags) methods)"); - OutputHelper.WriteLine("Currently this test fails, see 17246 for more details."); + // This tests the GetField(String) + // and the GetField(String,BindingFlags) methods) + // Currently this test fails, see 17246 for more details. Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.FullName); Assert.IsTrue(myType1.GetField("m_data") == null); - OutputHelper.WriteLine(" TestObject2 type has one data member \"m_data\" of type Int32."); + // TestObject2 type has one data member \"m_data\" of type Int32. TestObject2 testTestObject2 = new TestObject2(5); Type myType2 = testTestObject2.GetType(); OutputHelper.WriteLine("The full name is " + myType2.FullName); - OutputHelper.WriteLine(" Check that type of m_data is Int32"); + // Check that type of m_data is Int32 Assert.IsType(myType2.GetField("m_data", BindingFlags.GetField | BindingFlags.Public | BindingFlags.Instance).FieldType, myType1); - OutputHelper.WriteLine(" Check that value in m_data is 5 ( becuase we called new TestObject2(5))"); + // Check that value in m_data is 5 ( becuase we called new TestObject2(5)) Assert.AreEqual((int)myType2.GetField("m_data", BindingFlags.IgnoreCase | BindingFlags.GetField | BindingFlags.Public | BindingFlags.Instance).GetValue(testTestObject2), 5); - OutputHelper.WriteLine(" Check that m_data is a field"); + // Check that m_data is a field Assert.IsTrue(myType2.GetField("m_data").MemberType == MemberTypes.Field); - OutputHelper.WriteLine(" Check that field m_data has Name \"m_data\""); + // Check that field m_data has Name \"m_data\" Assert.AreEqual(myType2.GetField("m_data").Name, "m_data"); - OutputHelper.WriteLine(" Check that misspelling of m_data return NULL."); + // Check that misspelling of m_data return NULL. Assert.IsTrue(null == myType2.GetField("data")); - OutputHelper.WriteLine(" Checks that case misspelling of m_data return NULL if flag BindingFlags.IgnoreCase not specified."); + // Checks that case misspelling of m_data return NULL if flag BindingFlags.IgnoreCase not specified. Assert.IsTrue(null == myType2.GetField("m_Data")); - OutputHelper.WriteLine("Check retrieval with BindingFlags.IgnoreCase. If flag BindingFlags.IgnoreCase is ised, then the case should be ignored. We should get the same type information."); + // Check retrieval with BindingFlags.IgnoreCase. If flag BindingFlags.IgnoreCase is ised, then the case should be ignored. We should get the same type information. FieldInfo fInfo_m_Data = myType2.GetField("m_Data", BindingFlags.IgnoreCase | BindingFlags.GetField | BindingFlags.Public | BindingFlags.Instance); FieldInfo fInfo_m_data = myType2.GetField("m_data"); Assert.IsNotNull(fInfo_m_Data); Assert.IsNotNull(fInfo_m_data); Assert.IsTrue(fInfo_m_Data.Name.Equals(fInfo_m_data.Name)); - OutputHelper.WriteLine(" Indirectly set m_data in testTestObject2 to 6 and then check it."); + // Indirectly set m_data in testTestObject2 to 6 and then check it. myType2.GetField("m_data").SetValue(testTestObject2, 6); Assert.AreEqual((int)myType2.GetField("m_data").GetValue(testTestObject2), 6); Assert.AreEqual(testTestObject2.m_data, 6); @@ -402,9 +402,9 @@ public void SystemType7_GetField_Test() public void SystemType8_GetFields_Test() { - OutputHelper.WriteLine("This tests the GetFields(String) method"); - OutputHelper.WriteLine("This test must be re-written once BindingFlags is working, "); - OutputHelper.WriteLine("see 17246 for more details."); + // This tests the GetFields(String) method + // This test must be re-written once BindingFlags is working, + // see 17246 for more details. Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.FullName); @@ -423,9 +423,9 @@ public void SystemType8_GetFields_Test() [TestMethod] public void SystemType9_GetInterfaces_Test() { - OutputHelper.WriteLine("This tests the GetInterfaces() method"); - OutputHelper.WriteLine("This test must be re-written once BindingFlags is working, "); - OutputHelper.WriteLine("see 17246 for more details."); + // This tests the GetInterfaces() method + // This test must be re-written once BindingFlags is working, + // see 17246 for more details. Type myType1 = Type.GetType("System.Int32"); OutputHelper.WriteLine("The full name is " + myType1.FullName); @@ -441,9 +441,9 @@ public void SystemType9_GetInterfaces_Test() [TestMethod] public void SystemType10_GetMethod_Test() { - OutputHelper.WriteLine("This tests the GetMethod(String) method"); - OutputHelper.WriteLine("This test must be re-written once BindingFlags is working, "); - OutputHelper.WriteLine("see 17246 for more details."); + // This tests the GetMethod(String) method + // This test must be re-written once BindingFlags is working, + // see 17246 for more details. int I = 0; I++; @@ -466,9 +466,9 @@ public void SystemType10_GetMethod_Test() [TestMethod] public void SystemType11_GetMethods_Test() { - OutputHelper.WriteLine("This tests the GetMethods() method"); - OutputHelper.WriteLine("This test must be re-written once BindingFlags is working, "); - OutputHelper.WriteLine("see 17246 for more details."); + // This tests the GetMethods() method + // This test must be re-written once BindingFlags is working, + // see 17246 for more details. //Assigned and manipulated to avoid compiler warning int I = 0; @@ -482,12 +482,12 @@ public void SystemType11_GetMethods_Test() if (methodInfoArr1[0].Name == "Method2") { methodInfo1 = methodInfoArr1[0]; - OutputHelper.WriteLine("Method2 found in position 0"); + // Method2 found in position 0 } else if (methodInfoArr1[1].Name == "Method2") { methodInfo1 = methodInfoArr1[1]; - OutputHelper.WriteLine("Method2 found in position 1"); + // Method2 found in position 1 } Assert.AreEqual(methodInfo1.IsAbstract, false); Assert.AreEqual(methodInfo1.IsFinal, false); @@ -505,9 +505,9 @@ public void SystemType11_GetMethods_Test() //[TestMethod] //public void SystemType12_InvokeMember_Test() //{ - // OutputHelper.WriteLine("This tests the InvokeMember(String,BindingFlags) method"); - // OutputHelper.WriteLine("This test must be re-written once BindingFlags is working, "); - // OutputHelper.WriteLine("see 17246 for more details."); + // // This tests the InvokeMember(String,BindingFlags) method + // // This test must be re-written once BindingFlags is working, + // // see 17246 for more details. // //Assigned and manipulated to avoid compiler warning // Int32 I = 0; // I++; diff --git a/Tests/NFUnitTestSystemLib/UnitTestWeakReferenceTests.cs b/Tests/NFUnitTestSystemLib/UnitTestWeakReferenceTests.cs index 5816e3ab..0e9387b9 100644 --- a/Tests/NFUnitTestSystemLib/UnitTestWeakReferenceTests.cs +++ b/Tests/NFUnitTestSystemLib/UnitTestWeakReferenceTests.cs @@ -21,7 +21,7 @@ public class WeakRefClass public WeakRefClass() { } ~WeakRefClass() { - OutputHelper.WriteLine("Finalized."); + // Finalized. hasFinalized1 = true; } void MakeSomeGarbage() @@ -46,14 +46,14 @@ void MakeSomeGarbage() // // 4. Verify & Remove Strong reference // // 5. Allow for GC // // 6. If weak ref surivived verify its data - // OutputHelper.WriteLine("Create an object with strong ref"); + // // Create an object with strong ref // WeakRefClass WRC1 = new WeakRefClass(); - // OutputHelper.WriteLine("Create a short weak ref to the onject"); + // // Create a short weak ref to the onject // WeakReference wr = new WeakReference(WRC1); // wr.Target = WRC1; - // OutputHelper.WriteLine("Allow for GC"); + // // Allow for GC // nanoFramework.Runtime.Native.GC.Run(true); // int sleepTime = 2000; // int slept = 0; @@ -66,12 +66,12 @@ void MakeSomeGarbage() // Assert.IsFalse(hasFinalized1); - // OutputHelper.WriteLine("Verify & Remove Strong reference"); + // // Verify & Remove Strong reference // Assert.AreEqual(((WeakRefClass)wr.Target).data, 5); // WRC1 = null; // Assert.IsNull(WRC1); - // OutputHelper.WriteLine("Allow for GC"); + // // Allow for GC // // We should force the finalizer somehow // nanoFramework.Runtime.Native.GC.Run(true); // GC.WaitForPendingFinalizers(); @@ -89,11 +89,11 @@ void MakeSomeGarbage() // if (wr.IsAlive) // { // Assert.AreEqual(((WeakRefClass)wr.Target).data, 5); - // OutputHelper.WriteLine("Weak Reference survived."); + // // Weak Reference survived. // } // else // { - // OutputHelper.WriteLine("Weak Reference has been collected"); + // // Weak Reference has been collected // } //} } diff --git a/Tests/NFUnitTestThread/UnitTestAutoResetEvents.cs b/Tests/NFUnitTestThread/UnitTestAutoResetEvents.cs index b34e084f..0d56c314 100644 --- a/Tests/NFUnitTestThread/UnitTestAutoResetEvents.cs +++ b/Tests/NFUnitTestThread/UnitTestAutoResetEvents.cs @@ -25,24 +25,24 @@ class Waiter public void DoWait() { - OutputHelper.WriteLine("Waiting..."); + // Waiting... t1 = DateTime.UtcNow; are1.WaitOne(); t2 = DateTime.UtcNow; flag = true; - OutputHelper.WriteLine("Notified"); + // Notified } public void DoWaitTimeOut() { - OutputHelper.WriteLine("Waiting..."); + // Waiting... are1.WaitOne(wait, false); flag = true; } public void DoWaitReset() { - OutputHelper.WriteLine("Waiting..."); + // Waiting... are2.WaitOne(); flag = true; } @@ -57,23 +57,23 @@ public void AutoReset1_WaitOne_Set_Test() /// /// - OutputHelper.WriteLine("Starts a thread and calls WaitOne inside the thread "); - OutputHelper.WriteLine("Signals The thread to continue execution"); - OutputHelper.WriteLine("Verifies the thread has waited and continued execution upon calling Set"); + // Starts a thread and calls WaitOne inside the thread + // Signals The thread to continue execution + // Verifies the thread has waited and continued execution upon calling Set - OutputHelper.WriteLine("Starting Thread"); + // Starting Thread Waiter newWaiter1 = new Waiter(); Thread newThread1 = new Thread(newWaiter1.DoWait); newThread1.Start(); - OutputHelper.WriteLine("Waiting and Signaling after 1000msec."); + // Waiting and Signaling after 1000msec. Thread.Sleep(1000); - OutputHelper.WriteLine("wake it up"); + // wake it up DateTime t3 = DateTime.UtcNow; Waiter.are1.Set(); - OutputHelper.WriteLine("Waiting the thread to finish and also to get t2"); + // Waiting the thread to finish and also to get t2 Thread.Sleep(10); TimeSpan duration1 = newWaiter1.t2 - newWaiter1.t1; TimeSpan duration2 = newWaiter1.t2 - t3; @@ -81,12 +81,12 @@ public void AutoReset1_WaitOne_Set_Test() // Assuming atleast the thread should wait for 750ms if (duration1.CompareTo(new TimeSpan(0, 0, 0, 0, 750)) <= 0) { - OutputHelper.WriteLine("The thread should have waited atleast 750 msec."); + // The thread should have waited atleast 750 msec. throw new Exception("The thread should have waited atleast 750 msec."); } if (duration2.CompareTo(new TimeSpan(0, 0, 0, 0, 0)) < 0) { - OutputHelper.WriteLine("The thread continued executing before it's signaled"); + // The thread continued executing before it's signaled throw new Exception("The thread continued executing before it's signaled"); } } @@ -102,10 +102,10 @@ public void AutoReset2_Set_WaitOne_Set_Test() /// /// - OutputHelper.WriteLine("Calls Set repeatedly while no thread was blocked"); - OutputHelper.WriteLine("Starts two threads and calls WaitOne on both threads "); - OutputHelper.WriteLine("Signals The thread to continue execution calling Set once"); - OutputHelper.WriteLine("Verifies only one blocked thread is released"); + // Calls Set repeatedly while no thread was blocked + // Starts two threads and calls WaitOne on both threads + // Signals The thread to continue execution calling Set once + // Verifies only one blocked thread is released Waiter.are1.Set(); Waiter.are1.Set(); @@ -116,16 +116,16 @@ public void AutoReset2_Set_WaitOne_Set_Test() Waiter newWaiter2 = new Waiter(); newWaiter2.flag = false; Thread newThread2 = new Thread(newWaiter2.DoWait); - OutputHelper.WriteLine("Starting The threads"); + // Starting The threads newThread1.Start(); newThread2.Start(); - OutputHelper.WriteLine("Waiting and verifying only one of the threads is signaled"); + // Waiting and verifying only one of the threads is signaled Thread.Sleep(1000); - OutputHelper.WriteLine("flag1 XOR flag2 = ~((flag1 & flag2)||(~flag1 & ~flag2))"); + // flag1 XOR flag2 = ~((flag1 & flag2)||(~flag1 & ~flag2)) if ((newWaiter1.flag && newWaiter2.flag) || ((!newWaiter1.flag) && (!newWaiter2.flag))) { - OutputHelper.WriteLine("Only One of the threads should have been signaled"); + // Only One of the threads should have been signaled throw new Exception("Only One of the threads should have been signaled"); } Waiter.are1.Set(); @@ -141,9 +141,9 @@ public void AutoReset3_TwoWaitOne_TwoSet_Test() /// /// - OutputHelper.WriteLine("Starts two threads and calls WaitOne on both threads "); - OutputHelper.WriteLine("Signals The threads to continue execution calling Set twice"); - OutputHelper.WriteLine("Verifies both blocked threads are released"); + // Starts two threads and calls WaitOne on both threads + // Signals The threads to continue execution calling Set twice + // Verifies both blocked threads are released Waiter newWaiter1 = new Waiter(); Thread newThread1 = new Thread(newWaiter1.DoWait); @@ -151,7 +151,7 @@ public void AutoReset3_TwoWaitOne_TwoSet_Test() Waiter newWaiter2 = new Waiter(); Thread newThread2 = new Thread(newWaiter2.DoWait); newWaiter2.flag = false; - OutputHelper.WriteLine("Starting threads, waiting and verifying both are waiting"); + // Starting threads, waiting and verifying both are waiting newThread1.Start(); newThread2.Start(); Thread.Sleep(1000); @@ -162,7 +162,7 @@ public void AutoReset3_TwoWaitOne_TwoSet_Test() throw new Exception("Failure: One or both threads are not waiting, Thread1 = '" + newWaiter1.flag + "' Thread2 = '" + newWaiter2.flag + "'"); } - OutputHelper.WriteLine("Signaling twice, waiting and verifying both threads are signaled"); + // Signaling twice, waiting and verifying both threads are signaled Waiter.are1.Set(); Waiter.are1.Set(); Thread.Sleep(1000); @@ -184,36 +184,36 @@ public void AutoReset4_WaitOne_TimeOut_Test() /// /// - OutputHelper.WriteLine("Starts a thread and call WatiOne passing timeout parameter"); - OutputHelper.WriteLine("verifies the wait will end because of timeout"); - OutputHelper.WriteLine("Starts a 2nd thread and call WatiOne passing Timeout.Infinite"); - OutputHelper.WriteLine("verifies the wait will not end for 3 sec (assumed Infinite)"); + // Starts a thread and call WatiOne passing timeout parameter + // verifies the wait will end because of timeout + // Starts a 2nd thread and call WatiOne passing Timeout.Infinite + // verifies the wait will not end for 3 sec (assumed Infinite) Waiter newWaiter1 = new Waiter(); newWaiter1.wait = 100; newWaiter1.flag = false; Thread newThread1 = new Thread(newWaiter1.DoWaitTimeOut); - OutputHelper.WriteLine("Starting thread, waiting and verifying wait timeouts"); + // Starting thread, waiting and verifying wait timeouts newThread1.Start(); Thread.Sleep(500); if (!newWaiter1.flag) { - OutputHelper.WriteLine("Waited for 500msec. but Thread should have timeouted in " + newWaiter1.wait + ""); + // Waited for 500msec. but Thread should have timeouted in " + newWaiter1.wait + " throw new Exception("Waited for 500msec. but Thread should have timeouted in " + newWaiter1.wait + ""); } Waiter newWaiter2 = new Waiter(); newWaiter2.wait = -1; newWaiter2.flag = false; Thread newThread2 = new Thread(newWaiter2.DoWaitTimeOut); - OutputHelper.WriteLine("Starting thread, waiting for Timeout.Infinite and verifying"); + // Starting thread, waiting for Timeout.Infinite and verifying newThread2.Start(); Thread.Sleep(3000); if (newWaiter2.flag) { - OutputHelper.WriteLine("Failure: thread didn't wait for Infinite.Timeout"); + // Failure: thread didn't wait for Infinite.Timeout throw new Exception("Failure: thread didn't wait for Infinite.Timeout"); } - OutputHelper.WriteLine("finally signaling the Infinite.Timeout thread"); + // finally signaling the Infinite.Timeout thread Waiter.are1.Set(); } @@ -230,45 +230,45 @@ public void AutoReset5_Reset_Test() /// /// - OutputHelper.WriteLine("Creates an AutoResetEvent having an initial state signaled"); - OutputHelper.WriteLine("Start a thread, call WaitOne and verify the thread is not blocked"); - OutputHelper.WriteLine("Starts a 2nd thread, call WaitOne and verify it's auto reset (thread is blocked)"); - OutputHelper.WriteLine("call Set and verify it's set (signaled)"); - OutputHelper.WriteLine("call Set, call Reset, starts a thread and call WaitOne on the thread"); - OutputHelper.WriteLine("Verify the thread remains blocked"); + // Creates an AutoResetEvent having an initial state signaled + // Start a thread, call WaitOne and verify the thread is not blocked + // Starts a 2nd thread, call WaitOne and verify it's auto reset (thread is blocked) + // call Set and verify it's set (signaled) + // call Set, call Reset, starts a thread and call WaitOne on the thread + // Verify the thread remains blocked Waiter newWaiter1 = new Waiter(); newWaiter1.flag = false; Thread newThread1 = new Thread(newWaiter1.DoWaitReset); - OutputHelper.WriteLine("Starting thread, waiting and verifying thread not blocked if initial state is signaled"); + // Starting thread, waiting and verifying thread not blocked if initial state is signaled newThread1.Start(); Thread.Sleep(100); if (!newWaiter1.flag) { - OutputHelper.WriteLine("Faiure : AutoResetEvent initial state signaled but blocked thread"); + // Faiure : AutoResetEvent initial state signaled but blocked thread throw new Exception("Faiure : AutoResetEvent initial state signaled but blocked thread"); } Waiter newWaiter2 = new Waiter(); newWaiter2.flag = false; Thread newThread2 = new Thread(newWaiter2.DoWaitReset); - OutputHelper.WriteLine("Starting thread, waiting and verifying autoreset blocks the thread"); + // Starting thread, waiting and verifying autoreset blocks the thread newThread2.Start(); Thread.Sleep(100); if (newWaiter2.flag) { - OutputHelper.WriteLine("Failure : AutoResetEvent not autoreseted"); + // Failure : AutoResetEvent not autoreseted throw new Exception("Failure : AutoResetEvent not autoreseted"); } - OutputHelper.WriteLine("Signaling, waiting and verifying"); + // Signaling, waiting and verifying Waiter.are2.Set(); Thread.Sleep(100); if (!newWaiter2.flag) { - OutputHelper.WriteLine("Failure : AutoResetEvent signaled but thread blocked"); + // Failure : AutoResetEvent signaled but thread blocked throw new Exception("Failure : AutoResetEvent signaled but thread blocked"); } - OutputHelper.WriteLine("Set, Reset, Start a thread, waiting and verifying thread remain blocked"); + // Set, Reset, Start a thread, waiting and verifying thread remain blocked Waiter newWaiter3 = new Waiter(); newWaiter3.flag = false; Thread newThread3 = new Thread(newWaiter3.DoWaitReset); @@ -278,11 +278,11 @@ public void AutoReset5_Reset_Test() Thread.Sleep(100); if (newWaiter3.flag) { - OutputHelper.WriteLine("Failure: a Reseted AutoResetEvent didn't block thread"); + // Failure: a Reseted AutoResetEvent didn't block thread throw new Exception("Failure: a Reseted AutoResetEvent didn't block thread"); } - OutputHelper.WriteLine("Finally Setting the reseted AutoResetEvent"); + // Finally Setting the reseted AutoResetEvent Waiter.are2.Set(); } diff --git a/Tests/NFUnitTestThread/UnitTestInterlocTests.cs b/Tests/NFUnitTestThread/UnitTestInterlocTests.cs index a900eaca..61328d68 100644 --- a/Tests/NFUnitTestThread/UnitTestInterlocTests.cs +++ b/Tests/NFUnitTestThread/UnitTestInterlocTests.cs @@ -88,12 +88,12 @@ public void Interlocked1_Inc_Dec_Test() /// 3. Waits for execution and then verifies that all expected operations completed /// /// - OutputHelper.WriteLine("Starts several async threads that call interlocked "); - OutputHelper.WriteLine("Increment and Decrement, this may erroneously pass."); - OutputHelper.WriteLine("This may erroneously fail for extremely slow devices."); + // Starts several async threads that call interlocked + // Increment and Decrement, this may erroneously pass. + // This may erroneously fail for extremely slow devices. - OutputHelper.WriteLine("Starting several threads, incrementing, decrementing,"); - OutputHelper.WriteLine("waiting till all threads finish and verifying"); + // Starting several threads, incrementing, decrementing, + // waiting till all threads finish and verifying Thread incThread = new Thread(ThreadIncrementorStarter); incThread.Start(); Thread.Sleep(1); @@ -110,7 +110,7 @@ public void Interlocked1_Inc_Dec_Test() lastThread.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("Waiting for execution"); + // Waiting for execution int slept = 0; while ((incThread.IsAlive || decThread.IsAlive || inc2Thread.IsAlive || lastThread.IsAlive) && slept < 5000) @@ -119,16 +119,16 @@ public void Interlocked1_Inc_Dec_Test() slept += 100; } - OutputHelper.WriteLine("Verifying all increment/decrement operations done correctly"); + // Verifying all increment/decrement operations done correctly if (interCount != 4) { - OutputHelper.WriteLine("expected final increment/decrement result = '4' but got '" + interCount + "'"); + // expected final increment/decrement result = '4' but got '" + interCount + "' throw new Exception("expected final increment/decrement result = '4' but got '" + interCount + "'"); } - OutputHelper.WriteLine("Verifying all threads are finished"); + // Verifying all threads are finished if (slept >= 5000) { - OutputHelper.WriteLine("Expcted all threads be done in '5000' msec but took '" + slept + "'"); + // Expcted all threads be done in '5000' msec but took '" + slept + "' throw new Exception("Expcted all threads be done in '5000' msec but took '" + slept + "'"); } } @@ -143,11 +143,11 @@ public void Interlocked2_Compare_Exchange_Test() /// /// - OutputHelper.WriteLine("Starts 4 async threads that call interlocked Compare, CompareExchange"); - OutputHelper.WriteLine("This may erroneously pass."); - OutputHelper.WriteLine("this may erroneously fail for extremely slow devices."); + // Starts 4 async threads that call interlocked Compare, CompareExchange + // This may erroneously pass. + // this may erroneously fail for extremely slow devices. - OutputHelper.WriteLine("Starting the 4 threads"); + // Starting the 4 threads Thread incThread = new Thread(ThreadIncrementorStarter); incThread.Start(); @@ -161,7 +161,7 @@ public void Interlocked2_Compare_Exchange_Test() lastThread.Start(); Thread.Sleep(1); int comp = 10; - OutputHelper.WriteLine("Waiting for execution"); + // Waiting for execution while ((0 != Interlocked.CompareExchange(ref interCount, 0, comp)) || (incThread.IsAlive || decThread.IsAlive || inc2Thread.IsAlive || lastThread.IsAlive)) @@ -172,7 +172,7 @@ public void Interlocked2_Compare_Exchange_Test() decThread.IsAlive.ToString() + " " + inc2Thread.IsAlive.ToString() + " " + lastThread.IsAlive.ToString()); - OutputHelper.WriteLine("Setting Count to 0"); + // Setting Count to 0 Interlocked.Exchange(ref interCount, 0); Thread.Sleep(10); } @@ -183,16 +183,16 @@ public void Interlocked2_Compare_Exchange_Test() Thread.Sleep(100); slept += 100; } - OutputHelper.WriteLine("Verifying all Interlocked.Compare/CompareExchange operations done correctly"); + // Verifying all Interlocked.Compare/CompareExchange operations done correctly if (interCount != 0) { - OutputHelper.WriteLine("expected final Compare/CompareExchange result = '0' but got '" + interCount + "'"); + // expected final Compare/CompareExchange result = '0' but got '" + interCount + "' throw new Exception("expected final Compare/CompareExchange result = '0' but got '" + interCount + "'"); } - OutputHelper.WriteLine("Verifying all threads are finished"); + // Verifying all threads are finished if (slept >= 5000) { - OutputHelper.WriteLine("Expcted all threads be done in '5000' msec but took '" + slept + "'"); + // Expcted all threads be done in '5000' msec but took '" + slept + "' throw new Exception("Expcted all threads be done in '5000' msec but took '" + slept + "'"); } } @@ -209,8 +209,8 @@ public void Interlocked3_Exchange_Boundary_Test() int[] value = new int[] { -2147483648, 0, 2147483647 }; int temp1, temp2; - OutputHelper.WriteLine("Verification of original value returned needs temp1 = temp2"); - OutputHelper.WriteLine("Verifies Exchange "); + // Verification of original value returned needs temp1 = temp2 + // Verifies Exchange for (int i = 0; i < 3; i++) { @@ -226,7 +226,7 @@ public void Interlocked3_Exchange_Boundary_Test() } if (value[i] != value[j]) { - OutputHelper.WriteLine("Failure : "); + // Failure : OutputHelper.WriteLine(value[j] + " is not stored at location1"); break; } @@ -248,8 +248,8 @@ public void Interlocked4_CompareExchange_Boundary_Test() int[] value = new int[] { -2147483648, 0, 2147483647 }; int temp1, temp2; - OutputHelper.WriteLine("Verifies the original value is returned at all time"); - OutputHelper.WriteLine("Verifies value is stored in location1 upon equality"); + // Verifies the original value is returned at all time + // Verifies value is stored in location1 upon equality for (int r = 0; r < 3; r++) { for (int p = 0; p < 3; p++) diff --git a/Tests/NFUnitTestThread/UnitTestMonitorTests.cs b/Tests/NFUnitTestThread/UnitTestMonitorTests.cs index 07975f80..1e1c292c 100644 --- a/Tests/NFUnitTestThread/UnitTestMonitorTests.cs +++ b/Tests/NFUnitTestThread/UnitTestMonitorTests.cs @@ -89,10 +89,10 @@ public void Monitor1_Basic_Test() /// /// - OutputHelper.WriteLine("Starts several async threads that Enter and Exit critical sections."); - OutputHelper.WriteLine("This may erroneously pass."); - OutputHelper.WriteLine("This may erroneously fail for extremely slow devices."); - OutputHelper.WriteLine("Starting the 4 threads"); + // Starts several async threads that Enter and Exit critical sections. + // This may erroneously pass. + // This may erroneously fail for extremely slow devices. + // Starting the 4 threads Thread incThread = new Thread(MonitoredThreadIncrementorStarter); incThread.Start(); Thread decThread = new Thread(MonitoredThreadDecrementorStarter); @@ -102,15 +102,15 @@ public void Monitor1_Basic_Test() Thread lastThread = new Thread(MonitoredThreadDecrementor); lastThread.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("Joining All threads to main thread"); + // Joining All threads to main thread incThread.Join(); decThread.Join(); inc2Thread.Join(); lastThread.Join(); - OutputHelper.WriteLine("Verifying all operations completed successfully"); + // Verifying all operations completed successfully if (monCount != 4) { - OutputHelper.WriteLine("expected final result = '4' but got '" + monCount + "'"); + // expected final result = '4' but got '" + monCount + "' throw new Exception("expected final result = '4' but got '" + monCount + "'"); } } @@ -125,8 +125,8 @@ public void Monitor2_SynchronizationLockException_Test() /// 2. Verify SynchronizationLockException exception is thrown /// /// - OutputHelper.WriteLine("Verify SynchronizationLockException exception is thrown"); - OutputHelper.WriteLine("Calling Monitor.Exit without first calling Monitor.Enter should throw an exception"); + // Verify SynchronizationLockException exception is thrown + // Calling Monitor.Exit without first calling Monitor.Enter should throw an exception Assert.ThrowsException(typeof(Exception), () => { Monitor.Exit(locker1); }); } @@ -139,8 +139,8 @@ public void Monitor3_Enter_ArgumentNullException_Test() /// /// - OutputHelper.WriteLine("verify ArgumentNullException exception is thrown "); - OutputHelper.WriteLine("Calling Monitor.Enter passing null reference parameter should throw exception"); + // verify ArgumentNullException exception is thrown + // Calling Monitor.Enter passing null reference parameter should throw exception Assert.ThrowsException(typeof(ArgumentNullException), () => { Monitor.Enter(null); }); } @@ -153,8 +153,8 @@ public void Monitor4_Exit_ArgumentNullException_Test() /// 2. verify ArgumentNullException exception is thrown /// /// - OutputHelper.WriteLine("verify ArgumentNullException exception is thrown "); - OutputHelper.WriteLine("Calling Monitor.Exit passing 'null' reference parameter should throw exception"); + // verify ArgumentNullException exception is thrown + // Calling Monitor.Exit passing 'null' reference parameter should throw exception Assert.ThrowsException(typeof(ArgumentNullException), () => { Monitor.Exit(null); }); } @@ -168,16 +168,16 @@ static void RepeatedLock() try { lockResult = !lockResult; - OutputHelper.WriteLine("I have the lock"); + // I have the lock Nest(); - OutputHelper.WriteLine("I still have the lock"); + // I still have the lock } finally { if (flag.WaitOne(500, false)) { Monitor.Exit(locker2); - OutputHelper.WriteLine("Here the lock is released"); + // Here the lock is released } } OutputHelper.WriteLine("T4 = " + DateTime.UtcNow); @@ -189,12 +189,12 @@ static void Nest() Monitor.Enter(locker2); try { - OutputHelper.WriteLine("Inside Lock"); + // Inside Lock } finally { Monitor.Exit(locker2); - OutputHelper.WriteLine("Released the lock? Not quite!"); + // Released the lock? Not quite! } OutputHelper.WriteLine("T3 = " + DateTime.UtcNow); } @@ -202,26 +202,26 @@ static void Nest() [TestMethod] public void Monitor5_Repeatedly_Lock_Unlock_Test() { - OutputHelper.WriteLine("Starts two Threads "); - OutputHelper.WriteLine("Repeatedly locks an object by multiple calls to Monitor.Enter"); - OutputHelper.WriteLine("Verifies the object is unlocked only by a corresponding number of Monitor.Exit"); + // Starts two Threads + // Repeatedly locks an object by multiple calls to Monitor.Enter + // Verifies the object is unlocked only by a corresponding number of Monitor.Exit Thread newThread1 = new Thread(RepeatedLock); Thread newThread2 = new Thread(RepeatedLock); - OutputHelper.WriteLine("Starting two threads, repeatedly locking, waiting and verifying"); + // Starting two threads, repeatedly locking, waiting and verifying newThread1.Start(); newThread2.Start(); Thread.Sleep(100); if (!lockResult) { - OutputHelper.WriteLine("Failure : both threads passed lock"); + // Failure : both threads passed lock throw new Exception("Failure : both threads passed lock"); } - OutputHelper.WriteLine("unlocking the final lock and verifying the waiting thread continues"); + // unlocking the final lock and verifying the waiting thread continues flag.Set(); Thread.Sleep(500); if (lockResult) { - OutputHelper.WriteLine("Failure : lock not released by equal number of unlocks"); + // Failure : lock not released by equal number of unlocks throw new Exception("Failure : lock not released by equal number of unlocks"); } if (newThread1.IsAlive) diff --git a/Tests/NFUnitTestThread/UnitTestThreadTest.cs b/Tests/NFUnitTestThread/UnitTestThreadTest.cs index 03f979fe..5733c31b 100644 --- a/Tests/NFUnitTestThread/UnitTestThreadTest.cs +++ b/Tests/NFUnitTestThread/UnitTestThreadTest.cs @@ -19,7 +19,7 @@ class Work public static void DoWork() { Thread.Sleep(300); - OutputHelper.WriteLine("Static thread procedure DoWork."); + // Static thread procedure DoWork. Thread.Sleep(300); } public int m_data = 0; @@ -32,14 +32,14 @@ public void DoMoreWork() public static void DoWorkAbort() { Thread.Sleep(300); - OutputHelper.WriteLine("Static thread procedure DoWorkAbort."); + // Static thread procedure DoWorkAbort. Thread.Sleep(10000); } public Thread m_toJoin = null; public void DoWorkJoin() { m_toJoin.Join(); - OutputHelper.WriteLine("Instance thread procedure DoWorkJoin."); + // Instance thread procedure DoWorkJoin. } public static bool hasAborted = false; @@ -55,7 +55,7 @@ public static void DoWorkThreadAbortException() { hasAborted = true; OutputHelper.WriteLine("Thread State = " + Thread.CurrentThread.ThreadState); - OutputHelper.WriteLine("verifying ThreadAbortException named " + e.ToString() + " is thrown"); + // verifying ThreadAbortException named " + e.ToString() + " is thrown } } } @@ -76,24 +76,24 @@ public void Threading_Basic_Test1() /// 2. Verifies that they execute in a reasonable time /// /// - OutputHelper.WriteLine("Starting a thread without explicit declaration of ThreadStart Delegate"); - OutputHelper.WriteLine("Starts two threads, waits for them to complete and passes, "); - OutputHelper.WriteLine("this may erroneously fail for extremely slow devices."); - OutputHelper.WriteLine("All other threading tests are dependent on this, if this fails, "); - OutputHelper.WriteLine("all other results are invalid."); + // Starting a thread without explicit declaration of ThreadStart Delegate + // Starts two threads, waits for them to complete and passes, + // this may erroneously fail for extremely slow devices. + // All other threading tests are dependent on this, if this fails, + // all other results are invalid. - OutputHelper.WriteLine("Starting thread 1"); + // Starting thread 1 Thread newThread1 = new Thread(Work.DoWork); newThread1.Start(); - OutputHelper.WriteLine("Starting thread 2"); + // Starting thread 2 Work w = new Work(); w.m_data = 42; Thread newThread2 = new Thread(w.DoMoreWork); newThread2.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("Waiting for them to finish"); + // Waiting for them to finish int slept = 0; while ((newThread1.ThreadState != ThreadState.Stopped || newThread2.ThreadState != ThreadState.Stopped) && slept < 1000) @@ -104,7 +104,7 @@ public void Threading_Basic_Test1() if (!(newThread1.ThreadState == ThreadState.Stopped && newThread2.ThreadState == ThreadState.Stopped)) { - OutputHelper.WriteLine("The threads took more than 1000msec to come to Stopped state"); + // The threads took more than 1000msec to come to Stopped state throw new Exception("The threads took more than 1000msec to come to Stopped state"); } } @@ -117,23 +117,23 @@ public void Threading_ThreadStart_Test2() /// 2. Verifies that they execute in a reasonable time /// /// - OutputHelper.WriteLine("Starts two threads with ThreadStart Delegate,"); - OutputHelper.WriteLine("waits for them to complete and passes, "); - OutputHelper.WriteLine("this may erroneously fail for extremely slow devices."); + // Starts two threads with ThreadStart Delegate, + // waits for them to complete and passes, + // this may erroneously fail for extremely slow devices. ThreadStart threadDelegate = new ThreadStart(Work.DoWork); Thread newThread1 = new Thread(threadDelegate); - OutputHelper.WriteLine("Starting thread 1"); + // Starting thread 1 newThread1.Start(); Work w = new Work(); w.m_data = 42; threadDelegate = new ThreadStart(w.DoMoreWork); Thread newThread2 = new Thread(threadDelegate); - OutputHelper.WriteLine("Starting thread 2"); + // Starting thread 2 newThread2.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("Waiting for them to complete"); + // Waiting for them to complete int slept = 0; while ((newThread1.ThreadState != ThreadState.Stopped || newThread2.ThreadState != ThreadState.Stopped) && slept < 1000) @@ -144,7 +144,7 @@ public void Threading_ThreadStart_Test2() if (!(newThread1.ThreadState == ThreadState.Stopped && newThread2.ThreadState == ThreadState.Stopped)) { - OutputHelper.WriteLine("The threads took more than 1000msec to come to Stopped state"); + // The threads took more than 1000msec to come to Stopped state throw new Exception("The threads took more than 1000msec to come to Stopped state"); } } @@ -159,18 +159,18 @@ public void Threading_Abort_Test3() /// 4. Verifies that the short thread finishes normally /// /// - OutputHelper.WriteLine("Starting long thread"); + // Starting long thread Thread newThread1 = new Thread(Work.DoWorkAbort); newThread1.Start(); - OutputHelper.WriteLine("Starting short thread"); + // Starting short thread Work w = new Work(); w.m_data = 42; Thread newThread2 = new Thread(w.DoMoreWork); newThread2.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("Aborting long thread and verifying it's Aborted"); + // Aborting long thread and verifying it's Aborted newThread1.Abort(); ThreadState tState = newThread1.ThreadState; if (tState != ThreadState.Aborted @@ -183,7 +183,7 @@ public void Threading_Abort_Test3() } int slept = 0; - OutputHelper.WriteLine("Waiting for 1 or both threads to finish"); + // Waiting for 1 or both threads to finish while ((newThread1.ThreadState != ThreadState.Stopped || newThread2.ThreadState != ThreadState.Stopped) && slept < 1000) { @@ -211,23 +211,23 @@ public void Threading_IsAlive_Test4() /// /// - OutputHelper.WriteLine("Starts two threads, aborts one and verifies the IsAlive property, "); - OutputHelper.WriteLine("this may erroneously fail for extremely slow devices."); - OutputHelper.WriteLine("Starting long thread and verifying it's alive"); + // Starts two threads, aborts one and verifies the IsAlive property, + // this may erroneously fail for extremely slow devices. + // Starting long thread and verifying it's alive Thread newThread1 = new Thread(Work.DoWorkAbort); newThread1.Start(); - OutputHelper.WriteLine("Starting short thread"); + // Starting short thread Work w = new Work(); w.m_data = 42; Thread newThread2 = new Thread(w.DoMoreWork); newThread2.Start(); if (!newThread1.IsAlive) { - OutputHelper.WriteLine("Long thread not alive"); + // Long thread not alive throw new Exception("Long thread not alive"); } - OutputHelper.WriteLine("Aborting long thread, waiting and verifying both threads are dead"); + // Aborting long thread, waiting and verifying both threads are dead newThread1.Abort(); int slept = 0; while ((newThread1.IsAlive || newThread2.IsAlive) && slept < 1000) @@ -255,9 +255,9 @@ public void Threading_Join_Test5() /// /// - OutputHelper.WriteLine("Starts two threads, the second thread Join()s the first"); - OutputHelper.WriteLine("Verifies they finish in a reasonable amount of time"); - OutputHelper.WriteLine("this may erroneously fail for extremely slow or fast devices."); + // Starts two threads, the second thread Join()s the first + // Verifies they finish in a reasonable amount of time + // this may erroneously fail for extremely slow or fast devices. Thread newThread1 = new Thread(Work.DoWork); newThread1.Start(); @@ -433,8 +433,8 @@ public void Threading_Priority_Test6() const double acceptedTolerance = 5.0; // 5% tolerance - OutputHelper.WriteLine("Starts five threads of increasing priority and a control thread, priority not set "); - OutputHelper.WriteLine("verifies that they get increasing amounts of attention"); + // Starts five threads of increasing priority and a control thread, priority not set + // verifies that they get increasing amounts of attention threadLowest.Priority = ThreadPriority.Lowest; threadBelow.Priority = ThreadPriority.BelowNormal; @@ -442,7 +442,7 @@ public void Threading_Priority_Test6() threadAbove.Priority = ThreadPriority.AboveNormal; threadHighest.Priority = ThreadPriority.Highest; - OutputHelper.WriteLine("Starting Threads"); + // Starting Threads threadHighest.Start(); threadAbove.Start(); threadNorm.Start(); @@ -450,7 +450,7 @@ public void Threading_Priority_Test6() threadLowest.Start(); threadControl.Start(); - OutputHelper.WriteLine("Allow counting for 1 seconds."); + // Allow counting for 1 seconds. Thread.Sleep(1000); PriorityTest.loopSwitch.Set(); Thread.Sleep(1000); @@ -462,9 +462,9 @@ public void Threading_Priority_Test6() OutputHelper.WriteLine("Highest " + PriorityTest.resultHighest); OutputHelper.WriteLine("Control Thread " + PriorityTest.resultControl); - OutputHelper.WriteLine("Verifies that each thread recieves attention less than or equal"); - OutputHelper.WriteLine("to higher priority threads."); - OutputHelper.WriteLine("Accepted tolerance : " + acceptedTolerance + "%"); + // Verifies that each thread recieves attention less than or equal + // to higher priority threads. + // Accepted tolerance : " + acceptedTolerance + "% PriorityTest.startSecond.Set(); PriorityTest.keepAlive.Set(); @@ -497,8 +497,8 @@ public void Threading_Suspend_Resume_Test7() /// 5. Verifies that they finish in a reasonable amount of time /// /// - OutputHelper.WriteLine("Starts two threads, suspends and resumes them, "); - OutputHelper.WriteLine("this may erroneously fail for extremely slow devices."); + // Starts two threads, suspends and resumes them, + // this may erroneously fail for extremely slow devices. Thread newThread1 = new Thread(Work.DoWork); newThread1.Start(); @@ -575,7 +575,7 @@ public void Threading_SleepApprox_Test8() /// 2. Verifies the thread sleeps at least for the time requested /// /// - OutputHelper.WriteLine("This test verifies the thread slept at least for the amount of time required"); + // This test verifies the thread slept at least for the amount of time required int[] sleepTime = new int[] { 10, 100, 1000, 10000, 60000 }; for (int i = 0; i < sleepTime.Length; i++) { @@ -597,10 +597,10 @@ public void Threading_Suspend_Suspend_Test9() /// /// - OutputHelper.WriteLine("Starts two threads and suspends the first thread twice"); - OutputHelper.WriteLine("Gets the state of the 1st thread"); - OutputHelper.WriteLine("Resumes the 1st thread "); - OutputHelper.WriteLine("Verifies that calling Suspend for the 2nd time has no effect"); + // Starts two threads and suspends the first thread twice + // Gets the state of the 1st thread + // Resumes the 1st thread + // Verifies that calling Suspend for the 2nd time has no effect Work.run = true; Work w1 = new Work(); Thread newThread1 = new Thread(w1.DoWorkThreadState); @@ -637,7 +637,7 @@ public void Threading_ThreadState_Unstarted_Running_WaitSleepJoin_Test10() /// /// - OutputHelper.WriteLine("Creating a thread and verifing its state is Unstarted"); + // Creating a thread and verifing its state is Unstarted Thread newThread1 = new Thread(Work.DoWork); ThreadState tState = newThread1.ThreadState; if (tState != ThreadState.Unstarted) @@ -648,7 +648,7 @@ public void Threading_ThreadState_Unstarted_Running_WaitSleepJoin_Test10() ") but got '" + tState + "'"); } - OutputHelper.WriteLine("Verifying the state of the current thread is Running"); + // Verifying the state of the current thread is Running newThread1.Start(); tState = Thread.CurrentThread.ThreadState; if (tState != ThreadState.Running) @@ -659,7 +659,7 @@ public void Threading_ThreadState_Unstarted_Running_WaitSleepJoin_Test10() ") but got '" + tState + "'"); } - OutputHelper.WriteLine("Sleeping a thread and verifing its state is WaitSleepJoin"); + // Sleeping a thread and verifing its state is WaitSleepJoin Thread.Sleep(100); tState = newThread1.ThreadState; if (tState != ThreadState.WaitSleepJoin) @@ -669,7 +669,7 @@ public void Threading_ThreadState_Unstarted_Running_WaitSleepJoin_Test10() throw new Exception("expected thread1 in WaitSleepJoin(" + ThreadState.WaitSleepJoin + ") but got '" + newThread1.ThreadState + "'"); } - OutputHelper.WriteLine(" Joining a thread and verifing its state is WaitSleepJoin"); + // Joining a thread and verifing its state is WaitSleepJoin Work w = new Work(); Thread newThread3 = new Thread(Work.DoWork); w.m_toJoin = newThread3; @@ -698,10 +698,10 @@ public void Threading_ThreadState_Suspend_Test11() /// /// - OutputHelper.WriteLine("Starts a thread and Suspends it immediately"); - OutputHelper.WriteLine("Starts a second thread"); - OutputHelper.WriteLine("Gets the state of the 1st thread and Resumes it"); - OutputHelper.WriteLine("Verifies that the state of the 1st thread was Suspended"); + // Starts a thread and Suspends it immediately + // Starts a second thread + // Gets the state of the 1st thread and Resumes it + // Verifies that the state of the 1st thread was Suspended Work.run = true; Work w1 = new Work(); Thread newThread1 = new Thread(w1.DoWorkThreadState); @@ -718,7 +718,7 @@ public void Threading_ThreadState_Suspend_Test11() newThread1.Abort(); if (tState != ThreadState.Suspended) { - OutputHelper.WriteLine("expected state Suspended(" + ThreadState.Suspended + ") but got '" + tState + "'"); + // expected state Suspended(" + ThreadState.Suspended + ") but got '" + tState + "' throw new Exception("expected state Suspended(" + ThreadState.Suspended + ") but got '" + tState + "'"); } } @@ -733,7 +733,7 @@ public void Threading_ThreadState_SuspendRequested_Test12() /// /// - OutputHelper.WriteLine("Starting 10 Threads"); + // Starting 10 Threads Thread[] newThread = new Thread[10]; Work[] w = new Work[10]; int i = 0, k = 0; @@ -745,8 +745,8 @@ public void Threading_ThreadState_SuspendRequested_Test12() newThread[i].Start(); i++; } - OutputHelper.WriteLine("Suspending the Threads and checking for SuspendRequested"); - OutputHelper.WriteLine("At least one of the threads should be in SuspendRequested"); + // Suspending the Threads and checking for SuspendRequested + // At least one of the threads should be in SuspendRequested while (k < 10) { while (newThread[k].ThreadState != ThreadState.Suspended) @@ -781,10 +781,10 @@ public void Threading_ThreadState_Abort_Stopped_Test13() /// /// - OutputHelper.WriteLine("Starts a thread and Aborts it immediately"); - OutputHelper.WriteLine("Starts a second thread"); - OutputHelper.WriteLine("Gets the state of the 1st thread"); - OutputHelper.WriteLine("Verifies the state of the 1st thread is Aborted"); + // Starts a thread and Aborts it immediately + // Starts a second thread + // Gets the state of the 1st thread + // Verifies the state of the 1st thread is Aborted DateTime t1, t2; TimeSpan period; @@ -797,13 +797,13 @@ public void Threading_ThreadState_Abort_Stopped_Test13() w.m_data = 42; Thread newThread2 = new Thread(w.DoMoreWork); newThread2.Start(); - OutputHelper.WriteLine("Pass Requires either of the next two compared values to be equal"); + // Pass Requires either of the next two compared values to be equal OutputHelper.WriteLine(newThread1.ThreadState + " Compare to " + ThreadState.Aborted); OutputHelper.WriteLine(newThread1.ThreadState + " Compare to " + ThreadState.Stopped); t2 = DateTime.UtcNow; ThreadState tState = newThread1.ThreadState; period = t2 - t1; - OutputHelper.WriteLine("Waited for at least " + period.Milliseconds.ToString() + " before checking the state"); + // Waited for at least " + period.Milliseconds.ToString() + " before checking the state if (tState != ThreadState.Aborted && tState != ThreadState.Stopped) { OutputHelper.WriteLine("expected the thread to be in Aborted/Stopped(" + ThreadState.Aborted + @@ -822,16 +822,16 @@ public void Threading_Abort_ThreadStateException_Test14() /// /// - OutputHelper.WriteLine("The type of exception thrown should be ThreadStateException"); + // The type of exception thrown should be ThreadStateException Thread newThread1 = new Thread(Work.DoWork); try { - OutputHelper.WriteLine("Aborting a thread not started should throw exception"); + // Aborting a thread not started should throw exception newThread1.Abort(); } catch (Exception e) { - OutputHelper.WriteLine("Correctly threw " + e.ToString() + " in an attempt to Abort Unstarted thread"); + // Correctly threw " + e.ToString() + " in an attempt to Abort Unstarted thread return; } @@ -849,15 +849,15 @@ public void Threading_Abort_ThreadAbortException_Test15() Work.hasAborted = false; Thread newThread1 = new Thread(Work.DoWorkThreadAbortException); - OutputHelper.WriteLine("starting a thread and Aborting it immediately"); + // starting a thread and Aborting it immediately newThread1.Start(); Thread.Sleep(50); newThread1.Abort(); Thread.Sleep(500); - OutputHelper.WriteLine("Verifying"); + // Verifying if (!Work.hasAborted) { - OutputHelper.WriteLine("Aborting a Thread didn't throw ThreadAbortException"); + // Aborting a Thread didn't throw ThreadAbortException throw new Exception("Aborting a Thread didn't throw ThreadAbortException"); } } @@ -872,9 +872,9 @@ public void Threading_Join_Timeout_Test16() /// /// - OutputHelper.WriteLine("Starts two threads"); - OutputHelper.WriteLine("Both threads Joins the main thread"); - OutputHelper.WriteLine("verify calling thread (main thread) is blocked for millisecondsTimeout"); + // Starts two threads + // Both threads Joins the main thread + // verify calling thread (main thread) is blocked for millisecondsTimeout Work.run = true; Work w = new Work(); @@ -927,8 +927,8 @@ public void Threading_Sleep_ArgumentOutOfRangeException_Test18() /// /// - OutputHelper.WriteLine("Verify ArgumentOutOfRangeException exception is thrown"); - OutputHelper.WriteLine("Why not for -1 ?"); + // Verify ArgumentOutOfRangeException exception is thrown + // Why not for -1 ? Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { Thread.Sleep(-2); }); } @@ -941,7 +941,7 @@ public void Threading_Join_ThreadStateException_Test19() /// /// - OutputHelper.WriteLine("The type of exception thrown should be ThreadStateException"); + // The type of exception thrown should be ThreadStateException Thread newThread1 = new Thread(Work.DoWork); Assert.ThrowsException(typeof(Exception), () => { newThread1.Join(); }); } @@ -955,7 +955,7 @@ public void Threading_Suspend_ThreadStateException_Test20() /// /// - OutputHelper.WriteLine("The type of exception thrown should be ThreadStateException"); + // The type of exception thrown should be ThreadStateException Thread newThread1 = new Thread(Work.DoWork); Assert.ThrowsException(typeof(Exception), () => { newThread1.Suspend(); }); } @@ -970,7 +970,7 @@ public void Threading_Resume_ThreadStateException_Test21() /// /// - OutputHelper.WriteLine("The type of exception thrown should be ThreadStateException"); + // The type of exception thrown should be ThreadStateException Thread newThread1 = new Thread(Work.DoWork); Assert.ThrowsException(typeof(Exception), () => { newThread1.Resume(); }); } @@ -993,8 +993,8 @@ public void Threading_Sleep_Zero_Test22() /// /// - OutputHelper.WriteLine("Starting a thread , Thread.Sleep(0) on the main thread"); - OutputHelper.WriteLine("Verify the thread is immediately scheduled to execute"); + // Starting a thread , Thread.Sleep(0) on the main thread + // Verify the thread is immediately scheduled to execute sleepZero = true; Thread t1 = new Thread(new ThreadStart(SleepTest)); t1.Start(); @@ -1003,12 +1003,12 @@ public void Threading_Sleep_Zero_Test22() Thread.Sleep(0); if (!sleepResult) { - OutputHelper.WriteLine("Test Thread.Sleep(0) Failed"); + // Test Thread.Sleep(0) Failed throw new Exception("Test Thread.Sleep(0) Failed"); } else { - OutputHelper.WriteLine("Test Thread.Sleep(0) Successful"); + // Test Thread.Sleep(0) Successful } sleepZero = false; } @@ -1025,9 +1025,9 @@ public void Threading_Priority_Change_Test23() /// const double acceptedTolerance = 5.0; // 5% tolerance - OutputHelper.WriteLine("Starts five threads of increasing priority and "); - OutputHelper.WriteLine("a control thread priority not set "); - OutputHelper.WriteLine("verifies that they get increasing amounts of attention"); + // Starts five threads of increasing priority and + // a control thread priority not set + // verifies that they get increasing amounts of attention PriorityTest.loopSwitch.Reset(); PriorityTest.startSecond.Reset(); @@ -1046,7 +1046,7 @@ public void Threading_Priority_Change_Test23() threadAbove.Priority = ThreadPriority.AboveNormal; threadHighest.Priority = ThreadPriority.Highest; - OutputHelper.WriteLine("Starting Threads"); + // Starting Threads threadHighest.Start(); threadAbove.Start(); threadNorm.Start(); @@ -1054,7 +1054,7 @@ public void Threading_Priority_Change_Test23() threadLowest.Start(); threadControl.Start(); - OutputHelper.WriteLine("Allow counting for 1 seconds."); + // Allow counting for 1 seconds. Thread.Sleep(1000); PriorityTest.loopSwitch.Set(); Thread.Sleep(1000); @@ -1071,8 +1071,8 @@ public void Threading_Priority_Change_Test23() threadNorm.Priority = ThreadPriority.AboveNormal; threadAbove.Priority = ThreadPriority.Highest; threadHighest.Priority = ThreadPriority.Lowest; - OutputHelper.WriteLine("Thread Priorities of each thread changed"); - OutputHelper.WriteLine("Allow counting for 1 seconds."); + // Thread Priorities of each thread changed + // Allow counting for 1 seconds. PriorityTest.startSecond.Set(); Thread.Sleep(1000); @@ -1086,9 +1086,9 @@ public void Threading_Priority_Change_Test23() OutputHelper.WriteLine("Highest - > Lowest " + PriorityTest.resultNewHighest); OutputHelper.WriteLine("Control Thread " + PriorityTest.resultNewControl); - OutputHelper.WriteLine("Verifies that each thread recieves attention less than or equal"); - OutputHelper.WriteLine("to higher priority threads based on the newly assigned priorities."); - OutputHelper.WriteLine("Accepted Tolerance : " + acceptedTolerance + "%"); + // Verifies that each thread recieves attention less than or equal + // to higher priority threads based on the newly assigned priorities. + // Accepted Tolerance : " + acceptedTolerance + "% if ((PriorityTest.resultNewHighest <= 0) || (Tolerance(2 * PriorityTest.resultNewHighest, PriorityTest.resultNewLowest) > acceptedTolerance) || @@ -1116,16 +1116,16 @@ public void Threading_CurrentThread_Test24() /// /// - OutputHelper.WriteLine("Starting the Thread"); + // Starting the Thread Work w = new Work(); w.m_data = 7; Thread newThread1 = new Thread(w.DoMoreWork); newThread1.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("verifying Thread.CurrentThread gives the Thread itself"); + // verifying Thread.CurrentThread gives the Thread itself if (!newThread1.Equals(w.currThread)) { - OutputHelper.WriteLine("Comparing the Thread with its own (Thread.Equals(Thread.CurrentThread)) failed"); + // Comparing the Thread with its own (Thread.Equals(Thread.CurrentThread)) failed throw new Exception("Comparing the Thread with its own (Thread.Equals(Thread.CurrentThread)) failed"); } } @@ -1139,13 +1139,13 @@ public void Threading_CurrentThread_Test24() // /// // /// - // OutputHelper.WriteLine("Getting the AppDomain"); + // // Getting the AppDomain // AppDomain domain = Thread.GetDomain(); - // OutputHelper.WriteLine("Verifying the domain"); + // // Verifying the domain // if (!domain.Equals(AppDomain.CurrentDomain)) // { - // OutputHelper.WriteLine("Thread.GetDomain().Equals(AppDomain.CurrentDomain) Failed"); + // // Thread.GetDomain().Equals(AppDomain.CurrentDomain) Failed // throw new Exception("Thread.GetDomain().Equals(AppDomain.CurrentDomain) Failed"); // } //} @@ -1159,34 +1159,34 @@ public void Threading_Thread_CurrentThread_Suspend_Test26() delegate { count += 2; - OutputHelper.WriteLine("2) Worker thread started..."); - OutputHelper.WriteLine("Suspending Worker thread..."); + // 2) Worker thread started... + // Suspending Worker thread... Thread.CurrentThread.Suspend(); - OutputHelper.WriteLine("4) Worker thread resumed..."); + // 4) Worker thread resumed... count += 5; } )); if (count != 0) { - OutputHelper.WriteLine("Failure verifying counter reset to zero before starting the thread"); + // Failure verifying counter reset to zero before starting the thread throw new Exception("Failure verifying counter reset to zero before starting the thread"); } - OutputHelper.WriteLine("1) Starting worker..."); + // 1) Starting worker... newThread.Start(); Thread.Sleep(3000); if (count != 2) { - OutputHelper.WriteLine("Failure : Worker Thread is not Suspended !"); + // Failure : Worker Thread is not Suspended ! throw new Exception("Failure : Worker Thread is not Suspended !"); } - OutputHelper.WriteLine("3) Wake up suspended thread..."); + // 3) Wake up suspended thread... newThread.Resume(); Thread.Sleep(3000); - OutputHelper.WriteLine("5) Main thread finished"); + // 5) Main thread finished if (count != 7) { - OutputHelper.WriteLine("Worker thread not finished for 3000msec after resumed"); + // Worker thread not finished for 3000msec after resumed throw new Exception("Worker thread not finished for 3000msec after resumed"); } } diff --git a/Tests/NFUnitTestThread/UnitTestTimeTests.cs b/Tests/NFUnitTestThread/UnitTestTimeTests.cs index 6e2c4c0a..60e57c1a 100644 --- a/Tests/NFUnitTestThread/UnitTestTimeTests.cs +++ b/Tests/NFUnitTestThread/UnitTestTimeTests.cs @@ -56,7 +56,7 @@ public void CheckStatus(Object stateInfo) if (m_invokeCount == m_maxCount) { - OutputHelper.WriteLine("Reset the counter and signal Main."); + // Reset the counter and signal Main. m_invokeCount = 0; autoEvent.Set(); m_result = true; @@ -76,12 +76,12 @@ public void Timer_TimerCallback_Test1() /// 6. Verifies that the TimerCallback has been called /// /// - OutputHelper.WriteLine("Tests the Timer and TimerCallback classes, "); - OutputHelper.WriteLine("as well as the Change and Dispose methods"); + // Tests the Timer and TimerCallback classes, + // as well as the Change and Dispose methods AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -91,7 +91,7 @@ public void Timer_TimerCallback_Test1() new Timer(timerDelegate, autoEvent, 1000, 250); statusChecker.m_result = false; - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); if (!statusChecker.m_result) { @@ -101,12 +101,12 @@ public void Timer_TimerCallback_Test1() "' times but got '" + statusChecker.m_invokeCount + "'"); } statusChecker.m_result = false; - OutputHelper.WriteLine("Changing period to 500msec"); + // Changing period to 500msec stateTimer.Change(0, 500); - OutputHelper.WriteLine("Waiting for 7500msec and verifying"); + // Waiting for 7500msec and verifying autoEvent.WaitOne(7500, false); stateTimer.Dispose(); - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. if (!statusChecker.m_result) { OutputHelper.WriteLine("Failure : expected callback '" + statusChecker.m_maxCount + @@ -129,12 +129,12 @@ public void Timer_TimerCallback_ZeroTest2() /// /// - OutputHelper.WriteLine("Tests the Timer and TimerCallback classes, "); - OutputHelper.WriteLine("as well as the Change and Dispose methods"); + // Tests the Timer and TimerCallback classes, + // as well as the Change and Dispose methods AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -144,7 +144,7 @@ public void Timer_TimerCallback_ZeroTest2() new Timer(timerDelegate, autoEvent, 1000, 250); statusChecker.m_result = false; - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); if (!statusChecker.m_result) { @@ -155,7 +155,7 @@ public void Timer_TimerCallback_ZeroTest2() } statusChecker.m_result = false; statusChecker.z_flag = true; - OutputHelper.WriteLine("Changing duetime to zero and Verifying the timer started Immediately."); + // Changing duetime to zero and Verifying the timer started Immediately. DateTime t1 = DateTime.UtcNow; stateTimer.Change(0, 500); Thread.Sleep(1); @@ -163,12 +163,12 @@ public void Timer_TimerCallback_ZeroTest2() OutputHelper.WriteLine("callback method called within " + time.ToString()); if (time.CompareTo(new TimeSpan(0, 0, 0, 0, 100)) > 0) { - OutputHelper.WriteLine("The timer didn't start immediately, started after '" + time.ToString() + "'"); + // The timer didn't start immediately, started after '" + time.ToString() + "' throw new Exception("The timer didn't start immediately, started after '" + time.ToString() + "'"); } - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(7500, false); - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. stateTimer.Dispose(); if (!statusChecker.m_result) { @@ -196,12 +196,12 @@ public void Timer_Disable_Periodic_Signaling_Test3() /// /// - OutputHelper.WriteLine("Tests the Timer and TimerCallback classes, "); - OutputHelper.WriteLine("as well as the Change and Dispose methods"); + // Tests the Timer and TimerCallback classes, + // as well as the Change and Dispose methods AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -210,7 +210,7 @@ public void Timer_Disable_Periodic_Signaling_Test3() Timer stateTimer = new Timer(timerDelegate, autoEvent, 1000, 250); - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); if (!statusChecker.m_result) { @@ -222,34 +222,34 @@ public void Timer_Disable_Periodic_Signaling_Test3() statusChecker.m_result = false; statusChecker.c_flag = true; - OutputHelper.WriteLine("Changing period to zero (0) "); + // Changing period to zero (0) stateTimer.Change(0, 0); - OutputHelper.WriteLine("Waiting and verifying the callback method is invoked once"); + // Waiting and verifying the callback method is invoked once autoEvent.WaitOne(5000, false); if (statusChecker.counter != 1) { - OutputHelper.WriteLine("Failure : expected callback '1' times but got '" + statusChecker.counter + "'"); + // Failure : expected callback '1' times but got '" + statusChecker.counter + "' throw new Exception("Failure : expected callback '1' times but got '" + statusChecker.counter + "'"); } - OutputHelper.WriteLine("Reseting counter to zero"); + // Reseting counter to zero statusChecker.counter = 0; - OutputHelper.WriteLine("Changing period to Timeout.Infinite"); + // Changing period to Timeout.Infinite stateTimer.Change(0, Timeout.Infinite); - OutputHelper.WriteLine("Waiting and verifying the callback method is invoked once"); + // Waiting and verifying the callback method is invoked once autoEvent.WaitOne(5000, false); if (statusChecker.counter != 1) { - OutputHelper.WriteLine("Failure : expected callback '1' times but got '" + statusChecker.counter + "'"); + // Failure : expected callback '1' times but got '" + statusChecker.counter + "' throw new Exception("Failure : expected callback '1' times but got '" + statusChecker.counter + "'"); } - OutputHelper.WriteLine("Changing period to quarter sec "); + // Changing period to quarter sec stateTimer.Change(0, 250); - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. stateTimer.Dispose(); if (!statusChecker.m_result) { @@ -270,11 +270,11 @@ public void Timer_TimerCallback_Duetime_Infinite_Test4() /// /// - OutputHelper.WriteLine("Tests the TimerCallback is never invoked if it's duetime is infinite "); + // Tests the TimerCallback is never invoked if it's duetime is infinite AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); statusChecker.c_flag = true; - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -283,9 +283,9 @@ public void Timer_TimerCallback_Duetime_Infinite_Test4() Timer stateTimer = new Timer(timerDelegate, autoEvent, Timeout.Infinite, 250); - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. stateTimer.Dispose(); if (statusChecker.counter != 0) { @@ -307,12 +307,12 @@ public void Timer_Dispose_Test5() /// /// - OutputHelper.WriteLine("Tests the Timer and TimerCallback classes, "); - OutputHelper.WriteLine("as well as the Change and Dispose methods"); + // Tests the Timer and TimerCallback classes, + // as well as the Change and Dispose methods AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); statusChecker.c_flag = true; - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -320,9 +320,9 @@ public void Timer_Dispose_Test5() DateTime.UtcNow.ToString()); Timer stateTimer = new Timer(timerDelegate, autoEvent, 1000, 250); - OutputHelper.WriteLine("Immediately Destroying timer"); + // Immediately Destroying timer stateTimer.Dispose(); - OutputHelper.WriteLine("Waiting and verifying for Timer disposed"); + // Waiting and verifying for Timer disposed autoEvent.WaitOne(5000, false); if (statusChecker.counter != 0) { @@ -346,12 +346,12 @@ public void Timer_Negative_Period_Test6() /// /// - OutputHelper.WriteLine("Tests the Timer and TimerCallback classes, "); - OutputHelper.WriteLine("as well as the Change and Dispose methods"); + // Tests the Timer and TimerCallback classes, + // as well as the Change and Dispose methods AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -361,18 +361,18 @@ public void Timer_Negative_Period_Test6() new Timer(timerDelegate, autoEvent, 1000, 250); statusChecker.m_result = false; - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); statusChecker.m_result = false; - OutputHelper.WriteLine("Changing period to -ve"); - OutputHelper.WriteLine("period is negative and is not equal to Infinite (or -1) should throw an exception"); + // Changing period to -ve + // period is negative and is not equal to Infinite (or -1) should throw an exception Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { stateTimer.Change(0, -2); - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(7500, false); }); - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. stateTimer.Dispose(); } @@ -388,11 +388,11 @@ public void Timer_Negative_Duetime_Test7() /// /// - OutputHelper.WriteLine("Tests the Timer Change method for ArgumentOutOfRangeException"); + // Tests the Timer Change method for ArgumentOutOfRangeException AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -402,19 +402,19 @@ public void Timer_Negative_Duetime_Test7() new Timer(timerDelegate, autoEvent, 1000, 250); statusChecker.m_result = false; - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); statusChecker.m_result = false; - OutputHelper.WriteLine("Changing period -ve"); - OutputHelper.WriteLine("duetime is negative and is not equal to Infinite(or -1) should throw an exception"); + // Changing period -ve + // duetime is negative and is not equal to Infinite(or -1) should throw an exception Assert.ThrowsException(typeof(ArgumentOutOfRangeException), () => { stateTimer.Change(-2, 500); - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(7500, false); }); - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. stateTimer.Dispose(); } @@ -426,7 +426,7 @@ public void Timer_TimerCallback_Null_Test8() /// 2. Verifies ArgumentNullException exception is thrown /// /// - OutputHelper.WriteLine("Tests the Timer for ArgumentNullException"); + // Tests the Timer for ArgumentNullException AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); @@ -435,11 +435,11 @@ public void Timer_TimerCallback_Null_Test8() DateTime.UtcNow.ToString()); Assert.ThrowsException(typeof(ArgumentNullException), () => { - OutputHelper.WriteLine("Passing a 'null' callback parameter to a timer should throw exception"); + // Passing a 'null' callback parameter to a timer should throw exception Timer stateTimer = new Timer(null, autoEvent, 1000, 250); - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(7500, false); - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. stateTimer.Dispose(); }); } @@ -457,12 +457,12 @@ public void Timer_MaxInt_DueTime_Test9() /// /// - OutputHelper.WriteLine("Tests the Timer and TimerCallback classes, "); - OutputHelper.WriteLine("as well as the Change and Dispose methods"); + // Tests the Timer and TimerCallback classes, + // as well as the Change and Dispose methods AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -472,7 +472,7 @@ public void Timer_MaxInt_DueTime_Test9() new Timer(timerDelegate, autoEvent, 1000, 250); statusChecker.m_result = false; - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); if (!statusChecker.m_result) { @@ -483,13 +483,13 @@ public void Timer_MaxInt_DueTime_Test9() } statusChecker.m_result = false; statusChecker.z_flag = true; - OutputHelper.WriteLine("Changing duetime to 4 sec (Assumed MaxInt)"); + // Changing duetime to 4 sec (Assumed MaxInt) DateTime t1 = DateTime.UtcNow; stateTimer.Change(4000, 250); - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(8000, false); TimeSpan duration = statusChecker.t2 - t1; - OutputHelper.WriteLine("Verifying callback method 1st invoked after 4000msec."); + // Verifying callback method 1st invoked after 4000msec. if (duration.CompareTo(new TimeSpan(4000)) <= 0) { OutputHelper.WriteLine("Failure : expected 1st callback happens more than" + @@ -504,7 +504,7 @@ public void Timer_MaxInt_DueTime_Test9() throw new Exception("Failure : expected callback '" + statusChecker.m_maxCount + "' times but got '" + statusChecker.m_invokeCount + "'"); } - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. stateTimer.Dispose(); } @@ -521,12 +521,12 @@ public void Timer_MaxInt_Period_Test10() /// /// - OutputHelper.WriteLine("Tests the Timer and TimerCallback classes, "); - OutputHelper.WriteLine("as well as the Change and Dispose methods"); + // Tests the Timer and TimerCallback classes, + // as well as the Change and Dispose methods AutoResetEvent autoEvent = new AutoResetEvent(false); StatusChecker statusChecker = new StatusChecker(15); - OutputHelper.WriteLine("Creating the TimerCallback"); + // Creating the TimerCallback TimerCallback timerDelegate = new TimerCallback(statusChecker.CheckStatus); @@ -536,7 +536,7 @@ public void Timer_MaxInt_Period_Test10() new Timer(timerDelegate, autoEvent, 1000, 250); statusChecker.m_result = false; - OutputHelper.WriteLine("Waiting and verifying"); + // Waiting and verifying autoEvent.WaitOne(5000, false); if (!statusChecker.m_result) { @@ -547,9 +547,9 @@ public void Timer_MaxInt_Period_Test10() } statusChecker.m_result = false; statusChecker.m_flag = true; - OutputHelper.WriteLine("Changing period to 4 sec (Assumed MaxInt)"); + // Changing period to 4 sec (Assumed MaxInt) stateTimer.Change(0, 4000); - OutputHelper.WriteLine("Waiting and verifying callback method is invoked every 4 sec"); + // Waiting and verifying callback method is invoked every 4 sec autoEvent.WaitOne(60000, false); if (!statusChecker.m_result) { @@ -558,14 +558,14 @@ public void Timer_MaxInt_Period_Test10() throw new Exception("Failure : after 60sec. expected callback invoked '" + statusChecker.m_maxCount + "' times but got '" + statusChecker.m_invokeCount + "'"); } - OutputHelper.WriteLine("Verifying time interval b/n callback invoke is atleast 4sec."); + // Verifying time interval b/n callback invoke is atleast 4sec. TimeSpan duration = statusChecker.t2 - statusChecker.t1; if (duration.CompareTo(new TimeSpan(4000)) < 0) { - OutputHelper.WriteLine("Failure : expected interval b/n callbacks at least '4sec' but got '" + duration.Seconds.ToString() + "sec'"); + // Failure : expected interval b/n callbacks at least '4sec' but got '" + duration.Seconds.ToString() + "sec' throw new Exception("Failure : expected interval b/n callbacks at least '4sec' but got '" + duration.Seconds.ToString() + "sec'"); } - OutputHelper.WriteLine("Destroying timer."); + // Destroying timer. stateTimer.Dispose(); } diff --git a/Tests/NFUnitTestThread/UnitTestTimeoutTests.cs b/Tests/NFUnitTestThread/UnitTestTimeoutTests.cs index c7cd693f..03d0f892 100644 --- a/Tests/NFUnitTestThread/UnitTestTimeoutTests.cs +++ b/Tests/NFUnitTestThread/UnitTestTimeoutTests.cs @@ -19,13 +19,13 @@ class Work public void DoWorkInfinite() { Thread.Sleep(300); - OutputHelper.WriteLine("Instance thread procedure DoWorkInfinite."); + // Instance thread procedure DoWorkInfinite. Thread.Sleep(Timeout.Infinite); } public static void DoWorkInfiniteStatic() { Thread.Sleep(300); - OutputHelper.WriteLine("Static thread procedure DoWorkInfiniteStatic."); + // Static thread procedure DoWorkInfiniteStatic. Thread.Sleep(Timeout.Infinite); } } @@ -40,10 +40,10 @@ public void Timeout1_Infinite_Test() /// /// - OutputHelper.WriteLine("Starts two threads one infinitely long, aborts one and passes."); - OutputHelper.WriteLine("This may erroneously fail for extremely slow devices."); + // Starts two threads one infinitely long, aborts one and passes. + // This may erroneously fail for extremely slow devices. - OutputHelper.WriteLine("Starting the two threads"); + // Starting the two threads Thread newThread1 = new Thread(Work.DoWorkInfiniteStatic); newThread1.Start(); Work w = new Work(); @@ -51,7 +51,7 @@ public void Timeout1_Infinite_Test() newThread2.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("Waiting for 1000msec and verifying both threads are alive"); + // Waiting for 1000msec and verifying both threads are alive int slept = 0; while ((newThread1.IsAlive || newThread2.IsAlive) && slept < 1000) { @@ -60,19 +60,19 @@ public void Timeout1_Infinite_Test() } if (!newThread1.IsAlive || !newThread2.IsAlive) { - OutputHelper.WriteLine("Failure : Both threads were suppose to be sleeping for Timeout.Infinite"); - OutputHelper.WriteLine("IsAlive ? Thread1 = '" + newThread1.IsAlive + "' and Thread2 = '" + newThread2.IsAlive + "'"); + // Failure : Both threads were suppose to be sleeping for Timeout.Infinite + // IsAlive ? Thread1 = '" + newThread1.IsAlive + "' and Thread2 = '" + newThread2.IsAlive + "' throw new Exception("IsAlive ? Thread1 = '" + newThread1.IsAlive + "' and Thread2 = '" + newThread2.IsAlive + "'"); } - OutputHelper.WriteLine("Aborting both threds and Verifying abort."); + // Aborting both threds and Verifying abort. newThread2.Abort(); newThread1.Abort(); Thread.Sleep(10); if (newThread1.IsAlive || newThread2.IsAlive) { - OutputHelper.WriteLine("Upon Abort both thread should be dead but"); - OutputHelper.WriteLine("IsAlive ? Thread1 = '" + newThread1.IsAlive + "' and Thread2 = '" + newThread2.IsAlive + "'"); + // Upon Abort both thread should be dead but + // IsAlive ? Thread1 = '" + newThread1.IsAlive + "' and Thread2 = '" + newThread2.IsAlive + "' throw new Exception("IsAlive ? Thread1 = '" + newThread1.IsAlive + "' and Thread2 = '" + newThread2.IsAlive + "'"); } } diff --git a/Tests/NFUnitTestThread/UnitTestWaitHandleTests.cs b/Tests/NFUnitTestThread/UnitTestWaitHandleTests.cs index 42ee9c9d..c81581ec 100644 --- a/Tests/NFUnitTestThread/UnitTestWaitHandleTests.cs +++ b/Tests/NFUnitTestThread/UnitTestWaitHandleTests.cs @@ -49,52 +49,53 @@ public void WaitHandle1_WaitAll_WaitAny_Test() /// 6. Verifies that only one threads has executed /// /// - OutputHelper.WriteLine("This test may erroneously pass or fail due to machine speed"); - OutputHelper.WriteLine("Tests the WaitAll method"); + // This test may erroneously pass or fail due to machine speed + // Tests the WaitAll method - OutputHelper.WriteLine("Create threads"); + // Create threads Thread t1 = new Thread(DoTask1); Thread t2 = new Thread(DoTask2); t1.Start(); t2.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("Waiting for all tasks to complete and verifying"); + // Waiting for all tasks to complete and verifying if (!WaitHandle.WaitAll(waitHandles)) { - OutputHelper.WriteLine("Not all waithandles has received the signal"); + // Not all waithandles has received the signal throw new Exception("Not all waithandles has received the signal"); } bool r = t1.IsAlive, s = t2.IsAlive; if (r || s) { - OutputHelper.WriteLine("Not all threads are dead"); + // Not all threads are dead if (r) { - OutputHelper.WriteLine("t1 is Alive"); + // t1 is Alive } if (s) { - OutputHelper.WriteLine("t2 is Alive"); + // t2 is Alive } throw new Exception("Not all threads are dead"); } - OutputHelper.WriteLine("Re-create threads"); + // Re-create threads t1 = new Thread(DoTask1); t2 = new Thread(DoTask2); t1.Start(); t2.Start(); Thread.Sleep(1); - OutputHelper.WriteLine("Waiting for either task to complete and verifying"); - OutputHelper.WriteLine("The WaitHandle with index " + WaitHandle.WaitAny(waitHandles).ToString() + " satisfied the wait"); - OutputHelper.WriteLine("Doing t1 XOR t2 to verify only one but not both are alive or dead"); - OutputHelper.WriteLine("t1 XOR t2 = ~((p&q)||(~p & ~q))"); + // Waiting for either task to complete and verifying + WaitHandle.WaitAny(waitHandles); + + // Doing t1 XOR t2 to verify only one but not both are alive or dead + // t1 XOR t2 = ~((p&q)||(~p & ~q)) bool p = t1.IsAlive, q = t2.IsAlive; if ((p && q) || ((!p) && (!q))) { - OutputHelper.WriteLine("Not both but either one should have finished"); + // Not both but either one should have finished throw new Exception("Not both but either one should have finished"); } OutputHelper.WriteLine(p == true ? "t1 is Alive " : "t1 is Dead "); @@ -130,27 +131,27 @@ public void WaitHandle2_WatiOne_Test() /// /// - OutputHelper.WriteLine("This test verifies thread waits, and executes when signaled"); - OutputHelper.WriteLine("Tests WaitOne method"); + // This test verifies thread waits, and executes when signaled + // Tests WaitOne method Thread newThread1 = new Thread(Work); newThread1.Start(); - OutputHelper.WriteLine("Signal the worker 5 times"); + // Signal the worker 5 times for (int i = 1; i <= 5; i++) { - OutputHelper.WriteLine("First wait until worker is ready"); + // First wait until worker is ready ready.WaitOne(); - OutputHelper.WriteLine("Doing task"); + // Doing task counter++; - OutputHelper.WriteLine("Tell worker to go!"); + // Tell worker to go! go.Set(); } if (counter != 5) { - OutputHelper.WriteLine("expected signaling '5' but got '" + counter + "'"); + // expected signaling '5' but got '" + counter + "' throw new Exception("expected signaling '5' but got '" + counter + "'"); } - OutputHelper.WriteLine("Tell the worker to end by reseting counter to 0(zero)"); + // Tell the worker to end by reseting counter to 0(zero) ready.WaitOne(); counter = 0; go.Set(); diff --git a/Tests/NFUnitTestTypes/UnitTestObjectTypeTests.cs b/Tests/NFUnitTestTypes/UnitTestObjectTypeTests.cs index dda3a61d..e5b57de3 100644 --- a/Tests/NFUnitTestTypes/UnitTestObjectTypeTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestObjectTypeTests.cs @@ -14,7 +14,7 @@ class UnitTestObjectTypeTests [TestMethod] public void TestCtor() { - OutputHelper.WriteLine("Test of Object constructor"); + // Test of Object constructor object o = new(); Assert.IsNotNull(o, "failed to create an Object"); @@ -23,7 +23,7 @@ public void TestCtor() [TestMethod] public void TestEquals_01() { - OutputHelper.WriteLine("Test01 of Object Equals"); + // Test01 of Object Equals object objectX = new(); object objectY = new(); @@ -41,7 +41,7 @@ public void TestEquals_01() [TestMethod] public void TestEquals_02() { - OutputHelper.WriteLine("Test02 of Object Equals overload"); + // Test02 of Object Equals overload object objectX = new(); object objectY = new(); @@ -62,7 +62,7 @@ public void TestEquals_02() [TestMethod] public void TestGetHashCode() { - OutputHelper.WriteLine("Test Object HashCode"); + // Test Object HashCode object objectX = new(); Assert.AreEqual(objectX.GetHashCode(), objectX.GetHashCode(), "Object's hash code should not change"); @@ -71,7 +71,7 @@ public void TestGetHashCode() [TestMethod] public void TestGetType() { - OutputHelper.WriteLine("Test getting Object type"); + // Test getting Object type object objectX = new(); @@ -82,7 +82,7 @@ public void TestGetType() [TestMethod] public void TestReferenceEquals() { - OutputHelper.WriteLine("Test Object ReferenceEquals"); + // Test Object ReferenceEquals object objectX = new(); object objectY = new(); @@ -98,7 +98,7 @@ public void TestReferenceEquals() [TestMethod] public void TestToString() { - OutputHelper.WriteLine("Test Object ToString"); + // Test Object ToString object objectX = new(); object objectY = new(); diff --git a/Tests/NFUnitTestTypes/UnitTestValueArrayTypess.cs b/Tests/NFUnitTestTypes/UnitTestValueArrayTypess.cs index ca7b072f..a9c69f2b 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueArrayTypess.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueArrayTypess.cs @@ -16,95 +16,95 @@ public class ValueArrayTypes [TestMethod] public void ValueArray01_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" byte is an alias for System.Byte"); + // Section 4.1 + // byte is an alias for System.Byte ValueArrayTestClass01.testMethod(); } [TestMethod] public void ValueArray02_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" char is an alias for System.Char"); + // Section 4.1 + // char is an alias for System.Char ValueArrayTestClass02.testMethod(); } [TestMethod] public void ValueArray03_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" short is an alias for System.Int16"); + // Section 4.1 + // short is an alias for System.Int16 ValueArrayTestClass03.testMethod(); } [TestMethod] public void ValueArray04_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" int is an alias for System.Int32"); + // Section 4.1 + // int is an alias for System.Int32 ValueArrayTestClass04.testMethod(); } [TestMethod] public void ValueArray05_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" long is an alias for System.Int64"); + // Section 4.1 + // long is an alias for System.Int64 ValueArrayTestClass05.testMethod(); } [TestMethod] public void ValueArray06_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" float is an alias for System.Single"); + // Section 4.1 + // float is an alias for System.Single ValueArrayTestClass06.testMethod(); } [TestMethod] public void ValueArray07_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" double is an alias for System.Double"); + // Section 4.1 + // double is an alias for System.Double ValueArrayTestClass07.testMethod(); } [TestMethod] public void ValueArray09_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" bool is an alias for System.Boolean"); + // Section 4.1 + // bool is an alias for System.Boolean ValueArrayTestClass09.testMethod(); } [TestMethod] public void ValueArray12_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" Because a simple type aliases a struct type, every simple type has members."); - OutputHelper.WriteLine("This test is expected to fail"); + // Section 4.1 + // Because a simple type aliases a struct type, every simple type has members. + // This test is expected to fail ValueArrayTestClass12.testMethod(); } [TestMethod] public void ValueArray13_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" sbyte is an alias for System.SByte"); + // Section 4.1 + // sbyte is an alias for System.SByte ValueArrayTestClass13.testMethod(); } [TestMethod] public void ValueArray14_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" ushort is an alias for System.UInt16"); + // Section 4.1 + // ushort is an alias for System.UInt16 ValueArrayTestClass14.testMethod(); } [TestMethod] public void ValueArray15_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" uint is an alias for System.UInt32"); + // Section 4.1 + // uint is an alias for System.UInt32 ValueArrayTestClass15.testMethod(); } diff --git a/Tests/NFUnitTestTypes/UnitTestValueDefultConstTests.cs b/Tests/NFUnitTestTypes/UnitTestValueDefultConstTests.cs index 5d627f31..6670c3ba 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueDefultConstTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueDefultConstTests.cs @@ -16,98 +16,98 @@ class UnitTestValueDefultConstTests [TestMethod] public void ValueDefault_Const01_Test() { - OutputHelper.WriteLine("Testing byte == 0"); + // Testing byte == 0 ValueDefault_ConstTestClass01.testMethod(); } [TestMethod] public void ValueDefault_Const02_Test() { - OutputHelper.WriteLine("Testing short == 0"); + // Testing short == 0 ValueDefault_ConstTestClass02.testMethod(); } [TestMethod] public void ValueDefault_Const03_Test() { - OutputHelper.WriteLine("Testing int == 0"); + // Testing int == 0 ValueDefault_ConstTestClass03.testMethod(); } [TestMethod] public void ValueDefault_Const04_Test() { - OutputHelper.WriteLine("Testing long == 0L"); + // Testing long == 0L ValueDefault_ConstTestClass04.testMethod(); } [TestMethod] public void ValueDefault_Const05_Test() { - OutputHelper.WriteLine("Testing char == \x0000"); + // Testing char == \x0000 ValueDefault_ConstTestClass05.testMethod(); } [TestMethod] public void ValueDefault_Const06_Test() { - OutputHelper.WriteLine("Testing float == 0.0f"); + // Testing float == 0.0f ValueDefault_ConstTestClass06.testMethod(); } [TestMethod] public void ValueDefault_Const07_Test() { - OutputHelper.WriteLine("Testing double == 0.0d"); + // Testing double == 0.0d ValueDefault_ConstTestClass07.testMethod(); } [TestMethod] public void ValueDefault_Const09_Test() { - OutputHelper.WriteLine("Testing bool == false"); + // Testing bool == false ValueDefault_ConstTestClass09.testMethod(); } [TestMethod] public void ValueDefault_Const11_Test() { - OutputHelper.WriteLine("Testing enum"); + // Testing enum ValueDefault_ConstTestClass11.testMethod(); } [TestMethod] public void ValueDefault_Const12_Test() { - OutputHelper.WriteLine("Testing struct"); + // Testing struct ValueDefault_ConstTestClass12.testMethod(); } [TestMethod] public void ValueDefault_Const14_Test() { - OutputHelper.WriteLine("Testing sbyte == 0"); + // Testing sbyte == 0 ValueDefault_ConstTestClass14.testMethod(); } [TestMethod] public void ValueDefault_Const15_Test() { - OutputHelper.WriteLine("Testing ushort == 0"); + // Testing ushort == 0 ValueDefault_ConstTestClass15.testMethod(); } [TestMethod] public void ValueDefault_Const16_Test() { - OutputHelper.WriteLine("Testing uint == 0"); + // Testing uint == 0 ValueDefault_ConstTestClass16.testMethod(); } [TestMethod] public void ValueDefault_Const17_Test() { - OutputHelper.WriteLine("Testing ulong == 0"); + // Testing ulong == 0 ValueDefault_ConstTestClass17.testMethod(); } diff --git a/Tests/NFUnitTestTypes/UnitTestValueFloatTests.cs b/Tests/NFUnitTestTypes/UnitTestValueFloatTests.cs index 6334a048..8b772fa7 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueFloatTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueFloatTests.cs @@ -19,189 +19,189 @@ class UnitTestValueFloatTests [TestMethod] public void ValueFloat04_Test() { - OutputHelper.WriteLine("Testing float type is kept after addition with other types"); + // Testing float type is kept after addition with other types ValueFloatTestClass04.testMethod(); } [TestMethod] public void ValueFloat05_Test() { - OutputHelper.WriteLine("Testing double type is kept after addition with other types"); + // Testing double type is kept after addition with other types ValueFloatTestClass05.testMethod(); } [TestMethod] public void ValueFloat06_Test() { - OutputHelper.WriteLine("Testing float type is kept after subtraction with other types"); + // Testing float type is kept after subtraction with other types ValueFloatTestClass06.testMethod(); } [TestMethod] public void ValueFloat07_Test() { - OutputHelper.WriteLine("Testing double type is kept after subtraction with other types"); + // Testing double type is kept after subtraction with other types ValueFloatTestClass07.testMethod(); } [TestMethod] public void ValueFloat08_Test() { - OutputHelper.WriteLine("Testing float type is kept after multiplication with other types"); + // Testing float type is kept after multiplication with other types ValueFloatTestClass08.testMethod(); } [TestMethod] public void ValueFloat09_Test() { - OutputHelper.WriteLine("Testing double type is kept after maultiplication with other types"); + // Testing double type is kept after maultiplication with other types ValueFloatTestClass09.testMethod(); } [TestMethod] public void ValueFloat10_Test() { - OutputHelper.WriteLine("Testing float type is kept after division with other types"); + // Testing float type is kept after division with other types ValueFloatTestClass10.testMethod(); } [TestMethod] public void ValueFloat11_Test() { - OutputHelper.WriteLine("Testing double type is kept after division with other types"); + // Testing double type is kept after division with other types ValueFloatTestClass11.testMethod(); } [TestMethod] public void ValueFloat12_Test() { - OutputHelper.WriteLine("Testing float type is kept after modulus with other types"); + // Testing float type is kept after modulus with other types ValueFloatTestClass12.testMethod(); } [TestMethod] public void ValueFloat13_Test() { - OutputHelper.WriteLine("Testing double type is kept after modulus with other types"); + // Testing double type is kept after modulus with other types ValueFloatTestClass13.testMethod(); } [TestMethod] public void ValueFloat14_Test() { - OutputHelper.WriteLine("Testing that equality operations return bool type objects"); + // Testing that equality operations return bool type objects ValueFloatTestClass14.testMethod(); } [TestMethod] public void ValueFloat15_Test() { - OutputHelper.WriteLine("Testing that equality operations return bool type objects"); + // Testing that equality operations return bool type objects ValueFloatTestClass15.testMethod(); } [TestMethod] public void ValueFloat16_Test() { - OutputHelper.WriteLine("Testing that non-equality operations return bool type objects"); + // Testing that non-equality operations return bool type objects ValueFloatTestClass16.testMethod(); } [TestMethod] public void ValueFloat17_Test() { - OutputHelper.WriteLine("Testing that non-equality operations return bool type objects"); + // Testing that non-equality operations return bool type objects ValueFloatTestClass17.testMethod(); } [TestMethod] public void ValueFloat18_Test() { - OutputHelper.WriteLine("Testing that greater than operations return bool type objects"); + // Testing that greater than operations return bool type objects ValueFloatTestClass18.testMethod(); } [TestMethod] public void ValueFloat19_Test() { - OutputHelper.WriteLine("Testing that greater than operations return bool type objects"); + // Testing that greater than operations return bool type objects ValueFloatTestClass19.testMethod(); } [TestMethod] public void ValueFloat20_Test() { - OutputHelper.WriteLine("Testing that less than operations return bool type objects"); + // Testing that less than operations return bool type objects ValueFloatTestClass20.testMethod(); } [TestMethod] public void ValueFloat21_Test() { - OutputHelper.WriteLine("Testing that less than operations return bool type objects"); + // Testing that less than operations return bool type objects ValueFloatTestClass21.testMethod(); } [TestMethod] public void ValueFloat22_Test() { - OutputHelper.WriteLine("Testing that greater than or equal operations return bool type objects"); + // Testing that greater than or equal operations return bool type objects ValueFloatTestClass22.testMethod(); } [TestMethod] public void ValueFloat23_Test() { - OutputHelper.WriteLine("Testing that greater than or equal operations return bool type objects"); + // Testing that greater than or equal operations return bool type objects ValueFloatTestClass23.testMethod(); } [TestMethod] public void ValueFloat24_Test() { - OutputHelper.WriteLine("Testing that less than or equal operations return bool type objects"); + // Testing that less than or equal operations return bool type objects ValueFloatTestClass24.testMethod(); } [TestMethod] public void ValueFloat25_Test() { - OutputHelper.WriteLine("Testing that less than or equal operations return bool type objects"); + // Testing that less than or equal operations return bool type objects ValueFloatTestClass25.testMethod(); } [TestMethod] public void ValueFloat26_Test() { - OutputHelper.WriteLine("Testing that double keeps its type in all operations with float"); + // Testing that double keeps its type in all operations with float ValueFloatTestClass26.testMethod(); } [TestMethod] public void ValueFloat27_Test() { - OutputHelper.WriteLine("Testing that comparisons between floats and doubles return bools"); + // Testing that comparisons between floats and doubles return bools ValueFloatTestClass27.testMethod(); } [TestMethod] public void ValueFloat28_Test() { - OutputHelper.WriteLine("Testing that float keeps its type after any operation with a float"); + // Testing that float keeps its type after any operation with a float ValueFloatTestClass28.testMethod(); } [TestMethod] public void ValueFloat29_Test() { - OutputHelper.WriteLine("Testing that comparisons between floats return bools"); + // Testing that comparisons between floats return bools ValueFloatTestClass29.testMethod(); } [TestMethod] public void ValueFloat30_Test() { - OutputHelper.WriteLine("Testing float and double .epsilon values"); + // Testing float and double .epsilon values ValueFloatTestClass30.testMethod(); } diff --git a/Tests/NFUnitTestTypes/UnitTestValueIntegralTests.cs b/Tests/NFUnitTestTypes/UnitTestValueIntegralTests.cs index 193b7cff..81bf0c72 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueIntegralTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueIntegralTests.cs @@ -20,424 +20,424 @@ class UnitTestValueIntegralTests [TestMethod] public void ValueIntegral01_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the +, - and ~ unary operators, of the operand is of type long, the"); - OutputHelper.WriteLine(" operation is performed using 64-bit precision, and the type of the result"); - OutputHelper.WriteLine(" is long. Otherwise, the operand is converted to int, and operation is"); - OutputHelper.WriteLine(" performed using 32-bit precision, and the type of the result is int."); + // Section 4.1 + // For the +, - and ~ unary operators, of the operand is of type long, the + // operation is performed using 64-bit precision, and the type of the result + // is long. Otherwise, the operand is converted to int, and operation is + // performed using 32-bit precision, and the type of the result is int. ValueIntegralTestClass01.testMethod(); } [TestMethod] public void ValueIntegral05_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the +, - and ~ unary operators, of the operand is of type long, the"); - OutputHelper.WriteLine(" operation is performed using 64-bit precision, and the type of the result"); - OutputHelper.WriteLine(" is long. Otherwise, the operand is converted to int, and operation is"); - OutputHelper.WriteLine(" performed using 32-bit precision, and the type of the result is int."); + // Section 4.1 + // For the +, - and ~ unary operators, of the operand is of type long, the + // operation is performed using 64-bit precision, and the type of the result + // is long. Otherwise, the operand is converted to int, and operation is + // performed using 32-bit precision, and the type of the result is int. ValueIntegralTestClass05.testMethod(); } [TestMethod] public void ValueIntegral09_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the +, - and ~ unary operators, of the operand is of type long, the"); - OutputHelper.WriteLine(" operation is performed using 64-bit precision, and the type of the result"); - OutputHelper.WriteLine(" is long. Otherwise, the operand is converted to int, and operation is"); - OutputHelper.WriteLine(" performed using 32-bit precision, and the type of the result is int."); + // Section 4.1 + // For the +, - and ~ unary operators, of the operand is of type long, the + // operation is performed using 64-bit precision, and the type of the result + // is long. Otherwise, the operand is converted to int, and operation is + // performed using 32-bit precision, and the type of the result is int. ValueIntegralTestClass09.testMethod(); } [TestMethod] public void ValueIntegral13_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass13.testMethod(); } [TestMethod] public void ValueIntegral14_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass14.testMethod(); } [TestMethod] public void ValueIntegral15_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass15.testMethod(); } [TestMethod] public void ValueIntegral16_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass16.testMethod(); } [TestMethod] public void ValueIntegral17_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass17.testMethod(); } [TestMethod] public void ValueIntegral18_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass18.testMethod(); } [TestMethod] public void ValueIntegral19_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass19.testMethod(); } [TestMethod] public void ValueIntegral20_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass20.testMethod(); } [TestMethod] public void ValueIntegral21_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass21.testMethod(); } [TestMethod] public void ValueIntegral22_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass22.testMethod(); } [TestMethod] public void ValueIntegral23_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass23.testMethod(); } [TestMethod] public void ValueIntegral24_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass24.testMethod(); } [TestMethod] public void ValueIntegral25_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass25.testMethod(); } [TestMethod] public void ValueIntegral26_Test() { - OutputHelper.WriteLine(" For the binary operators other than shift, if at least one"); - OutputHelper.WriteLine(" operand is of type long, then both operands are converted to long, the operation"); - OutputHelper.WriteLine(" is performed using 64-bit precision, and the type of the result is long or bool. "); - OutputHelper.WriteLine(" Otherwise, both operands are converted to int, the operation is performed using "); - OutputHelper.WriteLine(" 32-bit precision, and the type of the result is int or bool."); + // For the binary operators other than shift, if at least one + // operand is of type long, then both operands are converted to long, the operation + // is performed using 64-bit precision, and the type of the result is long or bool. + // Otherwise, both operands are converted to int, the operation is performed using + // 32-bit precision, and the type of the result is int or bool. ValueIntegralTestClass26.testMethod(); } [TestMethod] public void ValueIntegral27_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the shift operators, if the left-hand operand is of type long,"); - OutputHelper.WriteLine(" the operation is performed using 64-bit precision, and the type of the result"); - OutputHelper.WriteLine(" is long. Otherwise, the left hand-operand is converted to int, the operation is "); - OutputHelper.WriteLine(" performed using 32-bit precision, and the type of the result is int."); + // Section 4.1 + // For the shift operators, if the left-hand operand is of type long, + // the operation is performed using 64-bit precision, and the type of the result + // is long. Otherwise, the left hand-operand is converted to int, the operation is + // performed using 32-bit precision, and the type of the result is int. ValueIntegralTestClass27.testMethod(); } [TestMethod] public void ValueIntegral28_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the shift operators, if the left-hand operand is of type long,"); - OutputHelper.WriteLine(" the operation is performed using 64-bit precision, and the type of the result"); - OutputHelper.WriteLine(" is long. Otherwise, the left hand-operand is converted to int, the operation is "); - OutputHelper.WriteLine(" performed using 32-bit precision, and the type of the result is int."); + // Section 4.1 + // For the shift operators, if the left-hand operand is of type long, + // the operation is performed using 64-bit precision, and the type of the result + // is long. Otherwise, the left hand-operand is converted to int, the operation is + // performed using 32-bit precision, and the type of the result is int. ValueIntegralTestClass28.testMethod(); } [TestMethod] public void ValueIntegral38_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" Constants of the char type must be written as character-literals."); - OutputHelper.WriteLine(" Character constants can only be written as integer-literals"); - OutputHelper.WriteLine(" in combination with a cast. For example, (char)10 is the same as"); - OutputHelper.WriteLine(" '\x000A'."); + // Section 4.1 + // Constants of the char type must be written as character-literals. + // Character constants can only be written as integer-literals + // in combination with a cast. For example, (char)10 is the same as + // '\x000A'. ValueIntegralTestClass38.testMethod(); } [TestMethod] public void ValueIntegral39_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the unary + and ~ operators, the operand is converted"); - OutputHelper.WriteLine(" to type T, where T is the first of int, uint, long, and"); - OutputHelper.WriteLine(" ulong that can fully represent all possible values of the"); - OutputHelper.WriteLine(" operand. The operation is then performed using the precision "); - OutputHelper.WriteLine(" of type T, and the type of the result is T."); + // Section 4.1 + // For the unary + and ~ operators, the operand is converted + // to type T, where T is the first of int, uint, long, and + // ulong that can fully represent all possible values of the + // operand. The operation is then performed using the precision + // of type T, and the type of the result is T. ValueIntegralTestClass39.testMethod(); } [TestMethod] public void ValueIntegral42_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the unary + and ~ operators, the operand is converted"); - OutputHelper.WriteLine(" to type T, where T is the first of int, uint, long, and"); - OutputHelper.WriteLine(" ulong that can fully represent all possible values of the"); - OutputHelper.WriteLine(" operand. The operation is then performed using the precision "); - OutputHelper.WriteLine(" of type T, and the type of the result is T."); + // Section 4.1 + // For the unary + and ~ operators, the operand is converted + // to type T, where T is the first of int, uint, long, and + // ulong that can fully represent all possible values of the + // operand. The operation is then performed using the precision + // of type T, and the type of the result is T. ValueIntegralTestClass42.testMethod(); } [TestMethod] public void ValueIntegral45_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the unary - operator, the operand is converted"); - OutputHelper.WriteLine(" to type T, where T is the first of int and long that "); - OutputHelper.WriteLine(" can fully represent all possible values of the "); - OutputHelper.WriteLine(" operand. The operation is then performed using the"); - OutputHelper.WriteLine(" precision of type T, and the type of the result is T."); - OutputHelper.WriteLine(" The unary - operator cannot be applied to operands of"); - OutputHelper.WriteLine(" type ulong."); + // Section 4.1 + // For the unary - operator, the operand is converted + // to type T, where T is the first of int and long that + // can fully represent all possible values of the + // operand. The operation is then performed using the + // precision of type T, and the type of the result is T. + // The unary - operator cannot be applied to operands of + // type ulong. ValueIntegralTestClass45.testMethod(); } [TestMethod] public void ValueIntegral49_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass49.testMethod(); } [TestMethod] public void ValueIntegral50_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass50.testMethod(); } [TestMethod] public void ValueIntegral51_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass51.testMethod(); } [TestMethod] public void ValueIntegral52_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass52.testMethod(); } [TestMethod] public void ValueIntegral53_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass53.testMethod(); } [TestMethod] public void ValueIntegral54_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass54.testMethod(); } [TestMethod] public void ValueIntegral55_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass55.testMethod(); } [TestMethod] public void ValueIntegral56_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass56.testMethod(); } [TestMethod] public void ValueIntegral57_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass57.testMethod(); } [TestMethod] public void ValueIntegral58_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass58.testMethod(); } [TestMethod] public void ValueIntegral59_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass59.testMethod(); } [TestMethod] public void ValueIntegral60_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass60.testMethod(); } [TestMethod] public void ValueIntegral61_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass61.testMethod(); } [TestMethod] public void ValueIntegral62_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary operators except shift, the operands"); - OutputHelper.WriteLine(" are converted to type T, where T is the first of int, uint, long, and ulong"); - OutputHelper.WriteLine(" that can fully represent all possible values of each operand. The operation"); - OutputHelper.WriteLine(" is then performed using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" is T (or bool for relational operators)."); + // Section 4.1 + // For the binary operators except shift, the operands + // are converted to type T, where T is the first of int, uint, long, and ulong + // that can fully represent all possible values of each operand. The operation + // is then performed using the precision of type T, and the type of the result + // is T (or bool for relational operators). ValueIntegralTestClass62.testMethod(); } [TestMethod] public void ValueIntegral63_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary shift operators, the left operand"); - OutputHelper.WriteLine(" is converted to type T, where T is the first of int,"); - OutputHelper.WriteLine(" uint, long, and ulong that can fully represent all possible"); - OutputHelper.WriteLine(" values of the operand. The operation is then performed"); - OutputHelper.WriteLine(" using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" T."); + // Section 4.1 + // For the binary shift operators, the left operand + // is converted to type T, where T is the first of int, + // uint, long, and ulong that can fully represent all possible + // values of the operand. The operation is then performed + // using the precision of type T, and the type of the result + // T. ValueIntegralTestClass63.testMethod(); } [TestMethod] public void ValueIntegral64_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" For the binary shift operators, the left operand"); - OutputHelper.WriteLine(" is converted to type T, where T is the first of int,"); - OutputHelper.WriteLine(" uint, long, and ulong that can fully represent all possible"); - OutputHelper.WriteLine(" values of the operand. The operation is then performed"); - OutputHelper.WriteLine(" using the precision of type T, and the type of the result"); - OutputHelper.WriteLine(" T."); + // Section 4.1 + // For the binary shift operators, the left operand + // is converted to type T, where T is the first of int, + // uint, long, and ulong that can fully represent all possible + // values of the operand. The operation is then performed + // using the precision of type T, and the type of the result + // T. ValueIntegralTestClass64.testMethod(); } [TestMethod] public void ValueIntegral70_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" Constants of the char type must be written as character-literals."); - OutputHelper.WriteLine(" Character constants can only be written as integer-literals"); - OutputHelper.WriteLine(" in compination with a cast. For example, (char)10 is the same "); - OutputHelper.WriteLine(" as '\x000a'."); + // Section 4.1 + // Constants of the char type must be written as character-literals. + // Character constants can only be written as integer-literals + // in compination with a cast. For example, (char)10 is the same + // as '\x000a'. ValueIntegralTestClass70.testMethod(); } diff --git a/Tests/NFUnitTestTypes/UnitTestValueSimpleTests.cs b/Tests/NFUnitTestTypes/UnitTestValueSimpleTests.cs index f191a4c4..767faa0d 100644 --- a/Tests/NFUnitTestTypes/UnitTestValueSimpleTests.cs +++ b/Tests/NFUnitTestTypes/UnitTestValueSimpleTests.cs @@ -16,95 +16,95 @@ class UnitTestValueSimpleTests [TestMethod] public void ValueSimple01_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" byte is an alias for System.Byte"); + // Section 4.1 + // byte is an alias for System.Byte ValueSimpleTestClass01.testMethod(); } [TestMethod] public void ValueSimple02_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" char is an alias for System.Char"); + // Section 4.1 + // char is an alias for System.Char ValueSimpleTestClass02.testMethod(); } [TestMethod] public void ValueSimple03_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" short is an alias for System.Int16"); + // Section 4.1 + // short is an alias for System.Int16 ValueSimpleTestClass03.testMethod(); } [TestMethod] public void ValueSimple04_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" int is an alias for System.Int32"); + // Section 4.1 + // int is an alias for System.Int32 ValueSimpleTestClass04.testMethod(); } [TestMethod] public void ValueSimple05_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" long is an alias for System.Int64"); + // Section 4.1 + // long is an alias for System.Int64 ValueSimpleTestClass05.testMethod(); } [TestMethod] public void ValueSimple06_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" float is an alias for System.Single"); + // Section 4.1 + // float is an alias for System.Single ValueSimpleTestClass06.testMethod(); } [TestMethod] public void ValueSimple07_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" double is an alias for System.Double"); + // Section 4.1 + // double is an alias for System.Double ValueSimpleTestClass07.testMethod(); } [TestMethod] public void ValueSimple09_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" bool is an alias for System.Boolean"); + // Section 4.1 + // bool is an alias for System.Boolean ValueSimpleTestClass09.testMethod(); } [TestMethod] public void ValueSimple11_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" A simple type and the structure type it aliases are completely indistinguishable."); - OutputHelper.WriteLine(" In other words, writing the reserved work byte is exactly the same as writing "); - OutputHelper.WriteLine(" System.Byte, and writing System.Int32 is exactly the same as writing the reserved"); - OutputHelper.WriteLine(" word int."); + // Section 4.1 + // A simple type and the structure type it aliases are completely indistinguishable. + // In other words, writing the reserved work byte is exactly the same as writing + // System.Byte, and writing System.Int32 is exactly the same as writing the reserved + // word int. ValueSimpleTestClass11.testMethod(); } [TestMethod] public void ValueSimple12_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" Because a simple type aliases a struct type, every simple type has members."); + // Section 4.1 + // Because a simple type aliases a struct type, every simple type has members. ValueSimpleTestClass12.testMethod(); } [TestMethod] public void ValueSimple13_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" sbyte is an alias for System.SByte"); + // Section 4.1 + // sbyte is an alias for System.SByte ValueSimpleTestClass13.testMethod(); } [TestMethod] public void ValueSimple14_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" ushort is an alias for System.UInt16"); + // Section 4.1 + // ushort is an alias for System.UInt16 ValueSimpleTestClass14.testMethod(); } [TestMethod] public void ValueSimple15_Test() { - OutputHelper.WriteLine(" Section 4.1"); - OutputHelper.WriteLine(" uint is an alias for System.UInt32"); + // Section 4.1 + // uint is an alias for System.UInt32 ValueSimpleTestClass15.testMethod(); } diff --git a/Tests/NFUnitTestVariables/CategoryTests.cs b/Tests/NFUnitTestVariables/CategoryTests.cs index c1082348..3e8c7e25 100644 --- a/Tests/NFUnitTestVariables/CategoryTests.cs +++ b/Tests/NFUnitTestVariables/CategoryTests.cs @@ -15,14 +15,14 @@ public class CategoryTests [Setup] public void Initialize() { - OutputHelper.WriteLine("Adding set up for the tests."); + // Adding set up for the tests. // Add your functionality here. } [Cleanup] public void CleanUp() { - OutputHelper.WriteLine("Cleaning up after the tests"); + // Cleaning up after the tests } //Categories Test methods @@ -34,201 +34,201 @@ public void CleanUp() [TestMethod] public void Categories_static01_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static01.testMethod(); } [TestMethod] public void Categories_static02_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static02.testMethod(); } [TestMethod] public void Categories_static03_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static03.testMethod(); } [TestMethod] public void Categories_static04_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static04.testMethod(); } [TestMethod] public void Categories_static05_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static05.testMethod(); } [TestMethod] public void Categories_static06_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static06.testMethod(); } [TestMethod] public void Categories_static07_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static07.testMethod(); } [TestMethod] public void Categories_static09_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static09.testMethod(); } [TestMethod] public void Categories_static11_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static11.testMethod(); } [TestMethod] public void Categories_static12_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static12.testMethod(); } [TestMethod] public void Categories_static13_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static13.testMethod(); } [TestMethod] public void Categories_static14_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static14.testMethod(); } [TestMethod] public void Categories_static15_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static15.testMethod(); } [TestMethod] public void Categories_static16_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static16.testMethod(); } [TestMethod] public void Categories_static17_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine(" Categories_TestClass_?_A field declared with the static modifier is called a"); - OutputHelper.WriteLine("static variable. Categories_TestClass_?_A static variable comes into existence"); - OutputHelper.WriteLine("when the type in which it is declared is loaded, and "); - OutputHelper.WriteLine("ceases to exist when the type in which it is declared"); - OutputHelper.WriteLine("is unloaded."); + // Section 5.1.1 + // Categories_TestClass_?_A field declared with the static modifier is called a + // static variable. Categories_TestClass_?_A static variable comes into existence + // when the type in which it is declared is loaded, and + // ceases to exist when the type in which it is declared + // is unloaded. Categories_TestClass_static17.testMethod(); } [TestMethod] public void Categories_static18_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine("The initial value of a static variable is the default value"); - OutputHelper.WriteLine("of the variable's type."); + // Section 5.1.1 + // The initial value of a static variable is the default value + // of the variable's type. Categories_TestClass_static18.testMethod(); } [TestMethod] public void Categories_static19_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine("The initial value of a static variable is the default value"); - OutputHelper.WriteLine("of the variable's type."); + // Section 5.1.1 + // The initial value of a static variable is the default value + // of the variable's type. Categories_TestClass_static19.testMethod(); } [TestMethod] public void Categories_static20_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine("The initial value of a static variable is the default value"); - OutputHelper.WriteLine("of the variable's type."); + // Section 5.1.1 + // The initial value of a static variable is the default value + // of the variable's type. Categories_TestClass_static20.testMethod(); } /* [TestMethod] public void Categories_static21_Test() { - OutputHelper.WriteLine("Section 5"); + // Section 5 Categories_TestClass_static21.testMethod()) { return MFTestResults.Pass; @@ -239,340 +239,340 @@ public void Categories_static21_Test() [TestMethod] public void Categories_inst018_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst018.testMethod(); } [TestMethod] public void Categories_inst019_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst019.testMethod(); } [TestMethod] public void Categories_inst020_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst020.testMethod(); } [TestMethod] public void Categories_inst021_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst021.testMethod(); } [TestMethod] public void Categories_inst022_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst022.testMethod(); } [TestMethod] public void Categories_inst023_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst023.testMethod(); } [TestMethod] public void Categories_inst024_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst024.testMethod(); } [TestMethod] public void Categories_inst026_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst026.testMethod(); } [TestMethod] public void Categories_inst028_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst028.testMethod(); } [TestMethod] public void Categories_inst029_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst029.testMethod(); } [TestMethod] public void Categories_inst030_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst030.testMethod(); } [TestMethod] public void Categories_inst031_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst031.testMethod(); } [TestMethod] public void Categories_inst032_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst032.testMethod(); } [TestMethod] public void Categories_inst033_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst033.testMethod(); } [TestMethod] public void Categories_inst034_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a class comes into existence when "); - OutputHelper.WriteLine("a new instance of that class is created, and ceases to exist"); - OutputHelper.WriteLine("when there are no references to that instance and the finalizer"); - OutputHelper.WriteLine("of the instance has executed."); + // Section 5.1.2 + // An instance variable of a class comes into existence when + // a new instance of that class is created, and ceases to exist + // when there are no references to that instance and the finalizer + // of the instance has executed. Categories_TestClass_inst034.testMethod(); } [TestMethod] public void Categories_inst035_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine("The initial value of an instance variable is the default value"); - OutputHelper.WriteLine("of the variable's type."); + // Section 5.1.1 + // The initial value of an instance variable is the default value + // of the variable's type. Categories_TestClass_inst035.testMethod(); } [TestMethod] public void Categories_inst036_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine("The initial value of an instance variable is the default value"); - OutputHelper.WriteLine("of the variable's type."); + // Section 5.1.1 + // The initial value of an instance variable is the default value + // of the variable's type. Categories_TestClass_inst036.testMethod(); } [TestMethod] public void Categories_inst037_Test() { - OutputHelper.WriteLine("Section 5.1.1"); - OutputHelper.WriteLine("The initial value of an instance variable is the default value"); - OutputHelper.WriteLine("of the variable's type."); + // Section 5.1.1 + // The initial value of an instance variable is the default value + // of the variable's type. Categories_TestClass_inst037.testMethod(); } [TestMethod] public void Categories_inst038_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst038.testMethod(); } [TestMethod] public void Categories_inst039_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst039.testMethod(); } [TestMethod] public void Categories_inst040_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst040.testMethod(); } [TestMethod] public void Categories_inst041_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst041.testMethod(); } [TestMethod] public void Categories_inst042_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst042.testMethod(); } [TestMethod] public void Categories_inst043_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst043.testMethod(); } [TestMethod] public void Categories_inst044_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst044.testMethod(); } [TestMethod] public void Categories_inst046_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst046.testMethod(); } [TestMethod] public void Categories_inst048_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst048.testMethod(); } [TestMethod] public void Categories_inst049_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst049.testMethod(); } [TestMethod] public void Categories_inst050_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst050.testMethod(); } [TestMethod] public void Categories_inst051_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst051.testMethod(); } [TestMethod] public void Categories_inst052_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst052.testMethod(); } [TestMethod] public void Categories_inst053_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst053.testMethod(); } [TestMethod] public void Categories_inst054_Test() { - OutputHelper.WriteLine("Section 5.1.2"); - OutputHelper.WriteLine("An instance variable of a struct has exactly the"); - OutputHelper.WriteLine("same lifetime as the struct variable to which it"); - OutputHelper.WriteLine("belongs. In other words, when a variable of a "); - OutputHelper.WriteLine("struct type comes into existence or ceases to "); - OutputHelper.WriteLine("exist, so do the instance variables of the struct."); + // Section 5.1.2 + // An instance variable of a struct has exactly the + // same lifetime as the struct variable to which it + // belongs. In other words, when a variable of a + // struct type comes into existence or ceases to + // exist, so do the instance variables of the struct. Categories_TestClass_inst054.testMethod(); } diff --git a/Tests/NFUnitTestVariables/VariableTests.cs b/Tests/NFUnitTestVariables/VariableTests.cs index a2cb12b0..6d810af1 100644 --- a/Tests/NFUnitTestVariables/VariableTests.cs +++ b/Tests/NFUnitTestVariables/VariableTests.cs @@ -16,13 +16,13 @@ class VariableTests [Setup] public void InitializeVariables() { - OutputHelper.WriteLine("Adding set up for the tests"); + // Adding set up for the tests } [Cleanup] public void CleanUpVariables() { - OutputHelper.WriteLine("Cleaning up after the tests"); + // Cleaning up after the tests } //Variables Test methods @@ -33,161 +33,161 @@ public void CleanUpVariables() [TestMethod] public void Variables_S5_range_byte_0_Test() { - OutputHelper.WriteLine("S5_range_byte_0.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("byte"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 255Y"); + // S5_range_byte_0.sc + // This is a variable range test: + // byte + // CompilesOK: 1 + // Value: 255Y Variables_TestClass_S5_range_byte_0.testMethod(); } [TestMethod] public void Variables_S5_range_byte_1_Test() { - OutputHelper.WriteLine("S5_range_byte_1.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("byte"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 0Y"); + // S5_range_byte_1.sc + // This is a variable range test: + // byte + // CompilesOK: 1 + // Value: 0Y Variables_TestClass_S5_range_byte_1.testMethod(); } [TestMethod] public void Variables_S5_range_char_0_Test() { - OutputHelper.WriteLine("S5_range_char_0.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("char"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 65535"); + // S5_range_char_0.sc + // This is a variable range test: + // char + // CompilesOK: 1 + // Value: 65535 Variables_TestClass_S5_range_char_0.testMethod(); } [TestMethod] public void Variables_S5_range_char_1_Test() { - OutputHelper.WriteLine("S5_range_char_1.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("char"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 0"); + // S5_range_char_1.sc + // This is a variable range test: + // char + // CompilesOK: 1 + // Value: 0 Variables_TestClass_S5_range_char_1.testMethod(); } [TestMethod] public void Variables_S5_range_double_0_Test() { - OutputHelper.WriteLine("S5_range_double_0.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("double"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 1.7e308d"); + // S5_range_double_0.sc + // This is a variable range test: + // double + // CompilesOK: 1 + // Value: 1.7e308d Variables_TestClass_S5_range_double_0.testMethod(); } [TestMethod] public void Variables_S5_range_double_1_Test() { - OutputHelper.WriteLine("S5_range_double_1.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("double"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: -1.7e308d"); + // S5_range_double_1.sc + // This is a variable range test: + // double + // CompilesOK: 1 + // Value: -1.7e308d Variables_TestClass_S5_range_double_1.testMethod(); } [TestMethod] public void Variables_S5_range_float_0_Test() { - OutputHelper.WriteLine("S5_range_float_0.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("float"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 3.4e38F"); + // S5_range_float_0.sc + // This is a variable range test: + // float + // CompilesOK: 1 + // Value: 3.4e38F Variables_TestClass_S5_range_float_0.testMethod(); } [TestMethod] public void Variables_S5_range_float_1_Test() { - OutputHelper.WriteLine("S5_range_float_1.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("float"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: -3.4e38F"); + // S5_range_float_1.sc + // This is a variable range test: + // float + // CompilesOK: 1 + // Value: -3.4e38F Variables_TestClass_S5_range_float_1.testMethod(); } [TestMethod] public void Variables_S5_range_int_0_Test() { - OutputHelper.WriteLine("S5_range_int_0.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("int"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 2147483647"); + // S5_range_int_0.sc + // This is a variable range test: + // int + // CompilesOK: 1 + // Value: 2147483647 Variables_TestClass_S5_range_int_0.testMethod(); } [TestMethod] public void Variables_S5_range_int_1_Test() { - OutputHelper.WriteLine("S5_range_int_1.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("int"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: -2147483647"); + // S5_range_int_1.sc + // This is a variable range test: + // int + // CompilesOK: 1 + // Value: -2147483647 Variables_TestClass_S5_range_int_1.testMethod(); } [TestMethod] public void Variables_S5_range_int_3_Test() { - OutputHelper.WriteLine("S5_range_int_3.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("int"); - OutputHelper.WriteLine(" CompilesOK: 0"); - OutputHelper.WriteLine(" Value: -2147483648"); + // S5_range_int_3.sc + // This is a variable range test: + // int + // CompilesOK: 0 + // Value: -2147483648 Variables_TestClass_S5_range_int_3.testMethod(); } [TestMethod] public void Variables_S5_range_long_0_Test() { - OutputHelper.WriteLine("S5_range_long_0.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("long"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 9223372036854775807L"); + // S5_range_long_0.sc + // This is a variable range test: + // long + // CompilesOK: 1 + // Value: 9223372036854775807L Variables_TestClass_S5_range_long_0.testMethod(); } [TestMethod] public void Variables_S5_range_long_1_Test() { - OutputHelper.WriteLine("S5_range_long_1.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("long"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: -9223372036854775807L"); + // S5_range_long_1.sc + // This is a variable range test: + // long + // CompilesOK: 1 + // Value: -9223372036854775807L Variables_TestClass_S5_range_long_1.testMethod(); } [TestMethod] public void Variables_S5_range_long_3_Test() { - OutputHelper.WriteLine("S5_range_long_3.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("long"); - OutputHelper.WriteLine(" CompilesOK: 0"); - OutputHelper.WriteLine(" Value: -9223372036854775808L"); + // S5_range_long_3.sc + // This is a variable range test: + // long + // CompilesOK: 0 + // Value: -9223372036854775808L Variables_TestClass_S5_range_long_3.testMethod(); } [TestMethod] public void Variables_S5_range_short_0_Test() { - OutputHelper.WriteLine("S5_range_short_0.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("short"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: 32767S"); + // S5_range_short_0.sc + // This is a variable range test: + // short + // CompilesOK: 1 + // Value: 32767S Variables_TestClass_S5_range_short_0.testMethod(); } [TestMethod] public void Variables_S5_range_short_1_Test() { - OutputHelper.WriteLine("S5_range_short_1.sc"); - OutputHelper.WriteLine("This is a variable range test:"); - OutputHelper.WriteLine("short"); - OutputHelper.WriteLine(" CompilesOK: 1"); - OutputHelper.WriteLine(" Value: -32767S"); + // S5_range_short_1.sc + // This is a variable range test: + // short + // CompilesOK: 1 + // Value: -32767S Variables_TestClass_S5_range_short_1.testMethod(); } @@ -195,7 +195,7 @@ public void Variables_S5_range_short_1_Test() public static void Variables_EqualTest_00() { { - OutputHelper.WriteLine("Test Equal with int32 variables"); + // Test Equal with int32 variables int one = 1; int two = -2; @@ -209,7 +209,7 @@ public static void Variables_EqualTest_00() } { - OutputHelper.WriteLine("Test Equal with uint32 variables"); + // Test Equal with uint32 variables uint one = 1; uint two = 2; @@ -223,7 +223,7 @@ public static void Variables_EqualTest_00() } { - OutputHelper.WriteLine("Test Equal with float variables"); + // Test Equal with float variables float one = 1.0011223f; float two = -2.445588f; @@ -237,7 +237,7 @@ public static void Variables_EqualTest_00() } { - OutputHelper.WriteLine("Test Equal with double variables"); + // Test Equal with double variables double one = 1.4444; double two = -2.8888; diff --git a/Tests/TestFramework/TestFramework.nfproj b/Tests/TestFramework/TestFramework.nfproj index 798bafed..22b7869c 100644 --- a/Tests/TestFramework/TestFramework.nfproj +++ b/Tests/TestFramework/TestFramework.nfproj @@ -30,10 +30,15 @@ - + + + + + + diff --git a/nanoFramework.TestFramework b/nanoFramework.TestFramework index 71ca2702..fb7f57a9 160000 --- a/nanoFramework.TestFramework +++ b/nanoFramework.TestFramework @@ -1 +1 @@ -Subproject commit 71ca270266d753fbb6628f716415fef3acde6d95 +Subproject commit fb7f57a9cc20dd0fa46645b8f3c45c9d68ce6fa2