Skip to content

Commit

Permalink
Test can create enum with a Hash
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Dec 12, 2017
1 parent 7f55679 commit a2cec00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion S12-enums/basic.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 50;
plan 51;

# Very basic enum tests

Expand Down Expand Up @@ -237,4 +237,8 @@ subtest 'can provide enum values via Pairs' => {
is-deeply +RT130041-E, 24, '(5)';
}

# RT #130446
is-deeply do { BEGIN my %h = <a 1 b 2>; my enum Bits (%h); Bits.enums },
Map.new((:a<1>,:b<2>)), 'can create enum with a Hash';

# vim: ft=perl6

0 comments on commit a2cec00

Please sign in to comment.