コード例 #1
0
 /** Add tests for the replaceEntry method to the overall test suite. */
 private void addTestSuiteFor$TestReplaceEntry(junit.framework.TestSuite overallTestSuite$) {
   junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("replaceEntry");
   try {
     org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter =
         new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator(
             this.vorg_jmlspecs_samples_list_list3_E_OneWayListIter("replaceEntry", 1));
     this.check_has_data(
         receivers$iter,
         "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list3_E_OneWayListIter(\"replaceEntry\", 1))");
     while (!receivers$iter.atEnd()) {
       org.jmlspecs.jmlunit.strategies.IndefiniteIterator vjava_lang_Object$1$iter =
           this.vjava_lang_ObjectIter("replaceEntry", 0);
       this.check_has_data(
           vjava_lang_Object$1$iter, "this.vjava_lang_ObjectIter(\"replaceEntry\", 0)");
       while (!vjava_lang_Object$1$iter.atEnd()) {
         final org.jmlspecs.samples.list.list3.E_OneWayList receiver$ =
             (org.jmlspecs.samples.list.list3.E_OneWayList) receivers$iter.get();
         final java.lang.Object arg1 = (java.lang.Object) vjava_lang_Object$1$iter.get();
         methodTests$.addTest(new TestReplaceEntry(receiver$, arg1));
         vjava_lang_Object$1$iter.advance();
       }
       receivers$iter.advance();
     }
   } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
     // methodTests$ doesn't want more tests
   }
   overallTestSuite$.addTest(methodTests$);
 }
コード例 #2
0
 /** Add tests for the unconnected method to the overall test suite. */
 private void addTestSuiteFor$TestUnconnected(junit.framework.TestSuite overallTestSuite$) {
   junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("unconnected");
   try {
     org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter =
         new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator(
             this.vorg_jmlspecs_samples_digraph_SearchableDigraphIter("unconnected", 1));
     this.check_has_data(
         receivers$iter,
         "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_digraph_SearchableDigraphIter(\"unconnected\", 1))");
     while (!receivers$iter.atEnd()) {
       org.jmlspecs.jmlunit.strategies.IndefiniteIterator
           vorg_jmlspecs_samples_digraph_NodeType$1$iter =
               this.vorg_jmlspecs_samples_digraph_NodeTypeIter("unconnected", 0);
       this.check_has_data(
           vorg_jmlspecs_samples_digraph_NodeType$1$iter,
           "this.vorg_jmlspecs_samples_digraph_NodeTypeIter(\"unconnected\", 0)");
       while (!vorg_jmlspecs_samples_digraph_NodeType$1$iter.atEnd()) {
         final org.jmlspecs.samples.digraph.SearchableDigraph receiver$ =
             (org.jmlspecs.samples.digraph.SearchableDigraph) receivers$iter.get();
         final org.jmlspecs.samples.digraph.NodeType arg1 =
             (org.jmlspecs.samples.digraph.NodeType)
                 vorg_jmlspecs_samples_digraph_NodeType$1$iter.get();
         methodTests$.addTest(new TestUnconnected(receiver$, arg1));
         vorg_jmlspecs_samples_digraph_NodeType$1$iter.advance();
       }
       receivers$iter.advance();
     }
   } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
     // methodTests$ doesn't want more tests
   }
   overallTestSuite$.addTest(methodTests$);
 }
コード例 #3
0
 /** Check that the iterator is non-null and not empty. */
 private void check_has_data(
     org.jmlspecs.jmlunit.strategies.IndefiniteIterator iter, String call) {
   if (iter == null) {
     junit.framework.Assert.fail(call + " returned null");
   }
   if (iter.atEnd()) {
     junit.framework.Assert.fail(call + " returned an empty iterator");
   }
 }
コード例 #4
0
 /** Add tests for the getEntry method to the overall test suite. */
 private void addTestSuiteFor$TestGetEntry(junit.framework.TestSuite overallTestSuite$) {
   junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("getEntry");
   try {
     org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter =
         new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator(
             this.vorg_jmlspecs_samples_list_list3_E_OneWayListIter("getEntry", 0));
     this.check_has_data(
         receivers$iter,
         "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list3_E_OneWayListIter(\"getEntry\", 0))");
     while (!receivers$iter.atEnd()) {
       final org.jmlspecs.samples.list.list3.E_OneWayList receiver$ =
           (org.jmlspecs.samples.list.list3.E_OneWayList) receivers$iter.get();
       methodTests$.addTest(new TestGetEntry(receiver$));
       receivers$iter.advance();
     }
   } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
     // methodTests$ doesn't want more tests
   }
   overallTestSuite$.addTest(methodTests$);
 }
コード例 #5
0
 /** Add tests for the toString method to the overall test suite. */
 private void addTestSuiteFor$TestToString(junit.framework.TestSuite overallTestSuite$) {
   junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("toString");
   try {
     org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter =
         new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator(
             this.vorg_jmlspecs_samples_digraph_SearchableDigraphIter("toString", 0));
     this.check_has_data(
         receivers$iter,
         "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_digraph_SearchableDigraphIter(\"toString\", 0))");
     while (!receivers$iter.atEnd()) {
       final org.jmlspecs.samples.digraph.SearchableDigraph receiver$ =
           (org.jmlspecs.samples.digraph.SearchableDigraph) receivers$iter.get();
       methodTests$.addTest(new TestToString(receiver$));
       receivers$iter.advance();
     }
   } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
     // methodTests$ doesn't want more tests
   }
   overallTestSuite$.addTest(methodTests$);
 }
 /** Add tests for the clone method to the overall test suite. */
 private void addTestSuiteFor$TestClone(junit.framework.TestSuite overallTestSuite$) {
   junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("clone");
   try {
     org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter =
         new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator(
             this.vorg_jmlspecs_jmlunit_strategies_CloneableObjectArrayAbstractIteratorIter(
                 "clone", 0));
     this.check_has_data(
         receivers$iter,
         "new NonNullIteratorDecorator(this.vorg_jmlspecs_jmlunit_strategies_CloneableObjectArrayAbstractIteratorIter(\"clone\", 0))");
     while (!receivers$iter.atEnd()) {
       final org.jmlspecs.jmlunit.strategies.CloneableObjectArrayAbstractIterator receiver$ =
           (org.jmlspecs.jmlunit.strategies.CloneableObjectArrayAbstractIterator)
               receivers$iter.get();
       methodTests$.addTest(new TestClone(receiver$));
       receivers$iter.advance();
     }
   } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) {
     // methodTests$ doesn't want more tests
   }
   overallTestSuite$.addTest(methodTests$);
 }