* tests/regression/resolving/TestController.java: Better error messages and
[cacao.git] / tests / regression / resolving / test_instance_subtype_violated.java
index 875dd9da090bdec2131a6ba1bb449312aebf7b01..f58cc17fc767f5fd67a4884d682a5b83a9a5dc9e 100644 (file)
@@ -25,29 +25,29 @@ public class test_instance_subtype_violated {
         ld3.addParentDelegation("java.lang.String");
 
 
-        // loading BarPassFoo
+        // loading and linking BarPassFoo
         ct.expect("requested", ld2, "BarPassFoo");
+        ct.expectLoadFromSystem(ld2, "java.lang.Object");
         ct.expect("defined", ld2, "<BarPassFoo>");
         ct.expect("loaded", ld2, "<BarPassFoo>");
 
         Class cls = ct.loadClass(ld2, "BarPassFoo");
 
-        // linking BarPassFoo
-        ct.expectLoadFromSystem(ld2, "java.lang.Object");
-
         // executing BarPassFoo.passDerivedFooInstance: new DerivedFoo
-        ct.expectDelegationAndDefinition(ld2, ld3, "DerivedFoo");
+        ct.expectDelegation(ld2, ld3, "DerivedFoo");
 
         // linking (ld3, DerivedFoo)
         ct.expect("requested", ld3, "Foo");
-        ct.expect("defined", ld3, "<Foo>");
         ct.expectLoadFromSystem(ld3, "java.lang.Object");
+        ct.expect("defined", ld3, "<Foo>");
+        ct.expectDelegationDefinition(ld2, ld3, "DerivedFoo");
 
         // resolving Foo.virtualId
         // the deferred subtype check ((ld2, DerivedFoo) subtypeof (ld2, Foo)) is done
-        ct.expectDelegationAndDefinition(ld2, ld1, "Foo");
+        ct.expectDelegation(ld2, ld1, "Foo");
         // ...linking (ld2, Foo) == (ld1, Foo)
         ct.expectLoadFromSystem(ld1, "java.lang.Object");
+        ct.expectDelegationDefinition(ld2, ld1, "Foo");
 
         // the subtype constraint ((ld2, DerivedFoo) subtypeof (ld2, Foo)) is violated
         ct.expect("exception", "java.lang.LinkageError", "<BarPassFoo>");