[svn:parrot] r45407 - trunk/t/pmc
bubaflub at svn.parrot.org
bubaflub at svn.parrot.org
Mon Apr 5 20:05:51 UTC 2010
Author: bubaflub
Date: Mon Apr 5 20:05:51 2010
New Revision: 45407
URL: https://trac.parrot.org/parrot/changeset/45407
Log:
[TT #1036] readonly should be shallow
Modified:
trunk/t/pmc/ro.t
Modified: trunk/t/pmc/ro.t
==============================================================================
--- trunk/t/pmc/ro.t Mon Apr 5 07:01:14 2010 (r45406)
+++ trunk/t/pmc/ro.t Mon Apr 5 20:05:51 2010 (r45407)
@@ -39,7 +39,7 @@
.sub main :main
.include 'test_more.pir'
- plan(12)
+ plan(13)
integer_set_read_only_is_not_writable() # 1 test
integer_set_read_only_can_be_read() # 6 tests
@@ -48,7 +48,7 @@
complex_i_add() # 1 test
resizablepmcarray_non_recursive_part() # 1 test
objects() # 1 test
-# resizablepmcarray_recursive() #
+ resizablepmcarray_recursive() # 1 test
.end
.sub integer_set_read_only_is_not_writable
@@ -68,12 +68,12 @@
ok( 0, "integer_set_read_only_is_not_writable" )
goto end
-eh_label:
+ eh_label:
.local string message
.get_results($P0)
message = $P0['message']
is( message, "set_integer_native() in read-only instance of 'Integer'", "integer_set_read_only_is_not_writable" )
-end:
+ end:
.end
.sub integer_set_read_only_can_be_read
@@ -130,12 +130,12 @@
ok(0, 'integer_add')
goto end
-eh_label:
+ eh_label:
.local string message
.get_results($P0)
message = $P0['message']
is( message, "i_add_int() in read-only instance of 'Integer'", 'integer_add' )
-end:
+ end:
.end
.sub complex_i_add
@@ -156,12 +156,12 @@
ok( 0, 'complex_i_add')
goto end
-eh_label:
+ eh_label:
.local string message
.get_results($P0)
message = $P0['message']
is( message, "i_add_int() in read-only instance of 'Complex'", 'complex_i_add' )
-end:
+ end:
.end
.sub resizablepmcarray_non_recursive_part
@@ -190,12 +190,12 @@
ok(0, 'resizablepmcarray_non_recursive_part')
goto end
-eh_label:
+ eh_label:
.local string message
.get_results($P0)
message = $P0['message']
is( message, "set_pmc_keyed_int() in read-only instance of 'ResizablePMCArray'", 'resizablepmcarray_non_recursive_part' )
-end:
+ end:
.end
.sub objects
@@ -222,22 +222,18 @@
ok( 0, 'objects')
goto end
-eh_label:
+ eh_label:
.local string message
.get_results($P0)
message = $P0['message']
is( message, "set_attr_str() in read-only instance of 'Foo'", 'objects' )
-end:
+ end:
.end
-=pod
-
-TT #1036: should this work?
-
.sub resizablepmcarray_recursive
.local pmc foo
.local pmc three
- .local pmc tmp
+ .local pmc four
foo = new ['ResizablePMCArray']
three = new ['Integer']
@@ -246,19 +242,14 @@
foo = 1
foo[0] = three
- print "before make_readonly\n"
make_readonly(foo)
- print "after\n"
- # three = 4 # should fail -- is that what we want
- tmp = foo[0]
- tmp = 4
- print "NOT OKAY\n"
- tmp = foo[0]
- print tmp
+ four = foo[0]
+ four = 4
+ four = foo[0]
+ is(four, 4, 'TT #1036 - readonly should be shallow')
.end
-=cut
# Local Variables:
More information about the parrot-commits
mailing list