Skip to content

Commit 44efcc5

Browse files
committed
rename S02-types/enum.t to S12-enums/misc.t and delete lots of crufty tests
1 parent 55a2c9b commit 44efcc5

File tree

2 files changed

+40
-157
lines changed

2 files changed

+40
-157
lines changed

S02-types/enum.t

Lines changed: 0 additions & 157 deletions
This file was deleted.

S12-enums/misc.t

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
use v6;
2+
3+
use Test;
4+
5+
# RT #63826
6+
{
7+
class EnumClass { enum C <a b c> }
8+
is +EnumClass::C::a, 0, 'enum element in class has the right value';
9+
10+
module EnumModule { enum M <a b c> }
11+
is +EnumModule::M::b, 1, 'enum element in module has the right value';
12+
13+
package EnumPackage { enum P <a b c> }
14+
is +EnumPackage::P::c, 2, 'enum element in package has the right value';
15+
16+
role EnumRole { enum R <a b c> }
17+
#?rakudo skip 'RT 63826'
18+
is +EnumRole::R::a, 0, 'enum element in role has the right value';
19+
20+
grammar EnumGrammar { enum G <a b c> }
21+
is +EnumGrammar::G::b, 1, 'enum element in grammar has the right value';
22+
}
23+
24+
# RT 66648
25+
{
26+
enum RT66648 <a b c>;
27+
dies_ok { RT66648.c }, 'die attempting to access enum item as method';
28+
}
29+
30+
# RT #70894
31+
32+
{
33+
enum SomeEnum <a b c>;
34+
lives_ok {SomeEnum::.keys}, 'keys on enum stash works';
35+
36+
}
37+
38+
done;
39+
40+
# vim: ft=perl6

0 commit comments

Comments
 (0)