[svn:parrot] r36647 - trunk/t/steps
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Thu Feb 12 21:37:25 UTC 2009
Author: chromatic
Date: Thu Feb 12 21:37:24 2009
New Revision: 36647
URL: https://trac.parrot.org/parrot/changeset/36647
Log:
[t] Fixed unintialized value warnings generated by auto_neg configuration step
tests.
Modified:
trunk/t/steps/auto_neg_0-01.t
Modified: trunk/t/steps/auto_neg_0-01.t
==============================================================================
--- trunk/t/steps/auto_neg_0-01.t Thu Feb 12 21:30:08 2009 (r36646)
+++ trunk/t/steps/auto_neg_0-01.t Thu Feb 12 21:37:24 2009 (r36647)
@@ -5,10 +5,15 @@
use strict;
use warnings;
-use Test::More tests => 16;
+
+use Test::More tests => 21;
use Carp;
+
use lib qw( lib t/configure/testlib );
+
+use_ok('config::init::defaults');
use_ok('config::auto::neg_0');
+
use Parrot::Configure;
use Parrot::Configure::Options qw( process_options );
use Parrot::Configure::Test qw(
@@ -16,20 +21,21 @@
rerun_defaults_for_testing
test_step_constructor_and_description
);
-use IO::CaptureOutput qw| capture |;
+use IO::CaptureOutput 'capture';
########### regular ###########
my ($args, $step_list_ref) = process_options(
{
argv => [ ],
- mode => q{configure},
+ mode => 'configure',
}
);
my $conf = Parrot::Configure->new;
-my $pkg = q{auto::neg_0};
+test_step_thru_runstep( $conf, 'init::defaults', $args );
+my $pkg = 'auto::neg_0';
$conf->add_steps($pkg);
@@ -38,8 +44,8 @@
$conf->options->set( %{$args} );
my $step = test_step_constructor_and_description($conf);
my $ret = $step->runstep($conf);
-ok( $ret, "runstep() returned true value" );
-ok(defined($step->result()), "A result has been defined");
+ok( $ret, 'runstep() returned true value' );
+ok( defined $step->result(), 'A result has been defined');
$conf->replenish($serialized);
@@ -48,7 +54,7 @@
($args, $step_list_ref) = process_options(
{
argv => [ ],
- mode => q{configure},
+ mode => 'configure',
}
);
$conf->options->set( %{$args} );
@@ -56,19 +62,23 @@
my $d_neg_0;
-$d_neg_0 = q{-0};
-ok($step->_evaluate_cc_run($conf, $d_neg_0),
- "_evaluate_cc_run() completed satisfactorily");
-is($step->result(), q{yes}, "Got expected result");
-is($conf->data->get('has_negative_zero'), 1,
- "has_negative_zero set as expected");
-
-$d_neg_0 = q{0};
-ok(!$step->_evaluate_cc_run($conf, $d_neg_0),
- "_evaluate_cc_run() completed satisfactorily");
-is($step->result(), q{no}, "Got expected result");
-is($conf->data->get('has_negative_zero'), 0,
- "has_negative_zero set as expected");
+$d_neg_0 = '-0';
+
+ok( $step->_evaluate_cc_run($conf, $d_neg_0),
+ '_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';
+
+ok( !$step->_evaluate_cc_run($conf, $d_neg_0),
+ '_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");
More information about the parrot-commits
mailing list