This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a90211
)
The T_BOOL_2 tests should have failed, rewrite and TODO
author
Tony Cook
<tony@develop-help.com>
Wed, 19 Dec 2012 06:29:55 +0000
(17:29 +1100)
committer
Tony Cook
<tony@develop-help.com>
Wed, 19 Dec 2012 22:31:31 +0000
(09:31 +1100)
ext/XS-Typemap/t/Typemap.t
patch
|
blob
|
blame
|
history
diff --git
a/ext/XS-Typemap/t/Typemap.t
b/ext/XS-Typemap/t/Typemap.t
index
de0bf6d
..
93c1979
100644
(file)
--- a/
ext/XS-Typemap/t/Typemap.t
+++ b/
ext/XS-Typemap/t/Typemap.t
@@
-150,10
+150,14
@@
ok( ! T_BOOL(0) );
ok( ! T_BOOL('') );
ok( ! T_BOOL(undef) );
-ok( T_BOOL_2(52) );
-ok( ! T_BOOL_2(0) );
-ok( ! T_BOOL_2('') );
-ok( ! T_BOOL_2(undef) );
+{
+ # these attempt to modify a read-only value
+ local $TODO = "attempts to modify a read-only value should crash";
+ ok( !eval { T_BOOL_2(52); 1 } );
+ ok( !eval { T_BOOL_2(0); 1 } );
+ ok( !eval { T_BOOL_2(''); 1 } );
+ ok( !eval { T_BOOL_2(undef); 1 } );
+}
# T_U_SHORT aka U16
note("T_U_SHORT");