Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fduge constant.t for rakudo

  • Loading branch information...
commit b35368dd03a94d7d0c3953d64a5751faee975253 1 parent 092ab84
@moritz moritz authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 S04-declarations/constant.t
View
6 S04-declarations/constant.t
@@ -35,6 +35,7 @@ use Test;
eval_dies_ok 'foo2 == 42', 'constants are lexically scoped';
}
+#?rakudo skip 'constants as type constraints'
{
constant foo3 = 42;
lives_ok { my foo3 $x = 42 }, 'constant can be used as a type constraint';
@@ -42,6 +43,7 @@ use Test;
dies_ok { my foo3 $x = 42; $x =43 }, 'constant used as a type constraint enforces';
}
+#?rakudo skip 'non-literal constants'
{
my $ok;
@@ -87,6 +89,7 @@ use Test;
ok $ok, "declaring a constant in terms of COMPILING constant works";
}
+#?rakudo skip 'constant hashes'
{
my $ok;
@@ -108,6 +111,7 @@ use Test;
ok $ok, "declaring a constant in terms of COMPILING hash constant works";
}
+#?rakudo skip 'array constants'
{
my $ok;
@@ -129,6 +133,7 @@ use Test;
ok $ok, "declaring a constant in terms of COMPILING hash constant works";
}
+#?rakudo skip 'typed constants'
{
my $ok;
@@ -229,7 +234,6 @@ use Test;
is $x, 64522, 'constant after += has not changed';
sub con { 64522 }
- #?rakudo todo '++constant_returning_sub()'
dies_ok { ++con }, "constant-returning sub won't increment";
is con, 64522, 'constant-returning sub after ++ has not changed';
}
Please sign in to comment.
Something went wrong with that request. Please try again.