[svn:parrot] r36579 - in trunk/t: op pmc
rurban at svn.parrot.org
rurban at svn.parrot.org
Wed Feb 11 12:56:27 UTC 2009
Author: rurban
Date: Wed Feb 11 12:56:26 2009
New Revision: 36579
URL: https://trac.parrot.org/parrot/changeset/36579
Log:
TT #313 win32 (mingw + msvc)
- split tests into todo and working
- fix complex todo error introduced by r36575
- clarify "inf is not platform-independent" for win32 msvc only, todo added
All win32 arithmetic tests should pass now
Modified:
trunk/t/op/arithmetics.t
trunk/t/pmc/complex.t
Modified: trunk/t/op/arithmetics.t
==============================================================================
--- trunk/t/op/arithmetics.t Wed Feb 11 12:11:32 2009 (r36578)
+++ trunk/t/op/arithmetics.t Wed Feb 11 12:56:26 2009 (r36579)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 28;
+use Parrot::Test tests => 29;
# test for GMP
use Parrot::Config;
@@ -166,7 +166,7 @@
OUTPUT
#
-# Operations on a single NUMVAL
+# print -0.0 as -0
#
TODO: {
@@ -174,7 +174,7 @@
@todo = ( todo => '-0.0 not implemented, TT #313' )
if $^O =~ m/(?:openbsd|win32)/i;
-pasm_output_is( <<'CODE', <<OUTPUT, 'negate a native number', @todo );
+pasm_output_is( <<'CODE', <<OUTPUT, 'negate -0.0', @todo );
set N0, 0
neg N0
print N0
@@ -183,6 +183,25 @@
neg N0
print N0
print "\n"
+ set N0, -0.0
+ neg N1, N0
+ print N1
+ print "\n"
+CODE
+-0
+0
+-0
+0
+OUTPUT
+
+}
+
+
+#
+# Operations on a single NUMVAL
+#
+
+pasm_output_is( <<'CODE', <<OUTPUT, 'negate a native number' );
set N0, 123.4567890
neg N0
print N0
@@ -196,10 +215,6 @@
neg N1, N0
print N1
print "\n"
- set N0, -0.0
- neg N1, N0
- print N1
- print "\n"
set N0, 123.4567890
neg N1, N0
print N1
@@ -210,18 +225,13 @@
print "\n"
end
CODE
--0
-0
-123.456789
123.456789
--0
0
-123.456789
123.456789
OUTPUT
-}
-
pasm_output_is( <<'CODE', <<OUTPUT, "take the absolute of a native number" );
set N0, 0
abs N0
@@ -913,8 +923,12 @@
OUTPUT
}
+TODO: {
+ my @todo;
+ @todo = ( todo => 'inf is not platform-independent' )
+ if $^O eq 'MSWin32' and $PConfig{cc} =~ /cl/i;
-pir_output_is( <<'CODE', <<OUTPUT, "Inf/NaN - basic arith" );
+pir_output_is( <<'CODE', <<OUTPUT, "Inf/NaN - basic arith", @todo );
.sub 'test' :main
$N0 = 'Inf'
say $N0
@@ -926,6 +940,7 @@
NaN
OUTPUT
+}
# Local Variables:
# mode: cperl
Modified: trunk/t/pmc/complex.t
==============================================================================
--- trunk/t/pmc/complex.t Wed Feb 11 12:11:32 2009 (r36578)
+++ trunk/t/pmc/complex.t Wed Feb 11 12:56:26 2009 (r36579)
@@ -718,7 +718,7 @@
is( $S3, $S1, $S4 )
.endm
-.macro complex_op_todo( val, res, op )
+.macro complex_op_todo( val, res, op, todo )
$P1 = new ['Complex']
$P2 = new ['Complex']
set $P1, .val
@@ -726,13 +726,14 @@
set $S0, .val
set $S1, .res
set $S2, .op
+ set $S3, .todo
#XXX: can't do $P1.'$S2'()
$P2 = $P1. $S2()
$S3 = sprintf "%f%+fi", $P2
- concat $S4, $S2, " of "
- concat $S4, $S4, $S0
+ concat $S5, $S2, " of "
+ concat $S5, $S5, $S4
$I0 = cmp_str $S1, $S3
$I0 = not $I0
@@ -1070,8 +1071,8 @@
.return()
todo:
- .complex_op_todo("0-2i", "-0.000000-0.909297i", 'sinh, TT #313' )
- .complex_op_todo("0+2i", "-0.000000+0.909297i", 'sinh, TT #313' )
+ .complex_op_todo("0-2i", "-0.000000-0.909297i", 'sinh', 'TT #313' )
+ .complex_op_todo("0+2i", "-0.000000+0.909297i", 'sinh', 'TT #313' )
.return()
.end
More information about the parrot-commits
mailing list