test/tools/javac/processing/model/util/filter/TestIterables.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -24,10 +24,12 @@
 /*
  * @test
  * @bug 6406164
  * @summary Test that ElementFilter iterable methods behave properly.
  * @author  Joseph D. Darcy
+ * @library ../../../../lib
+ * @build JavacTestingAbstractProcessor
  * @compile TestIterables.java
  * @compile -processor TestIterables -proc:only Foo1.java
  * @compile Foo1.java
  * @compile -processor TestIterables Foo1 TestIterables.java
  */

@@ -49,13 +51,12 @@
  * Verify that the {@code ElementFilter} methods taking iterables
  * behave correctly by comparing ExpectedElementCounts with actual
  * results.
  */
 @SupportedAnnotationTypes("ExpectedElementCounts")
-@ExpectedElementCounts(methods=3)
-public class TestIterables extends AbstractProcessor {
-
+@ExpectedElementCounts(methods=2)
+public class TestIterables extends JavacTestingAbstractProcessor {
     public boolean process(Set<? extends TypeElement> annotations,
                            RoundEnvironment roundEnv) {
         if (!roundEnv.processingOver()) {
             boolean error = false;
             int topLevelCount = 0;

@@ -116,12 +117,6 @@
         if (count1 != count2)
             throw new RuntimeException("Inconsistent counts from iterator.");
 
         return count1;
     }
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latest();
-    }
-
 }