aboutsummaryrefslogtreecommitdiffstats
path: root/ajde/testdata/examples
diff options
context:
space:
mode:
authormkersten <mkersten>2003-02-26 08:34:41 +0000
committermkersten <mkersten>2003-02-26 08:34:41 +0000
commit5e5a2dd20e2c8038dbaf14583710c76e21988659 (patch)
tree1c5a8066e2441030f50349c7e998a83dccc968c0 /ajde/testdata/examples
parentaef2beff9edc8618440de426e03f435d6e00bb3c (diff)
downloadaspectj-5e5a2dd20e2c8038dbaf14583710c76e21988659.tar.gz
aspectj-5e5a2dd20e2c8038dbaf14583710c76e21988659.zip
Added new coverage test source.
Diffstat (limited to 'ajde/testdata/examples')
-rw-r--r--ajde/testdata/examples/coverage/ModelCoverage.java69
-rw-r--r--ajde/testdata/examples/coverage/coverage.ajsymbin0 -> 10265 bytes
-rw-r--r--ajde/testdata/examples/coverage/coverage.lst1
3 files changed, 70 insertions, 0 deletions
diff --git a/ajde/testdata/examples/coverage/ModelCoverage.java b/ajde/testdata/examples/coverage/ModelCoverage.java
new file mode 100644
index 000000000..cf14bf080
--- /dev/null
+++ b/ajde/testdata/examples/coverage/ModelCoverage.java
@@ -0,0 +1,69 @@
+
+import java.io.*;;
+
+class Point {
+
+ int x;
+ static int sx;
+
+ { x = 0; }
+ static { sx = 1; }
+
+ public Point() { }
+
+ public int getX() { return x; }
+
+ public void setX(int x) { this.x = x; }
+
+ void doIt() {
+ try {
+ File f = new File(".");
+ f.getCanonicalPath();
+ } catch (IOException ioe) {
+ System.err.println("!");
+ }
+ setX(10);
+ }
+}
+
+aspect PcdCoverage {
+ before(): get(int *.*) { }
+ before(): set(int *.*) { }
+ before(): initialization(Point.new(..)) { }
+ before(): staticinitialization(Point) { }
+ before(): handler(IOException) { }
+ before(): call(String Point.setX(int)) { }
+// before(): call(String Point.new()) { }
+// execution(): call(String Point.setX(int)) { }
+}
+
+aspect InterTypeDecCoverage {
+
+ pointcut illegalNewFigElt(): call(FigureElement+.new(..)) &&
+ !withincode(* Main.main(..));
+
+ declare error: illegalNewFigElt():
+ "Illegal figure element constructor call.";
+
+ declare warning: illegalNewFigElt():
+ "Illegal figure element constructor call.";
+
+ declare parents: Point extends java.io.Serializable;
+
+ declare parents: Point implements java.util.Observable;
+
+ //declare soft: Point: call(* *(..));
+
+ public String Point.getName() { return "xxx"; }
+
+ public int Point.xxx = 0;
+}
+
+aspect AdviceCoverage {
+
+}
+
+
+
+
+
diff --git a/ajde/testdata/examples/coverage/coverage.ajsym b/ajde/testdata/examples/coverage/coverage.ajsym
new file mode 100644
index 000000000..27561a1b3
--- /dev/null
+++ b/ajde/testdata/examples/coverage/coverage.ajsym
Binary files differ
diff --git a/ajde/testdata/examples/coverage/coverage.lst b/ajde/testdata/examples/coverage/coverage.lst
new file mode 100644
index 000000000..fae756a9c
--- /dev/null
+++ b/ajde/testdata/examples/coverage/coverage.lst
@@ -0,0 +1 @@
+ModelCoverage.java