[svn:parrot] r41927 - branches/auto_libjit/t/steps/auto

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Sun Oct 18 14:24:19 UTC 2009


Author: jkeenan
Date: Sun Oct 18 14:24:19 2009
New Revision: 41927
URL: https://trac.parrot.org/parrot/changeset/41927

Log:
Add tests for previously untested branch.

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

Modified: branches/auto_libjit/t/steps/auto/frames-01.t
==============================================================================
--- branches/auto_libjit/t/steps/auto/frames-01.t	Sun Oct 18 14:21:03 2009	(r41926)
+++ branches/auto_libjit/t/steps/auto/frames-01.t	Sun Oct 18 14:24:19 2009	(r41927)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 24;
+use Test::More tests => 28;
 use lib qw( lib t/configure/testlib );
 use_ok('config::init::defaults');
 use_ok('config::auto::frames');
@@ -91,7 +91,6 @@
 my $rv;
 
 $can_build_call_frames = 0;
-
 $rv = $step->_handle_can_build_call_frames( $conf, $can_build_call_frames );
 ok( $rv, "_handle_can_build_call_frames() returned true value" );
 ok( ! $conf->data->get( 'cc_build_call_frames'),
@@ -103,6 +102,21 @@
 $conf->data->set( 'cc_build_call_frames' => undef );
 $conf->data->set( 'has_exec_protect' => undef );
 
+$can_build_call_frames = 1;
+my $realos = $conf->data->get( 'osname' );
+$conf->data->set( 'osname' => 'foobar' );
+$rv = $step->_handle_can_build_call_frames( $conf, $can_build_call_frames );
+ok( $rv, "_handle_can_build_call_frames() returned true value" );
+is( $conf->data->get( 'cc_build_call_frames'), '-DCAN_BUILD_CALL_FRAMES',
+    "cc_build_call_frames set to expected value" );
+is( $conf->data->get( 'has_exec_protect' ), 0,
+    "has_exec_protect is 0, as expected" );
+is( $step->result(), 'yes', "Result is 'yes', as expected" );
+
+$conf->data->set( 'cc_build_call_frames' => undef );
+$conf->data->set( 'has_exec_protect' => undef );
+$conf->data->set( 'osname' => $realos );
+
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################


More information about the parrot-commits mailing list