Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 26 lines (16 sloc) 0.617 kb
5309f04 Adding some tests for List.new, Array.new, &list() and adding a descript...
ash authored
1 use v6;
2 use Test;
3
4 # L<S32::Containers/"List"/"=item ">
5
6 =begin pod
7
8 built-in "list" tests
9
10 =end pod
11
12 plan 6;
13
14 my $list_sub = list(1, 2, 3);
15 is($list_sub.WHAT, List, '&list() creates a list assignable to a scalar.');
16 is($list_sub, (1, 2, 3), 'The &list() function created a list.');
17 is(+$list_sub, 3, 'Finding the length of the list works as expected.');
18
19 my $list_obj = List.new(4, 5, 6);
20 is($list_obj.WHAT, List, 'Creating a new list object with new works.');
21 is($list_obj, list(4, 5, 6), 'The list object contains the right values.');
0c64c52 typo
rodi authored
22 is(+$list_obj, 3, 'Finding the length functions properly.');
5309f04 Adding some tests for List.new, Array.new, &list() and adding a descript...
ash authored
23
24 # vim: ft=perl6
25
Something went wrong with that request. Please try again.