summaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
authoraclement <aclement>2006-09-22 10:49:37 +0000
committeraclement <aclement>2006-09-22 10:49:37 +0000
commit98a5d925536b291ca760ca510a2e06b7e3cff13e (patch)
treed349cbb016ddc7b55dae0c6eace09803ca799f4f /tests/java5
parent1138f942d5c2367ef8a6abb4d30e724730bc8f79 (diff)
downloadaspectj-98a5d925536b291ca760ca510a2e06b7e3cff13e.tar.gz
aspectj-98a5d925536b291ca760ca510a2e06b7e3cff13e.zip
154054 testcode and fix: noticing changes in around advice and forcing full builds
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/ataspectj/ataspectj/IfPointcut2Test.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/java5/ataspectj/ataspectj/IfPointcut2Test.java b/tests/java5/ataspectj/ataspectj/IfPointcut2Test.java
index 37cd6f042..73b4b0f84 100644
--- a/tests/java5/ataspectj/ataspectj/IfPointcut2Test.java
+++ b/tests/java5/ataspectj/ataspectj/IfPointcut2Test.java
@@ -33,20 +33,24 @@ public class IfPointcut2Test extends TestCase {
f.doo();
f.doo(1);
f.dooMulti();
- assertEquals(
- "test aop test2-doo-doo aop2 doo test3-1-doo-doo-doo aop3 doo-1 testTWO-dooMulti testONE-dooMulti aop doMulti ",
- s_log.toString()
- );
+ // we don't want to rely on the order the if pcds are evaluated
+ String exp1 = "test aop test2-doo-doo aop2 doo test3-1-doo-doo-doo aop3 doo-1 testTWO-dooMulti testONE-dooMulti aop doMulti ";
+ String exp2 = "test aop test2-doo-doo aop2 doo test3-1-doo-doo-doo aop3 doo-1 testONE-dooMulti testTWO-dooMulti aop doMulti ";
+ boolean equ = (exp1.equals(s_log.toString()) || exp2.equals(s_log.toString()));
+ assertTrue("expected log to contain \n" + exp1 +"\n or \n" + exp2 + "\n but found \n" + s_log.toString(), equ);
s_log = new StringBuffer();
IfAspect.ISON = false;
f.doo();
f.doo(1);
f.dooMulti();
- assertEquals(
- "test test2-doo-doo doo test3-1-doo-doo-doo doo-1 testTWO-dooMulti doMulti ",
- s_log.toString()
- );
+
+ // we don't want to rely on the order the if pcds are evaluated
+ String exp3 = "test test2-doo-doo doo test3-1-doo-doo-doo doo-1 testTWO-dooMulti doMulti ";
+ String exp4 = "test test2-doo-doo doo test3-1-doo-doo-doo doo-1 testONE-dooMulti doMulti ";
+
+ equ = (exp3.equals(s_log.toString()) || exp4.equals(s_log.toString()));
+ assertTrue("expected log to contain \n" + exp3 +"\n or \n" + exp4 + "\n but found \n" + s_log.toString(), equ);
}
public static void main(String[] args) {