8173798: Tests for printing modules
Reviewed-by: darcy
Contributed-by: bsrbnd@gmail.com
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/processing/model/util/printing/module-info.java Wed Feb 01 19:48:36 2017 -0800
@@ -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
+ */
+@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;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/processing/model/util/printing/module-info.out Wed Feb 01 19:48:36 2017 -0800
@@ -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
+ */
+@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;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/processing/model/util/printing/p/P.java Wed Feb 01 19:48:36 2017 -0800
@@ -0,0 +1,6 @@
+package p;
+
+public class P {
+ public static class P1 extends P {}
+ public static class P2 extends P {}
+}