[svn:parrot] r44657 - trunk/t/op

particle at svn.parrot.org particle at svn.parrot.org
Fri Mar 5 17:56:28 UTC 2010


Author: particle
Date: Fri Mar  5 17:56:26 2010
New Revision: 44657
URL: https://trac.parrot.org/parrot/changeset/44657

Log:
[t] check for 'has_negative_zero' in config, rather than guessing at platform support

Modified:
   trunk/t/op/arithmetics.t

Modified: trunk/t/op/arithmetics.t
==============================================================================
--- trunk/t/op/arithmetics.t	Fri Mar  5 17:32:13 2010	(r44656)
+++ trunk/t/op/arithmetics.t	Fri Mar  5 17:56:26 2010	(r44657)
@@ -19,6 +19,7 @@
 
 .sub main :main
     .include 'test_more.pir'
+    .include 'iglobals.pasm'
 
     plan(130)
 
@@ -153,18 +154,21 @@
 # print -0.0 as -0
 #
 .sub negate_minus_zero_point_zero
-    .include 'sysinfo.pasm'
-    $S9 = sysinfo .SYSINFO_PARROT_OS
+    .local pmc interp, config_hash
+    .local string has_negative_zero
+    interp = getinterp
+    config_hash = interp[.IGLOBALS_CONFIG_HASH]
+    has_negative_zero = config_hash['has_negative_zero']
 
     set $N0, 0
     neg $N0
     $S0 = $N0
-    if $S9 == 'MSWin32' goto Todo_test1
+    unless has_negative_zero goto Todo_test1
     is( $S0, "-0", '1' )
     goto End_test1
 Todo_test1:
     $I0 = $S0 == "-0"
-    todo($I0, 'Faulty on this platform')
+    todo($I0, 'negative zero, TT #313')
 End_test1:
 
     set $N0, -0.0
@@ -181,12 +185,12 @@
     set $N1, 1
     neg $N1, $N0
     $S0 = $N1
-    if $S9 == 'MSWin32' goto Todo_test4
+    unless has_negative_zero goto Todo_test4
     is( $S0, "-0", '4' )
     goto End_test4
 Todo_test4:
     $I0 = $S0 == "-0"
-    todo($I0, 'Faulty on this platform')
+    todo($I0, 'negative zero, TT #313')
 End_test4:
 .end
 


More information about the parrot-commits mailing list