Created
August 1, 2011 20:49
-
-
Save tadzik/1118969 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─[tadzik@yavin4]─[~/src/nom] (nom) | |
└─[%]─> cat fail.pl | |
use Test; | |
my @unshift = (); | |
unshift @unshift, (1, 2, 3); | |
say @unshift.perl; | |
say @unshift.WHAT; | |
say +@unshift; | |
is(+@unshift, 3, 'we have 3 elements in the array'); | |
is(@unshift[0], 1, 'got the expected element'); | |
is(@unshift[1], 2, 'got the expected element'); | |
is(@unshift[2], 3, 'got the expected element'); | |
┌─[tadzik@yavin4]─[~/src/nom] (nom) | |
└─[%]─> ./perl6 fail.pl | |
Array.new(1, 2, 3) | |
Array() | |
1 | |
not ok 1 - we have 3 elements in the array | |
# got: '1' | |
# expected: '3' | |
not ok 2 - got the expected element | |
# got: '1 2 3' | |
# expected: '1' | |
Use of uninitialized value in string context | |
not ok 3 - got the expected element | |
Use of uninitialized value in string context | |
# got: '' | |
# expected: '2' | |
Use of uninitialized value in string context | |
not ok 4 - got the expected element | |
Use of uninitialized value in string context | |
# got: '' | |
# expected: '3' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment