From da8df50db7c0f74548807956680bcadbb985234b Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 5 Jan 2005 16:40:56 +0000 Subject: [PATCH] Recent changes seem to have made some messages come out in a different order ! --- tests/src/org/aspectj/systemtest/ajc150/Annotations.java | 6 +++--- tests/src/org/aspectj/systemtest/ajc150/Enums.java | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/src/org/aspectj/systemtest/ajc150/Annotations.java b/tests/src/org/aspectj/systemtest/ajc150/Annotations.java index 419c4e39f..94760cc4f 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Annotations.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Annotations.java @@ -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[]{}); diff --git a/tests/src/org/aspectj/systemtest/ajc150/Enums.java b/tests/src/org/aspectj/systemtest/ajc150/Enums.java index 87927e158..ff0ba4167 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Enums.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Enums.java @@ -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[]{}); -- 2.39.5