[svn:parrot] r44859 - branches/tt389_fix/t/pmc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Wed Mar 10 22:50:18 UTC 2010
Author: whiteknight
Date: Wed Mar 10 22:50:18 2010
New Revision: 44859
URL: https://trac.parrot.org/parrot/changeset/44859
Log:
adding another test, modified from a failing example in TT #562. It fails in branch and needs to un-fail
Modified:
branches/tt389_fix/t/pmc/integer.t
Modified: branches/tt389_fix/t/pmc/integer.t
==============================================================================
--- branches/tt389_fix/t/pmc/integer.t Wed Mar 10 22:44:54 2010 (r44858)
+++ branches/tt389_fix/t/pmc/integer.t Wed Mar 10 22:50:18 2010 (r44859)
@@ -19,7 +19,7 @@
.sub 'test' :main
.include 'test_more.pir'
- plan(62)
+ plan(64)
test_init()
test_basic_math()
test_truthiness_and_definedness()
@@ -39,6 +39,7 @@
test_get_as_base_bounds_check()
test_cmp_subclass()
test_cmp_RT59336()
+ test_hll_mmd_tt562()
.end
.sub test_init
@@ -415,6 +416,25 @@
fin:
.end
+.sub test_hll_mmd_tt562
+ # Test for issues described in TT #562, where subclasses of basic arithmetic
+ # types have troubles in MMD vtable operations
+ $P0 = subclass 'Integer', '562Integer'
+
+ $P0 = new 'Integer'
+ $P0 = 10
+ $P1 = sub $P0, 1
+ $I0 = $P1
+ is($I0, 9, "Integer MMD subtract")
+
+ $P0 = new 'FooInt'
+ $P0 = 10
+ $P1 = new '562Integer'
+ $P1 = sub $P0, 1
+ $I0 = $P1
+ is($I0, 9, "Integer subclass MMD subtract")
+.end
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
More information about the parrot-commits
mailing list