File tree Expand file tree Collapse file tree 2 files changed +40
-157
lines changed Expand file tree Collapse file tree 2 files changed +40
-157
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments