Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moving test for RT #75370 to S12-enums/basic.t
it lived in S02-names/75370.t which was not included in t/spectest.data
test was added with b4fc0fe
  • Loading branch information
usev6 committed Sep 30, 2014
1 parent a0bf974 commit f8e0c0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
8 changes: 0 additions & 8 deletions S02-names/75370.t

This file was deleted.

11 changes: 9 additions & 2 deletions S12-enums/basic.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 34;
plan 35;

# Very basic enum tests

Expand Down Expand Up @@ -79,7 +79,7 @@ enum Color <white gray black>;
my Color $c1 = Color::white;
ok($c1 == 0, 'can assign enum value to typed variable with long name');
my Color $c2 = white;
ok($c1 == 0, 'can assign enum value to typed variable with short name');
ok($c2 == 0, 'can assign enum value to typed variable with short name');
dies_ok({ my Color $c3 = "for the fail" }, 'enum as a type enforces checks');

# conflict between subs and enums
Expand Down Expand Up @@ -113,4 +113,11 @@ dies_ok({ my Color $c3 = "for the fail" }, 'enum as a type enforces checks');
is T2.enums.keys.sort.join('|'), 'd|e|f', 'enum keys (2)';
}

# RT #75370
{
enum somenum <a b c d e>;
my somenum $temp = d;
ok $temp eq 'd', "RT #75370 enum name";
}

# vim: ft=perl6

0 comments on commit f8e0c0d

Please sign in to comment.