summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/ajcTests.xml8
-rw-r--r--tests/harness/ConstructorNameWarning.java9
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index f271d2e68..9ed79f34d 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -6249,4 +6249,12 @@
<run class="Big"/>
</ajc-test>
+ <ajc-test dir="harness"
+ title="setting -warn:constructorName works">
+ <compile files="ConstructorNameWarning.java"
+ options="-warn:constructorName">
+ <message kind="warning" line="5" text="constructor name"/>
+ </compile>
+ </ajc-test>
+
</suite>
diff --git a/tests/harness/ConstructorNameWarning.java b/tests/harness/ConstructorNameWarning.java
new file mode 100644
index 000000000..ddf809540
--- /dev/null
+++ b/tests/harness/ConstructorNameWarning.java
@@ -0,0 +1,9 @@
+
+public class ConstructorNameWarning {
+
+ /** expecting warning: method with constructor name */
+ public void ConstructorNameWarning(String s) { // CW 5 -warn:constructorName
+ }
+}
+
+