diff options
author | mkersten <mkersten> | 2003-02-26 08:34:41 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-02-26 08:34:41 +0000 |
commit | 5e5a2dd20e2c8038dbaf14583710c76e21988659 (patch) | |
tree | 1c5a8066e2441030f50349c7e998a83dccc968c0 /ajde/testdata/examples | |
parent | aef2beff9edc8618440de426e03f435d6e00bb3c (diff) | |
download | aspectj-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.java | 69 | ||||
-rw-r--r-- | ajde/testdata/examples/coverage/coverage.ajsym | bin | 0 -> 10265 bytes | |||
-rw-r--r-- | ajde/testdata/examples/coverage/coverage.lst | 1 |
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 Binary files differnew file mode 100644 index 000000000..27561a1b3 --- /dev/null +++ b/ajde/testdata/examples/coverage/coverage.ajsym 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
|