if (!deows[1].isError()) throw new RuntimeException("Expecting an error");
if (!deows[0].getMessage().equals("dont call system methods")) throw new RuntimeException("Bad message");
if (!deows[1].getMessage().equals("dont call system methods")) throw new RuntimeException("Bad message");
- if (!deows[0].getPointcutExpression().equals("call(* java.lang.System.*(..))")) throw new RuntimeException("Bad pc: " + deows[0].getPointcutExpression());
- if (!deows[1].getPointcutExpression().equals("call(* java.lang.System.*(..))")) throw new RuntimeException("Bad pc: " + deows[0].getPointcutExpression());
+ if (!deows[0].getPointcutExpression().toString().equals("call(* java.lang.System.*(..))")) throw new RuntimeException("Bad pc: " + deows[0].getPointcutExpression());
+ if (!deows[1].getPointcutExpression().toString().equals("call(* java.lang.System.*(..))")) throw new RuntimeException("Bad pc: " + deows[0].getPointcutExpression());
}
}
\ No newline at end of file
public static void main(String[] args) throws NoSuchPointcutException {
AjType myType = AjTypeSystem.getAjType(ReferencePointcuts.class);
Pointcut p1 = myType.getPointcut("pc1");
- if (!p1.getPointcutExpression().equals("call(* *(..))"))
+ if (!p1.getPointcutExpression().toString().equals("call(* *(..))"))
throw new RuntimeException("unexpected pc expression: " + p1.getPointcutExpression());
Pointcut p2 = myType.getPointcut("pc2");
- if (!p2.getPointcutExpression().equals("(pc1() || execution(* *(..)))"))
+ if (!p2.getPointcutExpression().toString().equals("(pc1() || execution(* *(..)))"))
throw new RuntimeException("unexpected pc expression: " + p2.getPointcutExpression());
}