Browse Source

@testcase PR#36673 privileged aspect main verify error

tags/V1_1_0_RC2
wisberg 21 years ago
parent
commit
a1f90ec426
2 changed files with 24 additions and 2 deletions
  1. 5
    2
      tests/ajcTestsFailing.xml
  2. 19
    0
      tests/new/verifyError/Privilege.java

+ 5
- 2
tests/ajcTestsFailing.xml View File

@@ -4,6 +4,9 @@
<!-- contains valid tests that the compiler has never passed -->
<suite>



<ajc-test dir="new/verifyError" pr="36673"
title="privileged aspect main verify error">
<compile files="Privilege.java"/>
<run class="Privilege"/>
</ajc-test>
</suite>

+ 19
- 0
tests/new/verifyError/Privilege.java View File

@@ -0,0 +1,19 @@

import org.aspectj.testing.Tester;

class C {
private int i;
}

privileged aspect A {
private int C.j = 1;
}

/** @testcase PR#36673 privileged aspect main verify error */
public privileged aspect Privilege {
public static void main(String[] args) {
C c = new C();
Tester.check(1 == c.j, "wrong value for c.j");
}
}


Loading…
Cancel
Save