Skip to content

Commit 5627618

Browse files
kbogakboga
authored andcommitted
(un)fudge subset.t for nom
1 parent 7e60c7d commit 5627618

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

S02-polymorphic_types/subset.t

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,12 @@ dies_ok { my Digit $x = 3.1 },
4848
# RT #67818
4949
{
5050
subset Subhash of Hash;
51-
#?rakudo todo 'RT #67818'
5251
lives_ok { my Subhash $a = {} },
5352
'can create subset of hash';
5453

5554
subset Person of Hash where { .keys.sort ~~ <firstname lastname> }
56-
#?rakudo todo 'RT #67818'
5755
lives_ok { my Person $p = { :firstname<Alpha>, :lastname<Bravo> } },
5856
'can create subset of hash with where';
59-
#?rakudo skip '(noauto) succeeds for the wrong reason (need to test the error)'
6057
dies_ok { my Person $p = { :first<Charlie>, :last<Delta> } },
6158
'subset of hash with where enforces where clause';
6259

@@ -81,10 +78,12 @@ dies_ok { my Digit $x = 3.1 },
8178
dies_ok { my Ordered $o = 42 => 23 },
8279
'subset of pair with where enforces where clause';
8380

81+
#?rakudo todo 'Seq not implemented in nom'
8482
subset Subseq of Seq;
8583
lives_ok { my Subseq $tsil = <a b c>.Seq },
8684
'can create subset of Seq';
8785

86+
#?rakudo todo 'Seq not yet implemented in nom'
8887
subset FewOdds of Seq where { 2 > .grep: { $_ % 2 } }
8988
lives_ok { my FewOdds $fe = <78 99 24 36>.Seq },
9089
'can create subset of Seq with where';
@@ -128,7 +127,6 @@ dies_ok { my Digit $x = 3.1 },
128127
try { $rt67256 = -42 }
129128

130129
ok $! ~~ Exception, 'subset of Int enforces where clause';
131-
#?rakudo todo 'RT #67256'
132130
ok "$!" ~~ / RT67256 /, 'error for bad assignment mentions subset';
133131
}
134132

@@ -143,21 +141,19 @@ dies_ok { my Digit $x = 3.1 },
143141

144142
# RT #74234
145143
{
146-
#?rakudo todo 'RT 74234'
147144
eval_lives_ok 'subset A of Mu; my A $x = 23;',
148145
'subset A of Mu + type check and assignment works';
149146
}
150147

151148
# RT #77356
152-
#?rakudo skip 'RT 77356'
153149
{
154150
sub limit() { 0 }
155151
subset aboveLexLimit of Int where { $_ > limit() };
156152
ok 1 ~~ aboveLexLimit, 'can use subset that depends on lexical sub (1)';
157153
nok -1 ~~ aboveLexLimit, 'can use subset that depends on lexical sub (2)';
158154
}
159155

160-
#?rakudo skip 'RT 77356'
156+
# RT # 77356
161157
{
162158
my $limit = 0;
163159
subset aboveLexVarLimit of Int where { $_ > $limit };
@@ -166,7 +162,6 @@ dies_ok { my Digit $x = 3.1 },
166162
}
167163

168164
subset Bug::RT80930 of Int where { $_ %% 2 };
169-
#?rakudo todo 'RT 80930'
170165
lives_ok { my Bug::RT80930 $rt80930 }, 'subset with "::" in the name';
171166

172167

0 commit comments

Comments
 (0)