Skip to content
This repository
branch: nqp-p6
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 37 lines (32 sloc) 0.779 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#!./parrot
# Copyright (C) 2011, Parrot Foundation.

.sub main :main
    .include 'test_more.pir'
    plan(3)

    .include "iglobals.pasm"
    .local pmc config_hash, interp
    .local pmc d, l, r
    interp = getinterp
    config_hash = interp[.IGLOBALS_CONFIG_HASH]
    $S0 = config_hash['gmp']
    unless $S0 goto no_bigint

    $P0 = loadlib "foo_group"
    ok(1, 'inherited add - loadlib')
    l = new "Foo"
    l = 42
    r = new 'BigInt'
    r = 0x7ffffff
    d = new 'Undef'
    add d, l, r
    is(d, 134217769, 'inherited add')
    $S0 = typeof d
    is($S0, 'BigInt', 'inherited add - typeof')
    .return()
  no_bigint:
    skip( 3, 'No BigInt Lib configured' )
.end

# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Something went wrong with that request. Please try again.