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."); Assert.True(IndexersTestClass32.testMethod()); }
public static bool testMethod() { IndexersTestClass32 test = new IndexersTestClass32(); int i = 1; int j = 2; if ((test[i] == 1) && (test[i, j] == 3)) { return(true); } else { return(false); } }
public MFTestResults Indexers32_Test() { Log.Comment(" Section 10.8"); Log.Comment(" The formal parameter list of an indexer defines"); Log.Comment(" the signature of the indexer. Specifically, the"); Log.Comment(" signature of an indexer consists of the number and"); Log.Comment(" types of its formal parameters. The element type"); Log.Comment(" is not a part of an index signature, nor are the"); Log.Comment(" names of the formal parameters."); if (IndexersTestClass32.testMethod()) { return(MFTestResults.Pass); } return(MFTestResults.Fail); }
public static bool testMethod() { IndexersTestClass32 test = new IndexersTestClass32(); int i = 1; int j = 2; if ((test[i] == 1) && (test[i, j] == 3)) { return true; } else { return false; } }