aboutsummaryrefslogtreecommitdiffstats
path: root/tests/options
diff options
context:
space:
mode:
Diffstat (limited to 'tests/options')
-rw-r--r--tests/options/WarnDeprecated.java13
-rw-r--r--tests/options/XLintTypeArgsPCD.java14
-rw-r--r--tests/options/XLintTypeDeclareField.java12
-rw-r--r--tests/options/XLintTypeDeclareMethod.java12
-rw-r--r--tests/options/XLintTypeDeclareParent.java12
-rw-r--r--tests/options/XLintTypeTargetPCD.java14
-rw-r--r--tests/options/XLintTypeThisPCD.java14
-rw-r--r--tests/options/injars/simple/Main.java12
-rw-r--r--tests/options/injars/simple/Simple.java9
-rw-r--r--tests/options/injars/simple/main.jarbin0 -> 505 bytes
10 files changed, 112 insertions, 0 deletions
diff --git a/tests/options/WarnDeprecated.java b/tests/options/WarnDeprecated.java
new file mode 100644
index 000000000..2d0d928a7
--- /dev/null
+++ b/tests/options/WarnDeprecated.java
@@ -0,0 +1,13 @@
+
+
+
+
+public class WarnDeprecated {
+
+ /** @deprecated */
+ public static void main(String[] args) {
+ if (null == args) {
+ main(new String[0]); // CE 10 deprecated if warn:deprecated
+ }
+ }
+}
diff --git a/tests/options/XLintTypeArgsPCD.java b/tests/options/XLintTypeArgsPCD.java
new file mode 100644
index 000000000..ee22bd174
--- /dev/null
+++ b/tests/options/XLintTypeArgsPCD.java
@@ -0,0 +1,14 @@
+
+class E {}
+class F {
+ public static void main(String[] args) {}
+}
+
+public aspect XLintTypeArgsPCD {
+ public static int COUNT;
+
+ before () : args(UnknownType) { // CM -XLint unfound type
+ COUNT++;
+ }
+}
+
diff --git a/tests/options/XLintTypeDeclareField.java b/tests/options/XLintTypeDeclareField.java
new file mode 100644
index 000000000..df58fc966
--- /dev/null
+++ b/tests/options/XLintTypeDeclareField.java
@@ -0,0 +1,12 @@
+
+class C {}
+class D {}
+class E {}
+class F {}
+
+
+public aspect XLintTypeDeclareField {
+
+ public int UnknownType.i; // CM -XLint unfound type
+}
+
diff --git a/tests/options/XLintTypeDeclareMethod.java b/tests/options/XLintTypeDeclareMethod.java
new file mode 100644
index 000000000..80a791b54
--- /dev/null
+++ b/tests/options/XLintTypeDeclareMethod.java
@@ -0,0 +1,12 @@
+
+
+class C {}
+class D {}
+class E {}
+class F {}
+
+public aspect XLintTypeDeclareMethod {
+
+ int UnknownType.getValue() { return 0; } // CM -XLint unfound type
+}
+
diff --git a/tests/options/XLintTypeDeclareParent.java b/tests/options/XLintTypeDeclareParent.java
new file mode 100644
index 000000000..2a98a76b7
--- /dev/null
+++ b/tests/options/XLintTypeDeclareParent.java
@@ -0,0 +1,12 @@
+
+
+class C {}
+class D {}
+class E {}
+class F {}
+
+public aspect XLintTypeDeclareParent {
+
+ declare parents: UnknownType implements Cloneable; // CM -XLint unfound type
+}
+
diff --git a/tests/options/XLintTypeTargetPCD.java b/tests/options/XLintTypeTargetPCD.java
new file mode 100644
index 000000000..1893833a5
--- /dev/null
+++ b/tests/options/XLintTypeTargetPCD.java
@@ -0,0 +1,14 @@
+
+class C {}
+class D {}
+class E {}
+class F {}
+
+public aspect XLintTypeTargetPCD {
+ public static int COUNT;
+
+ before () : target(UnknownType) { // CM -XLint unfound type
+ COUNT++;
+ }
+}
+
diff --git a/tests/options/XLintTypeThisPCD.java b/tests/options/XLintTypeThisPCD.java
new file mode 100644
index 000000000..6d32f0554
--- /dev/null
+++ b/tests/options/XLintTypeThisPCD.java
@@ -0,0 +1,14 @@
+
+class C {}
+class D {}
+class E {}
+class F {}
+
+public aspect XLintTypeThisPCD {
+ public static int COUNT;
+
+ before () : this(UnknownType) { // CM -XLint unfound type
+ COUNT++;
+ }
+}
+
diff --git a/tests/options/injars/simple/Main.java b/tests/options/injars/simple/Main.java
new file mode 100644
index 000000000..fd8342a1c
--- /dev/null
+++ b/tests/options/injars/simple/Main.java
@@ -0,0 +1,12 @@
+
+
+import org.aspectj.testing.Tester;
+
+public class Main {
+ public static void main(String[] args) {
+ Tester.expectEvent("run");
+ new Main().run();
+ Tester.checkAllEvents();
+ }
+ public void run(){}
+} \ No newline at end of file
diff --git a/tests/options/injars/simple/Simple.java b/tests/options/injars/simple/Simple.java
new file mode 100644
index 000000000..6caf44ec1
--- /dev/null
+++ b/tests/options/injars/simple/Simple.java
@@ -0,0 +1,9 @@
+
+
+import org.aspectj.testing.Tester;
+
+aspect Simple {
+ before() : execution(void run()) {
+ Tester.event("run");
+ }
+} \ No newline at end of file
diff --git a/tests/options/injars/simple/main.jar b/tests/options/injars/simple/main.jar
new file mode 100644
index 000000000..7b9859037
--- /dev/null
+++ b/tests/options/injars/simple/main.jar
Binary files differ