From cd4aeb90df088cb6b9d817298529ac8d54e2b8eb Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Aug 2004 09:43:12 +0000 Subject: remaining fix for 72016 (problem/type information flowing through AJDE) --- ajde/testsrc/org/aspectj/ajde/ExtensionTests.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'ajde') 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); + } + } -- cgit v1.2.3