JDK 9 RFR of JDK-8173609: Elements.printElements needs to support modules
B. Blaser
bsrbnd at gmail.com
Tue Jan 31 12:59:02 UTC 2017
Hi Joe,
2017-01-31 0:15 GMT+01:00 Joseph D. Darcy <joe.darcy at oracle.com>:
> Hi Bernard,
>
> Thanks for patch for the test.
>
> We've largely abandoned the bug number based scheme for categorizing tests;
> it became cumbersome to find the tests we were looking for as the set of
> tests grew.
>
> Since the functionality in question is related to the annotation processing
> implementation in javac, I think a location under
> test/tools/javac/processing/model/util would be more appropriate.
>
> Also for a source-based test, it would be more complete to also examine doc
> comments and annotations. If you make those amendments, I can push the test
> as follow-up work (since I've already pushed the code change).
>
> Thanks,
>
> -Joe
Thanks for your comments.
Please, find next the updated test.
Bernard
diff --git a/test/tools/javac/processing/model/util/printing/module-info.java
b/test/tools/javac/processing/model/util/printing/module-info.java
new file mode 100644
--- /dev/null
+++ b/test/tools/javac/processing/model/util/printing/module-info.java
@@ -0,0 +1,18 @@
+/*
+ * @test
+ * @bug 8173609
+ * @summary printing of modules
+ * @compile/ref=module-info.out -Xprint p/P.java module-info.java
+ */
+
+/**
+ * Printing of modules
+ */
+ at Deprecated
+module printing {
+ requires static transitive java.base;
+ exports p to m.m1, m.m2;
+ opens p to m.m1, m.m2;
+ uses p.P;
+ provides p.P with p.P.P1, p.P.P2;
+}
diff --git a/test/tools/javac/processing/model/util/printing/module-info.out
b/test/tools/javac/processing/model/util/printing/module-info.out
new file mode 100644
--- /dev/null
+++ b/test/tools/javac/processing/model/util/printing/module-info.out
@@ -0,0 +1,27 @@
+package p;
+
+public class P {
+
+ public static class P1 extends p.P {
+
+ public P1();
+ }
+
+ public static class P2 extends p.P {
+
+ public P2();
+ }
+
+ public P();
+}
+/**
+ * Printing of modules
+ */
+ at java.lang.Deprecated
+module printing {
+ requires static transitive java.base;
+ exports p to m.m1, m.m2;
+ opens p to m.m1, m.m2;
+ uses p.P;
+ provides p.P with p.P.P1, p.P.P2;
+}
diff --git a/test/tools/javac/processing/model/util/printing/p/P.java
b/test/tools/javac/processing/model/util/printing/p/P.java
new file mode 100644
--- /dev/null
+++ b/test/tools/javac/processing/model/util/printing/p/P.java
@@ -0,0 +1,6 @@
+package p;
+
+public class P {
+ public static class P1 extends P {}
+ public static class P2 extends P {}
+}
More information about the compiler-dev
mailing list