Enable compilation of members with access check failures.
Change-Id: I0de73099b53612072c3e6f1235c22f96339fe440
diff --git a/test/024-illegal-access/src/Main.java b/test/024-illegal-access/src/Main.java
index bde73e9..84c7114 100644
--- a/test/024-illegal-access/src/Main.java
+++ b/test/024-illegal-access/src/Main.java
@@ -17,7 +17,7 @@
public class Main {
static public void main(String[] args) {
try {
- PublicAccess.main();
+ PublicAccess.accessStaticField();
System.err.println("ERROR: call 1 not expected to succeed");
} catch (VerifyError ve) {
// dalvik
@@ -28,14 +28,41 @@
}
try {
- CheckInstanceof.main(new Object());
+ PublicAccess.accessStaticMethod();
System.err.println("ERROR: call 2 not expected to succeed");
- } catch (VerifyError ve) {
- // dalvik
- System.out.println("Got expected failure 2");
} catch (IllegalAccessError iae) {
// reference
System.out.println("Got expected failure 2");
}
+
+ try {
+ PublicAccess.accessInstanceField();
+ System.err.println("ERROR: call 3 not expected to succeed");
+ } catch (VerifyError ve) {
+ // dalvik
+ System.out.println("Got expected failure 3");
+ } catch (IllegalAccessError iae) {
+ // reference
+ System.out.println("Got expected failure 3");
+ }
+
+ try {
+ PublicAccess.accessInstanceMethod();
+ System.err.println("ERROR: call 4 not expected to succeed");
+ } catch (IllegalAccessError iae) {
+ // reference
+ System.out.println("Got expected failure 4");
+ }
+
+ try {
+ CheckInstanceof.main(new Object());
+ System.err.println("ERROR: call 5 not expected to succeed");
+ } catch (VerifyError ve) {
+ // dalvik
+ System.out.println("Got expected failure 5");
+ } catch (IllegalAccessError iae) {
+ // reference
+ System.out.println("Got expected failure 5");
+ }
}
}