Skip to content

Commit

Permalink
Test we don't curry HyperWhatever:Us
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Feb 11, 2018
1 parent ceed491 commit dbe43e1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions S02-types/hyperwhatever.t
@@ -0,0 +1,24 @@
use v6;
use Test;

# Tests for the HyperWhatever type and its curries

plan 2;

# RT#128880
throws-like HyperWhatever.new, X::Cannot::New,
'.new throws that it cannot be called';

# https://github.com/rakudo/rakudo/issues/1489
subtest 'smartmatch with HyperWhatever type object' => {
plan 6;
is-deeply (HyperWhatever ~~ HyperWhatever), True, 'HW (true)';
is-deeply (42 ~~ HyperWhatever), False, 'HW (false)';
is-deeply (HyperWhatever ~~ HyperWhatever:U), True, 'HW:U (true)';
is-deeply ('meows' ~~ HyperWhatever:U), False, 'HW:U (false)';
is-deeply (((**)) ~~ HyperWhatever:D), True, 'HW:D (true)';
is-deeply (((*)) ~~ HyperWhatever:D), False, 'HW:D (false)';
}


# vim: ft=perl6

0 comments on commit dbe43e1

Please sign in to comment.