File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ use v6 ;
2
+ use Test ;
3
+
4
+ # Tests for the HyperWhatever type and its curries
5
+
6
+ plan 2 ;
7
+
8
+ # RT#128880
9
+ throws-like 「 HyperWhatever.new」 , X::Cannot::New ,
10
+ ' .new throws that it cannot be called' ;
11
+
12
+ # https://github.com/rakudo/rakudo/issues/1489
13
+ subtest ' smartmatch with HyperWhatever type object' => {
14
+ plan 6 ;
15
+ is-deeply (HyperWhatever ~~ HyperWhatever), True , ' HW (true)' ;
16
+ is-deeply (42 ~~ HyperWhatever), False , ' HW (false)' ;
17
+ is-deeply (HyperWhatever ~~ HyperWhatever: U ), True , ' HW:U (true)' ;
18
+ is-deeply (' meows' ~~ HyperWhatever: U ), False , ' HW:U (false)' ;
19
+ is-deeply (((** )) ~~ HyperWhatever: D ), True , ' HW:D (true)' ;
20
+ is-deeply (((* )) ~~ HyperWhatever: D ), False , ' HW:D (false)' ;
21
+ }
22
+
23
+
24
+ # vim: ft=perl6
You can’t perform that action at this time.
0 commit comments