[svn:parrot] r36575 - in trunk/t: op pmc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Wed Feb 11 09:41:16 UTC 2009
Author: chromatic
Date: Wed Feb 11 09:41:16 2009
New Revision: 36575
URL: https://trac.parrot.org/parrot/changeset/36575
Log:
[t] Marked -0.0 tests as TODO instead of failing on MSWin32 and OpenBSD, per
comments on TT #313. This reverts and supersedes r36574.
Modified:
trunk/t/op/arithmetics.t
trunk/t/pmc/complex.t
trunk/t/pmc/float.t
Modified: trunk/t/op/arithmetics.t
==============================================================================
--- trunk/t/op/arithmetics.t Wed Feb 11 09:14:02 2009 (r36574)
+++ trunk/t/op/arithmetics.t Wed Feb 11 09:41:16 2009 (r36575)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2001-2008, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
use strict;
@@ -169,22 +169,12 @@
# Operations on a single NUMVAL
#
-my $output = <<OUTPUT;
--0
-0
--123.456789
-123.456789
--0
-0
--123.456789
-123.456789
-OUTPUT
-
-if ($^O =~ m/openbsd|win32/i) {
- $output =~ s/-0$/0/mg;
-}
+TODO: {
+ my @todo;
+ @todo = ( todo => '-0.0 not implemented, TT #313' )
+ if $^O =~ m/(?:openbsd|win32)/i;
-pasm_output_is( <<'CODE', $output, "turn a native number into its negative" );
+pasm_output_is( <<'CODE', <<OUTPUT, 'negate a native number', @todo );
set N0, 0
neg N0
print N0
@@ -220,6 +210,17 @@
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
Modified: trunk/t/pmc/complex.t
==============================================================================
--- trunk/t/pmc/complex.t Wed Feb 11 09:14:02 2009 (r36574)
+++ trunk/t/pmc/complex.t Wed Feb 11 09:41:16 2009 (r36575)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
=head1 NAME
@@ -718,6 +718,28 @@
is( $S3, $S1, $S4 )
.endm
+.macro complex_op_todo( val, res, op )
+ $P1 = new ['Complex']
+ $P2 = new ['Complex']
+ set $P1, .val
+
+ set $S0, .val
+ set $S1, .res
+ set $S2, .op
+
+ #XXX: can't do $P1.'$S2'()
+ $P2 = $P1. $S2()
+ $S3 = sprintf "%f%+fi", $P2
+
+ concat $S4, $S2, " of "
+ concat $S4, $S4, $S0
+
+ $I0 = cmp_str $S1, $S3
+ $I0 = not $I0
+
+ todo( $I0, $S4 )
+.endm
+
.sub ln_of_complex_numbers
.complex_op_is("-2+0i", "0.693147+3.141593i", 'ln' )
.complex_op_is("-1+0i", "0.000000+3.141593i", 'ln' )
@@ -1041,14 +1063,16 @@
.complex_op_is("-2+3i", "3.590565+0.530921i", 'sinh' )
.complex_op_is("-2-3i", "3.590565-0.530921i", 'sinh' )
- eq osname, "openbsd", fail
- eq osname, "MSWin32", fail
+ eq osname, "openbsd", todo
+ eq osname, "MSWin32", todo
.complex_op_is("0-2i", "-0.000000-0.909297i", 'sinh' )
.complex_op_is("0+2i", "-0.000000+0.909297i", 'sinh' )
.return()
-fail:
- skip( 2, 'sinh 0+2i, sinh 0-2i failing on your platform' )
+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' )
+ .return()
.end
.sub cosh_of_complex_numbers
Modified: trunk/t/pmc/float.t
==============================================================================
--- trunk/t/pmc/float.t Wed Feb 11 09:14:02 2009 (r36574)
+++ trunk/t/pmc/float.t Wed Feb 11 09:41:16 2009 (r36575)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2001-2006, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
use strict;
@@ -503,18 +503,21 @@
ok 2
OUTPUT
-my $output = '-0';
-if ($^O =~ m/openbsd|win32/i) {
- $output =~ s/-0$/0/mg;
-}
+TODO: {
+ my @todo;
+ @todo = ( todo => '-0.0 not implemented, TT #313' )
+ if $^O =~ m/(?:openbsd|win32)/i;
-pasm_output_is( << 'CODE', $output, "neg 0" );
+pasm_output_like( <<'CODE', <<'OUTPUT', 'neg 0', @todo );
new P0, ['Float']
set P0, 0.0
neg P0
- print P0
+ print P0
end
CODE
+/^-0/
+OUTPUT
+}
pasm_output_is( << 'CODE', << 'OUTPUT', "Equality" );
new P0, ['Float']
More information about the parrot-commits
mailing list