Permalink
Browse files

Add some tests for @array.reverse, but the reverse method is not bein…

…g found

Method 'reverse' not found for invocant of class 'ResizablePMCArray'
current instr.: 'test_array_reverse' pc 399 (EVAL_1:163)
called from Sub 'run_tests' pc 266 (EVAL_1:125)
called from Sub 'MAIN' pc 199 (EVAL_1:0)
called from Sub '_block11' pc 0 (EVAL_1:5)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc -1 ((unknown file):-1)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1303 (src/PCT/HLLCompiler.pir:707)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1489 (src/PCT/HLLCompiler.pir:794)
called from Sub 'parrot;NQP;Compiler;main' pc -1 ((unknown file):-1)
  • Loading branch information...
1 parent c7ef85b commit 14d0bcf219c0639f27ee40145c878add265e1e80 @leto leto committed Jan 25, 2010
Showing with 11 additions and 1 deletion.
  1. +11 −1 t/03-util.t
View
@@ -17,13 +17,15 @@ sub MAIN () {
}
sub run_tests () {
- plan(46);
+ plan(49);
test_hash_exists();
test_hash_keys();
test_hash_values();
test_hash_kv();
+ test_array_reverse();
+
test_set_from_array();
test_subst();
@@ -34,6 +36,14 @@ sub run_tests () {
test_qx();
}
+sub test_array_reverse() {
+ my @array := (42,69,314);
+ my @reversed := @array.reverse;
+ is(@reversed[0],314,'reverse of an array is correct');
+ is(@reversed[1],69,'reverse of an array is correct');
+ is(@reversed[2],42,'reverse of an array is correct');
+}
+
sub test_hash_exists() {
my %opt;
%opt<foobar> := 42;

0 comments on commit 14d0bcf

Please sign in to comment.