diff options
author | aclement <aclement> | 2004-08-17 09:43:12 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-08-17 09:43:12 +0000 |
commit | cd4aeb90df088cb6b9d817298529ac8d54e2b8eb (patch) | |
tree | e5c34620ec1ee022e12a22ae0314c89f03a1d74c /ajde | |
parent | a2469c733c9f65514c3949cb1cc7254495011894 (diff) | |
download | aspectj-cd4aeb90df088cb6b9d817298529ac8d54e2b8eb.tar.gz aspectj-cd4aeb90df088cb6b9d817298529ac8d54e2b8eb.zip |
remaining fix for 72016 (problem/type information flowing through AJDE)
Diffstat (limited to 'ajde')
-rw-r--r-- | ajde/testsrc/org/aspectj/ajde/ExtensionTests.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/ExtensionTests.java b/ajde/testsrc/org/aspectj/ajde/ExtensionTests.java index ab492011f..ab1d1253b 100644 --- a/ajde/testsrc/org/aspectj/ajde/ExtensionTests.java +++ b/ajde/testsrc/org/aspectj/ajde/ExtensionTests.java @@ -43,9 +43,9 @@ public class ExtensionTests extends AjcTestCase { * * ajc -warn:unusedImport UnusedImport.java * - * Expected result = id + * Expected result is that id matches IProblem.UnusedImport */ - public void testOutjarInInjars () { + public void testMessageID () { String[] args = new String[] {"UnusedImport.java","-warn:unusedImport"}; CompilationResult result = ajc(baseDir,args); List l = result.getWarningMessages(); @@ -128,4 +128,22 @@ public class ExtensionTests extends AjcTestCase { } + /** + * Aim: Check that the start/end of certain warnings are correct + * + * ajc -warn:unusedImport UnusedImport.java + * + * Expected result is first warning message has start=7 end=20 + */ + public void testMessageSourceStartEnd() { + String[] args = new String[] {"UnusedImport.java","-warn:unusedImport"}; + CompilationResult result = ajc(baseDir,args); + List l = result.getWarningMessages(); + IMessage m = ((IMessage)l.get(0)); + assertTrue("Expected source start to be 7 but was "+m.getSourceStart(), + m.getSourceStart()==7); + assertTrue("Expected source end to be 20 but was "+m.getSourceEnd(), + m.getSourceEnd()==20); + } + } |