Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec] clean up of S29-num/rounders.t

 * remove rakudo cludge, it now handles nested arrays sufficiently well
 * replace "$array[0]" interpolation by "{$array[0]}" for poor compilers
   that don't do one-pass-parsing yet
 * use numeric comparison for numeric values


git-svn-id: http://svn.pugscode.org/pugs@22995 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 62910e69ea62503e961040171861a605bf2549b7 1 parent 813e945
moritz authored
Showing with 3 additions and 22 deletions.
  1. +3 −22 S29-num/rounders.t
View
25 S29-num/rounders.t
@@ -33,37 +33,18 @@ my %tests =
#?pugs emit exit;
#?pugs emit }
-# XXX rakudo has a bug with list flattening that prevents us from
-# running the tests, and I haven't found a way to work around it without
-# breaking the test for pugs. So here is our cheating version rakudo.
-# Will stop working once list assignment is fixed
-
-#?rakudo emit for %tests.keys.sort -> $type {
-#?rakudo emit my @subtests = %tests{$type};
-#?rakudo emit for @subtests -> $t, $ref {
-#?rakudo emit my $code = "{$type}($t)";
-#?rakudo emit my $res = eval $code;
-#?rakudo emit if ($!) {
-#?rakudo emit flunk("failed to parse $code ($!)");
-#?rakudo emit } else {
-#?rakudo emit ok($res == $ref, "$code == $ref");
-#?rakudo emit };
-#?rakudo emit };
-#?rakudo emit };
-#?rakudo emit
-#?rakudo emit exit 1;
-
for %tests.keys.sort -> $type {
my @subtests = @(%tests{$type}); # XXX .[] doesn't work yet!
for @subtests -> $test {
- my $code = "{$type}($test[0])";
+ my $code = "{$type}({$test[0]})";
+# say $code;
my $res = eval($code);
if ($!) {
#?pugs todo 'feature'
flunk("failed to parse $code ($!)");
} else {
- is($res, $test[1], "$code == $test[1]");
+ ok($res == $test[1], "$code == {$test[1]}");
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.