summaryrefslogtreecommitdiffstats
path: root/testing/testdata/figures-coverage
diff options
context:
space:
mode:
Diffstat (limited to 'testing/testdata/figures-coverage')
-rw-r--r--testing/testdata/figures-coverage/all.lst8
-rw-r--r--testing/testdata/figures-coverage/figures/Debug.java7
-rw-r--r--testing/testdata/figures-coverage/figures/Main.java56
-rw-r--r--testing/testdata/figures-coverage/figures/composites/Line.java6
-rw-r--r--testing/testdata/figures-coverage/figures/composites/Square.java6
5 files changed, 83 insertions, 0 deletions
diff --git a/testing/testdata/figures-coverage/all.lst b/testing/testdata/figures-coverage/all.lst
new file mode 100644
index 000000000..3879af0b1
--- /dev/null
+++ b/testing/testdata/figures-coverage/all.lst
@@ -0,0 +1,8 @@
+figures/Debug.java
+figures/Figure.java
+figures/FigureElement.java
+figures/Main.java
+figures/composites/Line.java
+figures/composites/Square.java
+figures/primitives/planar/Point.java
+figures/primitives/solid/SolidPoint.java
diff --git a/testing/testdata/figures-coverage/figures/Debug.java b/testing/testdata/figures-coverage/figures/Debug.java
new file mode 100644
index 000000000..01e895abc
--- /dev/null
+++ b/testing/testdata/figures-coverage/figures/Debug.java
@@ -0,0 +1,7 @@
+
+package figures;
+
+aspect Debug {
+
+}
+
diff --git a/testing/testdata/figures-coverage/figures/Main.java b/testing/testdata/figures-coverage/figures/Main.java
new file mode 100644
index 000000000..189f05cee
--- /dev/null
+++ b/testing/testdata/figures-coverage/figures/Main.java
@@ -0,0 +1,56 @@
+
+package figures;
+
+import figures.primitives.planar.Point;
+import figures.primitives.solid.SolidPoint;
+
+class Main {
+
+ private static Point startPoint;
+
+ public static void main(String[] args) {
+ try {
+ System.out.println("> starting...");
+
+ startPoint = makeStartPoint();
+ //startPoint.setX(3); new Point(0, 0);
+// SolidPoint sp1 = new SolidPoint(1, 3, 3);
+
+// sp1.setZ(1);
+// p1.incrXY(3, 3);
+ } catch (RuntimeException re) {
+ re.printStackTrace();
+ }
+ System.out.println("> finished.");
+ }
+
+ /** @deprecated use something else */
+ public static Point makeStartPoint() {
+ //return new Point(1, 2);
+ return null;
+ }
+
+ /** This should produce a deprecation warning with JDK > 1.2 */
+ static class TestGUI extends javax.swing.JFrame {
+ TestGUI() {
+ this.disable();
+ }
+ }
+
+ /** This should produce a porting-deprecation warning. */
+ //static pointcut mainExecution(): execution(void main(*));
+}
+
+privileged aspect Test {
+ pointcut testptct(): call(* *.*(..));
+
+ before(Point p, int newval): target(p) && set(int Point.xx) && args(newval) {
+ System.err.println("> new value of x is: " + p.x + ", setting to: " + newval);
+ }
+
+ before(int newValue): set(int Point.*) && args(newValue) {
+ if (newValue < 0) {
+ throw new IllegalArgumentException("too small");
+ }
+ }
+}
diff --git a/testing/testdata/figures-coverage/figures/composites/Line.java b/testing/testdata/figures-coverage/figures/composites/Line.java
new file mode 100644
index 000000000..1f7ee5dc8
--- /dev/null
+++ b/testing/testdata/figures-coverage/figures/composites/Line.java
@@ -0,0 +1,6 @@
+
+package figures.composites;
+
+class Line { }
+
+class BoundedLine extends Line { }
diff --git a/testing/testdata/figures-coverage/figures/composites/Square.java b/testing/testdata/figures-coverage/figures/composites/Square.java
new file mode 100644
index 000000000..8ba3825d6
--- /dev/null
+++ b/testing/testdata/figures-coverage/figures/composites/Square.java
@@ -0,0 +1,6 @@
+
+package figures.composites;
+
+class Square {
+ private String name = "Square";
+}