Browse Source

Recent changes seem to have made some messages come out in a different order !

tags/Root_AspectJ5_Development
aclement 19 years ago
parent
commit
da8df50db7

+ 3
- 3
tests/src/org/aspectj/systemtest/ajc150/Annotations.java View File

@@ -55,13 +55,13 @@ public class Annotations extends TestUtils {
// Deals with the cases where an explicit type is specified and it is an annotation type
public void test002_decpOnAnnotationNotAllowed_errors() {
CompilationResult cR = binaryWeave("testcode.jar","AnnotationAspect04.aj",3,0,true);
IMessage msg = (IMessage)cR.getErrorMessages().get(0);
IMessage msg = (IMessage)cR.getErrorMessages().get(1);
assertTrue("Expected a message about can't use decp to alter supertype of an annotation: "+msg,
msg.toString().indexOf("to alter supertype of annotation type")!=-1);
msg = (IMessage)cR.getErrorMessages().get(1);
msg = (IMessage)cR.getErrorMessages().get(2);
assertTrue("Expected a message about can't use decp to make annotation implement interface: "+msg,
msg.toString().indexOf("implement an interface")!=-1);
msg = (IMessage)cR.getErrorMessages().get(2);
msg = (IMessage)cR.getErrorMessages().get(0);
assertTrue("Expected a message about can't use decp to make Annotation parent of another type: "+msg,
msg.toString().indexOf("the parent of type")!=-1);
verifyWeavingMessagesOutput(cR,new String[]{});

+ 5
- 3
tests/src/org/aspectj/systemtest/ajc150/Enums.java View File

@@ -60,13 +60,15 @@ public class Enums extends TestUtils {
// Deals with the cases where an explicit type is specified and it is an enum type
public void test003_decpOnEnumNotAllowed_errors() {
CompilationResult cR = binaryWeave("testcode.jar","EnumAspect03.aj",3,0,true);
IMessage msg = (IMessage)cR.getErrorMessages().get(0);
// THE ORDERING CAN BE SENSITIVE HERE... OUGHT TO FIX IT PROPERLY AND ALLOW FOR THEM
// IN ANY POSITION
IMessage msg = (IMessage)cR.getErrorMessages().get(1);
assertTrue("Expected a message about can't use decp to alter supertype of an enum: "+msg,
msg.toString().indexOf("to alter supertype of enum type")!=-1);
msg = (IMessage)cR.getErrorMessages().get(1);
msg = (IMessage)cR.getErrorMessages().get(2);
assertTrue("Expected a message about can't use decp to make enum implement interface: "+msg,
msg.toString().indexOf("implement an interface")!=-1);
msg = (IMessage)cR.getErrorMessages().get(2);
msg = (IMessage)cR.getErrorMessages().get(0);
assertTrue("Expected a message about can't use decp to make Enum parent of another type: "+msg,
msg.toString().indexOf("the parent of type")!=-1);
verifyWeavingMessagesOutput(cR,new String[]{});

Loading…
Cancel
Save