Permalink
Browse files

test for the bounds check in CArray.STORE

  • Loading branch information...
1 parent 1c3d64e commit 9d8de5ef9d2fc424e968bc6298be99800243d55c @moritz moritz committed Aug 28, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 t/05-arrays.t
View
@@ -3,7 +3,7 @@ use t::CompileTestLib;
use NativeCall;
use Test;
-plan 16;
+plan 17;
compile_test_lib('05-arrays');
@@ -75,4 +75,12 @@ compile_test_lib('05-arrays');
TakeAStructArray(@arr);
}
+{
+ my @a := CArray[Str].new;
+ @a = 'a' .. 'f';
+ dies_ok {
+ @a = 'oh', 'really?';
+ }, 'list assignment to CArray dies rather than not clipping the array';
+}
+
# vim:ft=perl6

0 comments on commit 9d8de5e

Please sign in to comment.