Ticket #1124 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

t/op/arithmetics_pmc.t is skipping bigint/bignum test even when gmp is available

Reported by: mikehh Owned by:
Priority: normal Milestone:
Component: testing Version: 1.6.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

The test t/op/arithmetics_pms.t is skipping bigint/bignum test even when gmp is available

the relevant code is:

.sub main :main
    .include 'test_more.pir'
    .include "iglobals.pasm"

    plan(68)

    # Don't check BigInt or BigNum without gmp
    .local pmc interp     # a handle to our interpreter object.
    interp = getinterp
    .local pmc config
    config = interp[.IGLOBALS_CONFIG_HASH]
    .local int gmp
    gmp = config['gmp']

    run_tests_for('Integer')
    run_tests_for('Float')

    if gmp goto do_big_ones
        skip( 34, "will not test BigInt or BigNum without gmp" )
        goto end

  do_big_ones:
    run_tests_for('BigInt')
    run_tests_for('BigNum')

  end:
.end

in t/pmc/bigint.t we have:

if ( $PConfig{gmp} ) {
    plan tests => 44;
}
else {
    plan skip_all => "No BigInt Lib configured";
}

which works fine for me, so in this instance $PConfig{gmp} is defined

whereas in the pir code it is not picking it up.

checking further

if I can just figure out how to iterate over and list the key/value pairs from config = interp[.IGLOBALS_CONFIG_HASH]

Change History

Changed 5 years ago by mikehh

ok the value of $PConfig {gmp} is 'defined' which is a string not an integer

changing .local int gmp to .local string gmp gets the test to pass

commit r41949

will see if this works on other platforms before closing the ticket

Changed 5 years ago by dukeleto

This works on darwin/x86 for me.

Changed 5 years ago by dukeleto

  • summary changed from t/op/arithmetics_pms.t is skipping bigint/bignum test even when gmp is available to t/op/arithmetics_pmc.t is skipping bigint/bignum test even when gmp is available

Changed 5 years ago by mikehh

  • status changed from new to closed
  • resolution set to fixed

This appears to be working now - closing ticket

Note: See TracTickets for help on using tickets.