Skip to content

Commit

Permalink
fix bignum.t, Coke++
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed May 3, 2012
1 parent d3e4fa6 commit 8f67a19
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions t/pmc/bignum.t
Expand Up @@ -137,7 +137,7 @@ pir_output_is( <<'CODE', <<'OUT', "clone equality" );
clone $P1, $P0
set $N0, $P0
set $N1, $P1
.fp_eq_pir($N0, $N1, OK1)
.fp_eq($N0, $N1, OK1)
print "not "
OK1:print "ok\n"
end
Expand All @@ -153,14 +153,14 @@ pir_output_is( <<'CODE', <<'OUT', "inc/dec" );
set $P0, 5.5
inc $P0
set $N0, $P0
.fp_eq_pir($N0, 6.5, OK1)
.fp_eq($N0, 6.5, OK1)
print "not "
OK1:say "ok 1"
set $P0, 5.5
dec $P0
set $N0, $P0
.fp_eq_pir($N0, 4.5, OK2)
.fp_eq($N0, 4.5, OK2)
print "not "
OK2:say "ok 2"
end
Expand All @@ -176,25 +176,25 @@ pir_output_is( <<'CODE', <<'OUT', "set int, get double" );
new $P0, ['BigNum']
set $P0, 999999
set $N1, $P0
.fp_eq_pir($N1, 999999.0, OK1)
.fp_eq($N1, 999999.0, OK1)
print "not "
OK1: say "ok 1"
set $P0, -999999
set $N1, $P0
.fp_eq_pir($N1, -999999.0, OK2)
.fp_eq($N1, -999999.0, OK2)
print "not "
OK2: say "ok 2"
set $P0, 2147483646
set $N1, $P0
.fp_eq_pir($N1, 2.147483646e9, OK3)
.fp_eq($N1, 2.147483646e9, OK3)
print "not "
OK3: say "ok 3"
set $P0, -2147483646
set $N1, $P0
.fp_eq_pir($N1, -2.147483646e9, OK4)
.fp_eq($N1, -2.147483646e9, OK4)
print "not "
OK4: say "ok 4"
end
Expand Down Expand Up @@ -450,7 +450,7 @@ pir_output_is( <<'CODE', <<'OUTPUT', "i_subtract", todo => 'undiagnosed bug in i
set $P1, 99.5
sub $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 300.5, OK1)
.fp_eq($N0, 300.5, OK1)
print "not "
OK1:say "ok 1"
Expand All @@ -459,7 +459,7 @@ OK1:say "ok 1"
set $P1, -50
sub $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 150.0, OK2)
.fp_eq($N0, 150.0, OK2)
print "not "
OK2:say "ok 2"
Expand All @@ -468,7 +468,7 @@ OK2:say "ok 2"
set $P1, 24.5
sub $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 25.5, OK3)
.fp_eq($N0, 25.5, OK3)
print "not "
OK3:say "ok 3"
Expand All @@ -484,14 +484,14 @@ THROWN:
set $P0, 40
sub $P0, 4
set $N0, $P0
.fp_eq_pir($N0, 36.0, OK5)
.fp_eq($N0, 36.0, OK5)
print "not "
OK5:say "ok 5"
set $P0, 40
sub $P0, 1.0
set $N0, $P0
.fp_eq_pir($N0, 39.0, OK6)
.fp_eq($N0, 39.0, OK6)
print "not "
OK6:say "ok 6"
end
Expand Down Expand Up @@ -742,7 +742,7 @@ pir_output_is( <<'CODE', <<'OUT', "i_divide" );
set $P1, 5000000000
div $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 2.0, OK1)
.fp_eq($N0, 2.0, OK1)
print "not "
OK1:say "ok 1"
Expand All @@ -751,7 +751,7 @@ OK1:say "ok 1"
set $P1, 4
div $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 2.5, OK2)
.fp_eq($N0, 2.5, OK2)
print "not "
OK2:say "ok 2"
Expand All @@ -760,7 +760,7 @@ OK2:say "ok 2"
set $P1, 1.5
div $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 4.0, OK3)
.fp_eq($N0, 4.0, OK3)
print "not "
OK3:say "ok 3"
Expand All @@ -776,7 +776,7 @@ THROWN:
set $P0, 10
div $P0, -5
set $N0, $P0
.fp_eq_pir($N0, -2.0, OK4)
.fp_eq($N0, -2.0, OK4)
print "not "
OK4:say "ok 4"
end
Expand All @@ -798,7 +798,7 @@ pir_output_is( <<'CODE', <<'OUT', "floor_divide", todo => 'undiagnosed bug in fl
set $P1, 4
fdiv $P0, $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 2.0, OK1)
.fp_eq($N0, 2.0, OK1)
print "not "
OK1:say "ok 1"
Expand All @@ -814,7 +814,7 @@ THROWN:
fdiv $P0, $P0, -4
set $N0, $P0
say $N0
.fp_eq_pir($N0, -2.0, OK2)
.fp_eq($N0, -2.0, OK2)
print "not "
OK2:say "ok 2"
Expand All @@ -823,7 +823,7 @@ OK2:say "ok 2"
set $P1, 4
fdiv $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 2.0, OK3)
.fp_eq($N0, 2.0, OK3)
print "not "
OK3:say "ok 3"
Expand All @@ -832,7 +832,7 @@ OK3:say "ok 3"
set $P1, 4
fdiv $P0, $P1
set $N0, $P0
.fp_eq_pir($N0, 5.0, OK4)
.fp_eq($N0, 5.0, OK4)
print "not "
OK4:say "ok 4"
Expand All @@ -847,7 +847,7 @@ THROWN2:
set $P0, 10
fdiv $P0, 4
set $N0, $P0
.fp_eq_pir($N0, 2.0, OK5)
.fp_eq($N0, 2.0, OK5)
print "not "
OK5:say "ok 5"
end
Expand Down

0 comments on commit 8f67a19

Please sign in to comment.