소스 검색

tests for Bugzilla Bug 50641

   Better binary compatibility for advice method names
tags/v_preCompileLoopAlteration
jhugunin 20 년 전
부모
커밋
9e3a03d726
4개의 변경된 파일50개의 추가작업 그리고 0개의 파일을 삭제
  1. 17
    0
      tests/bugs/binaryCompat/Main.java
  2. 11
    0
      tests/bugs/binaryCompat/TraceRE.aj
  3. 11
    0
      tests/bugs/binaryCompat/TraceV1.aj
  4. 11
    0
      tests/bugs/binaryCompat/TraceV2.aj

+ 17
- 0
tests/bugs/binaryCompat/Main.java 파일 보기

@@ -0,0 +1,17 @@
public class Main {
public static void main(String[] args) {
try {
doit();
if (Trace.expectNoSuchMethodError) {
throw new RuntimeException("expected NoSuchMethodError");
}
} catch (NoSuchMethodError e) {
if (!Trace.expectNoSuchMethodError) throw e;
}
}
private static void doit() {
System.out.println("hello world");
}
}

+ 11
- 0
tests/bugs/binaryCompat/TraceRE.aj 파일 보기

@@ -0,0 +1,11 @@
aspect Trace {
public static boolean expectNoSuchMethodError = true;
before(): execution(void main(..)) { // expect an error for incompatible binary change
System.out.println("enter");
}
after() returning: execution(void doit(..)) {
System.out.println("exit");
}
}

+ 11
- 0
tests/bugs/binaryCompat/TraceV1.aj 파일 보기

@@ -0,0 +1,11 @@
aspect Trace {
public static boolean expectNoSuchMethodError = false;
before(): execution(void doit(..)) {
System.out.println("enter");
}
after() returning: execution(void doit(..)) {
System.out.println("exit");
}
}

+ 11
- 0
tests/bugs/binaryCompat/TraceV2.aj 파일 보기

@@ -0,0 +1,11 @@
aspect Trace {
public static boolean expectNoSuchMethodError = false;
before(): execution(void doit(..)) {
System.out.println("entering");
}
after() returning: execution(void doit(..)) {
System.out.println("exiting");
}
}

Loading…
취소
저장