[svn:parrot] r37147 - in trunk: config/auto t/steps

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Sat Mar 7 00:30:14 UTC 2009


Author: jkeenan
Date: Sat Mar  7 00:30:12 2009
New Revision: 37147
URL: https://trac.parrot.org/parrot/changeset/37147

Log:
We should call '$conf->data->set( has_negative_zero => $has_neg_0 );' in only
one location:  just before the close of runstep().  Either we'll assign the
original value of $has_neg_0 -- 0 -- or we'll assign the return value of
_evaluate_cc_run().  Eliminate two tests as consequence.

Modified:
   trunk/config/auto/neg_0.pm
   trunk/t/steps/auto_neg_0-01.t

Modified: trunk/config/auto/neg_0.pm
==============================================================================
--- trunk/config/auto/neg_0.pm	Fri Mar  6 13:07:12 2009	(r37146)
+++ trunk/config/auto/neg_0.pm	Sat Mar  7 00:30:12 2009	(r37147)
@@ -57,7 +57,6 @@
     my ($conf, $test, $has_neg_0, $verbose) = @_;
     $has_neg_0 = ($test =~ m/^-0/ ? 1 : 0);
     $self->set_result( $has_neg_0 ? 'yes' : 'no' );
-    $conf->data->set( has_negative_zero => $has_neg_0 );
     print $has_neg_0 ? ' (yes) ' : ' (no) ' if $verbose;
     return $has_neg_0;
 }

Modified: trunk/t/steps/auto_neg_0-01.t
==============================================================================
--- trunk/t/steps/auto_neg_0-01.t	Fri Mar  6 13:07:12 2009	(r37146)
+++ trunk/t/steps/auto_neg_0-01.t	Sat Mar  7 00:30:12 2009	(r37147)
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 21;
+use Test::More tests => 19;
 use Carp;
 
 use lib qw( lib t/configure/testlib );
@@ -68,8 +68,6 @@
     '_evaluate_cc_run() completed satisfactorily' );
 
 is( $step->result(), 'yes', 'Got expected result');
-is( $conf->data->get('has_negative_zero'), 1,
-    'has_negative_zero set as expected' );
 
 $d_neg_0 = '0';
 
@@ -77,9 +75,6 @@
     '_evaluate_cc_run() completed satisfactorily' );
 is( $step->result(), 'no', 'Got expected result' );
 
-is( $conf->data->get('has_negative_zero'), 0,
-    "has_negative_zero set as expected" );
-
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################


More information about the parrot-commits mailing list