Skip to content

Commit 74ac196

Browse files
committed
rakudo nom fudging
1 parent 53b43a6 commit 74ac196

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

S02-types/enum.t

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use Test;
88

99
#is((%hash<Mon Tue Wed Thu Fri Sat Sun>) »eq« (1 .. 7)), "enum generated correct sequence");
1010
#?pugs 3 todo
11+
#?rakudo 3 todo 'todo'
1112
is(%hash<Mon>, 1, "first value ok");
1213
is(%hash<Thu>, 4, "fourth value ok");
1314
is(%hash<Sun>, 7, "last value ok");
@@ -18,6 +19,7 @@ use Test;
1819

1920
#is((%hash<Two Three Four>) »eq« (2 .. 4)), "enum generated correct sequence");
2021
#?pugs 3 todo
22+
#?rakudo 3 todo 'todo'
2123
is(%hash<Two>, 2, "first value ok");
2224
is(%hash<Three>, 3, "second value ok");
2325
is(%hash<Four>, 4, "last value ok");
@@ -26,6 +28,7 @@ use Test;
2628
my %hash;
2729

2830
#?pugs 3 todo 'feature'
31+
#?rakudo todo 'todo'
2932
lives_ok { %hash = enum <<:Sun(1) :Mon(2) :Tue(3) :Wed(4) :Thu(5) :Fri(6) :Sat(7)>>; }, 'specifying keys and values works...';
3033

3134
#?rakudo 2 todo '<<:pair(3)>> magic'
@@ -35,6 +38,7 @@ is %hash.values.sort, 1..7, '...and the right values are assigned';
3538
%hash = ();
3639

3740
#?pugs 3 todo 'feature'
41+
#?rakudo todo 'todo'
3842
lives_ok { %hash = enum <<:Sun(1) Mon Tue Wed Thu Fri Sat>>; }, 'specifying a value for only the first key works...';
3943

4044
#?rakudo 2 todo '<<:pair(3)>> magic'
@@ -45,6 +49,7 @@ is %hash.values.sort, 1..7, '...and the right values are assigned';
4549
%hash = ();
4650

4751
#?pugs 3 todo 'feature'
52+
#?rakudo todo 'todo'
4853
lives_ok { %hash = enum «:Sun(1) Mon Tue Wed Thu Fri Sat»; }, 'french quotes work...';
4954

5055
#?rakudo 2 todo '<<:pair(3)>> magic'
@@ -55,6 +60,7 @@ is %hash.values, 1..7, '...and the right values are assigned';
5560
%hash = ();
5661

5762
#?pugs 3 todo 'feature'
63+
#?rakudo todo 'todo'
5864
lives_ok { %hash = enum <<:Sun(1) Mon Tue :Wed(4) Thu Fri Sat>>; }, 'specifying continuous values in the middle works...';
5965

6066
#?rakudo 2 todo '<<:pair(3)>> magic'
@@ -64,6 +70,7 @@ is %hash.values.sort, 1..7, '...and the right values are assigned';
6470
%hash = ();
6571

6672
#?pugs 3 todo 'feature'
73+
#?rakudo todo 'todo'
6774
lives_ok { %hash = enum <<:Sun(1) Mon Tue :Wed(5) Thu Fri Sat>>; }, 'specifying different values in the middle works...';
6875

6976
#?rakudo 2 todo '<<:pair(3)>> magic'
@@ -74,6 +81,7 @@ is %hash.values.sort, (1, 2, 3, 5, 6, 7, 8), '...and the right values are assign
7481
%hash = ();
7582

7683
#?pugs 3 todo 'feature'
84+
#?rakudo todo 'todo'
7785
lives_ok { %hash = enum «:Alpha<A> Bravo Charlie Delta Echo»; }, 'specifying a string up front works';
7886

7987
#?rakudo 2 todo '<<:pair(3)>> magic'
@@ -86,9 +94,11 @@ is %hash.values.sort, <A B C D E>, '...and the right values are assigned';
8694
lives_ok { %hash = enum <<:Alpha<A> Bravo Charlie Delta Echo>>; }, 'specifying a string up front works (Texas quotes)';
8795

8896
#?pugs todo 'feature'
97+
#?rakudo todo 'todo'
8998
is %hash.keys.sort, <Alpha Bravo Charlie Delta Echo>, '...and the right keys are assigned';
9099

91100
#?pugs todo 'feature'
101+
#?rakudo todo 'todo'
92102
is %hash.values, <A B C D E>, '...and the right values are assigned';
93103

94104
%hash = ();
@@ -97,8 +107,10 @@ is %hash.values, <A B C D E>, '...and the right values are assigned';
97107
#?pugs 3 todo 'feature'
98108
lives_ok { %hash = enum «:zero(0) one two three four five six seven eight nine :ten<a> eleven twelve thirteen fourteen fifteen»; }, 'mixing strings and integers works';
99109

110+
#?rakudo todo 'todo'
100111
is %hash.keys, <zero one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen>, '...and the right keys are assigned';
101112

113+
#?rakudo todo 'todo'
102114
is %hash.values, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'), '...and the right values are assigned';
103115

104116
%hash = ();
@@ -129,7 +141,6 @@ is %hash.values, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'), '
129141
# RT 66648
130142
{
131143
enum RT66648 <a b c>;
132-
#?rakudo todo 'RT 66648'
133144
dies_ok { RT66648.c }, 'die attempting to access enum item as method';
134145
}
135146

0 commit comments

Comments
 (0)