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.");
     Assert.True(IndexersTestClass18.testMethod());
 }
示例#2
0
            public static bool testMethod()
            {
                IndexersTestClass18 test = new IndexersTestClass18();

                if (test[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] == 55)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
示例#3
0
 public MFTestResults Indexers18_Test()
 {
     Log.Comment(" Section 10.8");
     Log.Comment(" The formal-index-parameter-list specifies");
     Log.Comment(" the parameters of the indexer.  The formal");
     Log.Comment(" parameter list of an indexer corresponds");
     Log.Comment(" to that of a method, except that at least");
     Log.Comment(" one parameter must be specified, and that the");
     Log.Comment(" ref and out parameter modifiers are not");
     Log.Comment(" permitted.");
     if (IndexersTestClass18.testMethod())
     {
         return(MFTestResults.Pass);
     }
     return(MFTestResults.Fail);
 }
示例#4
0
 public static bool testMethod()
 {
     IndexersTestClass18 test = new IndexersTestClass18();
     if (test[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] == 55)
     {
         return true;
     }
     else
     {
         return false;
     }
 }