Author: Whiteknight Date: Wed Jan 28 11:02:51 2009 New Revision: 36105 Modified: trunk/t/oo/vtableoverride.t
Log: [t] Adding some hypothetical tests for the "invoke" vtable override. These tests should pass once ticket TT#103 is finally resolved. Modified: trunk/t/oo/vtableoverride.t ============================================================================== --- trunk/t/oo/vtableoverride.t (original) +++ trunk/t/oo/vtableoverride.t Wed Jan 28 11:02:51 2009 @@ -53,6 +53,15 @@ $P0 = getattribute $P1, "message" $S0 = $P0 is($S0, "Morphing [MyObject] to type Integer", "Morph VTABLE override 1") + + # Test invoke. Doesn't currently work so we need to fix that. + #$P0 = $P1("invoked!") + #$S0 = $P0 + #is($S0, "invoked!", "Invoke VTABLE override return value") + + #$P0 = getattribute $P1, "message" + #$S0 = $P0 + #is($S0, "invoked!", "Invoke VTABLE override sideeffects") .end .sub 'subclass_tests' @@ -116,6 +125,13 @@ .return (1) .end +.sub 'invoke' :vtable + .param string msg + $P0 = box msg + setattribute self, "message", $P0 + .return($P0) +.end + .namespace [ 'MySubObject' ] .sub '__onload' :anon :init