[svn:parrot] r41894 - in branches/auto_libjit: config/auto t/steps/auto

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Sat Oct 17 03:13:14 UTC 2009


Author: jkeenan
Date: Sat Oct 17 03:13:10 2009
New Revision: 41894
URL: https://trac.parrot.org/parrot/changeset/41894

Log:
t/steps/auto/frames-01.t:  Conform to new code in internal method
_call_frames_buildable().
config/auto/frames.pm:  Delete 3 statements no longer needed.

Modified:
   branches/auto_libjit/config/auto/frames.pm
   branches/auto_libjit/t/steps/auto/frames-01.t

Modified: branches/auto_libjit/config/auto/frames.pm
==============================================================================
--- branches/auto_libjit/config/auto/frames.pm	Sat Oct 17 00:11:12 2009	(r41893)
+++ branches/auto_libjit/config/auto/frames.pm	Sat Oct 17 03:13:10 2009	(r41894)
@@ -40,9 +40,6 @@
 
 sub _call_frames_buildable {
     my $conf = shift;
-    my $osname  = $conf->data->get('osname');
-    my $cpuarch = $conf->data->get('cpuarch');
-    my $nvsize  = $conf->data->get('nvsize');
     my $can_build_call_frames;
 
     if (defined $conf->options->get('buildframes')) {

Modified: branches/auto_libjit/t/steps/auto/frames-01.t
==============================================================================
--- branches/auto_libjit/t/steps/auto/frames-01.t	Sat Oct 17 00:11:12 2009	(r41893)
+++ branches/auto_libjit/t/steps/auto/frames-01.t	Sat Oct 17 03:13:10 2009	(r41894)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 23;
+use Test::More tests => 24;
 use lib qw( lib t/configure/testlib );
 use_ok('config::init::defaults');
 use_ok('config::auto::frames');
@@ -33,18 +33,24 @@
 $conf->options->set( %{$args} );
 my $step = test_step_constructor_and_description($conf);
 
-# To avoid a warning about an unitialized value, we will set nvsize to 8,
-# cpuarch to i386 and osname to linux.
+# To avoid a warning about an uninitialized value, we will set osname to linux.
 # This is normally done during earlier configuration steps.
-$conf->data->set( nvsize => 8 );
-$conf->data->set( cpuarch => 'i386' );
 $conf->data->set( osname => 'linux' );
 
+$conf->data->set( HAS_LIBJIT => 1 );
 my $ret = $step->runstep($conf);
 ok( $ret, "runstep() returned true value" );
 ok( defined ( $step->result() ),
     "Got defined result" );
 is( $step->result(), 'yes', "Result is 'yes', as expected" );
+
+$conf->data->set( HAS_LIBJIT => undef );
+$ret = $step->runstep($conf);
+ok( $ret, "runstep() returned true value" );
+ok( defined ( $step->result() ),
+    "Got defined result" );
+is( $step->result(), 'no', "Result is 'no', as expected" );
+
 $conf->cc_clean();
 $step->set_result( undef );
 
@@ -64,39 +70,22 @@
 ok( ! $can_build_call_frames,
     "_call_frames_buildable() returned false value, as expected" );
 
+$conf->data->set( HAS_LIBJIT => 1 );
 $conf->options->set( buildframes => undef );
-$conf->data->set( osname =>  'linux' );
-$conf->data->set( cpuarch =>  'i386' );
-$conf->data->set( nvsize =>  8 );
 $can_build_call_frames = auto::frames::_call_frames_buildable($conf);
 ok( $can_build_call_frames,
-    "_call_frames_buildable() returned true value, as expected (i386/non darwin/8)" );
-
-$conf->data->set( osname =>  'darwin' );
-$conf->data->set( cpuarch =>  'i386' );
-$conf->data->set( nvsize =>  8 );
-$can_build_call_frames = auto::frames::_call_frames_buildable($conf);
-ok( ! $can_build_call_frames,
-    "_call_frames_buildable() returned false value, as expected (i386/darwin/8)" );
-
-$conf->data->set( osname =>  'linux' );
-$conf->data->set( cpuarch =>  'ppc' );
-$conf->data->set( nvsize =>  8 );
-$can_build_call_frames = auto::frames::_call_frames_buildable($conf);
-ok( ! $can_build_call_frames,
-    "_call_frames_buildable() returned false value, as expected (ppc/linux/8)" );
+    "_call_frames_buildable() returned true value, as expected" );
 
-$conf->data->set( osname =>  'linux' );
-$conf->data->set( cpuarch =>  'i386' );
-$conf->data->set( nvsize =>  4 );
+$conf->data->set( HAS_LIBJIT => undef );
+$conf->options->set( buildframes => 0 );
 $can_build_call_frames = auto::frames::_call_frames_buildable($conf);
 ok( ! $can_build_call_frames,
-    "_call_frames_buildable() returned false value, as expected (i386/linux/4)" );
+    "_call_frames_buildable() returned false value, as expected" );
 
 ##### _handle_call_frames_buildable() #####
 
-$conf->data->set( nvsize => 8 );
-$conf->data->set( cpuarch => 'i386' );
+#$conf->data->set( nvsize => 8 );
+#$conf->data->set( cpuarch => 'i386' );
 $conf->data->set( osname => 'linux' );
 
 my $rv;


More information about the parrot-commits mailing list