On Mon, Mar 17, 2008 at 04:28:26AM -0700, James Keenan via RT wrote: > On Sun Mar 16 19:28:53 2008, kraai wrote: > > Howdy, > > > > t/examples/pasm.t fails because examples/pasm/fact.pasm now outputs 30 > > factorials, whereas the test case only expects it to output 6. > > > I was just at the point of filing a separate bug report on the failure > in t/examples/pasm.t when I saw your post. I applied your patch, but > got inconsistent results with it between Darwin and Linux. > > On Darwin, test #4 (the factorial test) once again passed. But on > Linux, this was my result: > > $ prove -v t/examples/pasm.tt/examples/pasm...... [snip test output] > > To the best of my memory, I have never installed a bigint library on > this Linux box; I'm not quite sure what that is. But, in any case, > shouldn't the test be smart enough to do the right thing in either case > (having or not having bigint)?
I had the development package for GMP installed (on Debian unstable, it's libgmp3-dev). Once I'd uninstalled it, the test failed for me too in the same way as it failed for you. The attached patch makes it skip the factorial test if GMP isn't available. There must be something wrong with the makefiles, though, because I had to perform a "make clean" and rebuild everything before the test would succeed after reinstalling GMP. > > t/perl/Parrot_IO.t fails because it skips the Subversion-specific > > tests only when run in a Subversion working copy. The attached patch > > fixes both problems. > > > > Perhaps because I'm usually working in a Subversion working copy, I > haven't experienced this error. So I did not test out this patch. Does this mean you will or won't check it in? -- Matt
diff --git a/t/examples/pasm.t b/t/examples/pasm.t index 3e74d0f..2b9e03b 100644 --- a/t/examples/pasm.t +++ b/t/examples/pasm.t @@ -34,40 +34,6 @@ F<t/examples/pir.t> # Set up expected output for examples my %expected = ( - 'fact.pasm' => << 'END_EXPECTED', -fact of 0 is: 1 -fact of 1 is: 1 -fact of 2 is: 2 -fact of 3 is: 6 -fact of 4 is: 24 -fact of 5 is: 120 -fact of 6 is: 720 -fact of 7 is: 5040 -fact of 8 is: 40320 -fact of 9 is: 362880 -fact of 10 is: 3628800 -fact of 11 is: 39916800 -fact of 12 is: 479001600 -fact of 13 is: 6227020800 -fact of 14 is: 87178291200 -fact of 15 is: 1307674368000 -fact of 16 is: 20922789888000 -fact of 17 is: 355687428096000 -fact of 18 is: 6402373705728000 -fact of 19 is: 121645100408832000 -fact of 20 is: 2432902008176640000 -fact of 21 is: 51090942171709440000 -fact of 22 is: 1124000727777607680000 -fact of 23 is: 25852016738884976640000 -fact of 24 is: 620448401733239439360000 -fact of 25 is: 15511210043330985984000000 -fact of 26 is: 403291461126605635584000000 -fact of 27 is: 10888869450418352160768000000 -fact of 28 is: 304888344611713860501504000000 -fact of 29 is: 8841761993739701954543616000000 -fact of 30 is: 265252859812191058636308480000000 -END_EXPECTED - 'hello.pasm' => << 'END_EXPECTED', Hello World END_EXPECTED @@ -114,6 +80,44 @@ END_EXPECTED ); +SKIP: { + skip( 'GMP is not available', 1 ) unless $PConfig{gmp}; + + $expected{'fact.pasm'} = << 'END_EXPECTED' +fact of 0 is: 1 +fact of 1 is: 1 +fact of 2 is: 2 +fact of 3 is: 6 +fact of 4 is: 24 +fact of 5 is: 120 +fact of 6 is: 720 +fact of 7 is: 5040 +fact of 8 is: 40320 +fact of 9 is: 362880 +fact of 10 is: 3628800 +fact of 11 is: 39916800 +fact of 12 is: 479001600 +fact of 13 is: 6227020800 +fact of 14 is: 87178291200 +fact of 15 is: 1307674368000 +fact of 16 is: 20922789888000 +fact of 17 is: 355687428096000 +fact of 18 is: 6402373705728000 +fact of 19 is: 121645100408832000 +fact of 20 is: 2432902008176640000 +fact of 21 is: 51090942171709440000 +fact of 22 is: 1124000727777607680000 +fact of 23 is: 25852016738884976640000 +fact of 24 is: 620448401733239439360000 +fact of 25 is: 15511210043330985984000000 +fact of 26 is: 403291461126605635584000000 +fact of 27 is: 10888869450418352160768000000 +fact of 28 is: 304888344611713860501504000000 +fact of 29 is: 8841761993739701954543616000000 +fact of 30 is: 265252859812191058636308480000000 +END_EXPECTED +} + while ( my ( $example, $expected ) = each %expected ) { example_output_is( "examples/pasm/$example", $expected ); }