Skip to content

Commit

Permalink
fudge and unfudge tests for rakudo
Browse files Browse the repository at this point in the history
also switches to planless testing in S32-num/stringify.t, because
functions that run several tests are hard to fudge.
  • Loading branch information
moritz committed Mar 13, 2013
1 parent ee9b043 commit fdb4719
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion S03-junctions/autothreading.t
Expand Up @@ -334,7 +334,6 @@ plan 89;
# into:
# all( any( tp("dog", 1, 10), tp("dog", 2, 10),
# any( tp("dog", 1, 20), tp("dog", 2, 20)))
#?rakudo todo 'junction autothreading order'
is $res.Str, q{all(any("dog 1 10", "dog 2 10"), any("dog 1 20", "dog 2 20"))}, "an & junction right of a | junction will be autothreaded first";

$res = tp("foo"&"bar", 1|2, 0);
Expand Down
2 changes: 0 additions & 2 deletions S03-junctions/misc.t
Expand Up @@ -67,7 +67,6 @@ sub jok(Mu $condition, $msg?) { ok ?($condition), $msg };


# test junction to junction
#?rakudo todo 'nom regression'
jok(('a' | 'b' | 'c') eq ($a & $b & $c), 'junction ("a" | "b" | "c") matches junction ($a & $b & $c)');
jok(('a' & 'b' & 'c') eq ($a | $b | $c), 'junction ("a" & "b" & "c") matches junction ($a | $b | $c)');

Expand Down Expand Up @@ -166,7 +165,6 @@ sub j (Mu $j) { return $j.perl }

$got = ((1|2) + (3&4));
$want = ((4|5) & (5|6));
#?rakudo todo 'nom regression'
is( j($got), j($want), 'thread + returning junctive combination of results');

# L<S03/Junctive operators/This opens doors for constructions like>
Expand Down
6 changes: 4 additions & 2 deletions S32-num/stringify.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 115;
plan *;

# L<S32::Numeric/Complex/"=item gist">

Expand Down Expand Up @@ -57,7 +57,6 @@ sub Rat_str_test($value, $str_nucleus, $str, $perl = $str) {
is $value.Str, $str, "<$str_nucleus>.Str";
#?pugs skip '.gist'
is $value.gist, $str, "<$str_nucleus>.gist";
#?rakudo todo 'Rat.perl'
#?pugs todo
is $value.perl, $perl, "<$str_nucleus>.perl";

Expand All @@ -76,11 +75,13 @@ Rat_str_test 1/1, '1/1', '1', '1.0';
Rat_str_test 13/39, '1/3', '0.333333', '<1/3>';
Rat_str_test 1000001/10000, '1000001/10000', '100.0001';
Rat_str_test -1000001/10000, '-1000001/10000', '-100.0001';
#?rakudo skip 'big stuff'
Rat_str_test 555555555555555555555555555555555555555555555/5,
'555555555555555555555555555555555555555555555/5',
'111111111111111111111111111111111111111111111',
'111111111111111111111111111111111111111111111.0';
# Bignum sanity
#?rakudo skip 'big stuff'
Rat_str_test (4.5 ** 60),
'1797010299914431210413179829509605039731475627537851106401/1152921504606846976',
'1558657976916843360832062017400788597510.058834953945635510598466400011830046423710882663726806640625';
Expand All @@ -95,3 +96,4 @@ lives_ok { Rat.Str }, 'Rat.Str does not die';
# TODO: FatRat, Num (once better specced), Int (maybe, but hard to mess up)

# vim: ft=perl6
done;

0 comments on commit fdb4719

Please sign in to comment.