Skip to content

Commit

Permalink
Update test to use get_results after invokecc
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/pcc_hackathon_6Mar10@44948 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bacek committed Mar 15, 2010
1 parent 977ed5a commit 75aa62c
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions t/pmc/nci.t
Expand Up @@ -452,8 +452,8 @@ OUTPUT
dlfunc P0, P1, "nci_dd", "dd"
print "dlfunced\n"
set_args "0", 4.0
get_results "0", N5
invokecc P0
get_results "0", N5
ne N5, 8.0, nok_1
print "ok 1\n"
end
Expand Down Expand Up @@ -523,8 +523,8 @@ OUTPUT
set N5, 12.0
set N6, 3.0
set_args "0,0", N5, N6
get_results "0", N5
invokecc P0
get_results "0", N5
ne N5, 4.0, nok_1
print "ok 1\n"
end
Expand All @@ -546,8 +546,8 @@ OUTPUT
set I5, 2
set I6, 3
set_args "0,0", I5, I6
get_results "0", I5
invokecc P0
get_results "0", I5
ne I5, 6, nok_1
print "ok 1\n"
end
Expand All @@ -569,8 +569,8 @@ OUTPUT
set I5, -2
set I6, 3
set_args "0,0", I5, I6
get_results "0", I5
invokecc P0
get_results "0", I5
ne I5, -6, nok_1
print "ok 1\n"
end
Expand All @@ -592,8 +592,8 @@ OUTPUT
set I5, 6
set I6, 7
set_args "0,0", I5, I6
get_results "0", I5
invokecc P0
get_results "0", I5
ne I5, 42, nok_1
print "ok 1\n"
end
Expand All @@ -614,8 +614,8 @@ OUTPUT
printerr "dlfunced\n"
set S5, "ko\n"
set_args "0", S5
get_results "0", I5
invokecc P0
get_results "0", I5
ne I5, 2, nok_1
printerr "ok 2\n"
end
Expand Down Expand Up @@ -669,8 +669,8 @@ OUTPUT
print "dlfunced\n"
set S5, "ko\n"
set_args "0", S5
get_results "0", S5
invokecc P0
get_results "0", S5
print S5
end
nok_1: print "nok 1\n"
Expand All @@ -694,8 +694,8 @@ loop:
dlfunc P0, P1, "nci_dd", "dd"
set N5, 77.0
set_args "0", 4.0
get_results "0", N5
invokecc P0
get_results "0", N5
ne N5, 8.0, nok_1
dec I10
gt I10, 0, loop
Expand All @@ -721,13 +721,13 @@ OUTPUT
clone P2, P0
print "ok 1\n"
set_args "0", 4.0
get_results "0", N5
invokecc P0
get_results "0", N5
ne N5, 8.0, nok_1
print "ok 2\n"
set_args "0", 4.0
get_results "0", N5
invokecc P2
get_results "0", N5
ne N5, 8.0, nok_1
end
nok_1: print "nok 1\n"
Expand All @@ -748,8 +748,8 @@ OUTPUT
set I6, 20
set I7, 30
set_args "0,0,0", I5,I6,I7
get_results "0", I5
invokecc P0
get_results "0", I5
print I5
print "\n"
end
Expand All @@ -765,8 +765,8 @@ OUTPUT
set P5, -6
set I5, -7
set_args "0,0", P5,I5
get_results "0", I5
invokecc P0
get_results "0", I5
print I5
print "\n"
end
Expand All @@ -784,8 +784,8 @@ OUTPUT
set P5, -7
set_args "0,0", I5,P5
get_results "0", I5
invokecc P0
get_results "0", I5
print I5
print "\n"
Expand All @@ -802,8 +802,8 @@ OUTPUT
dlfunc P0, P1, "nci_tb", "tb"
set S5, "ko\n"
set_args "0", S5
get_results "0", S5
invokecc P0
get_results "0", S5
print S5
end
CODE
Expand All @@ -815,8 +815,8 @@ OUTPUT
dlfunc P0, P1, "nci_tB", "tB"
set S5, "ko\n"
set_args "0", S5
get_results "0", S5
invokecc P0
get_results "0", S5
print S5
end
CODE
Expand All @@ -829,8 +829,8 @@ OUTPUT
# this test function returns a struct { int[2]; char }
set I5, 0
set_args "0", I5
get_results "0", P5
invokecc P0
get_results "0", P5
new P2, ['ResizablePMCArray']
.include "datatypes.pasm"
push P2, .DATATYPE_INT
Expand Down Expand Up @@ -861,8 +861,8 @@ OUTPUT
dlfunc P0, P1, "nci_pi", "pi"
# this test function returns a struct { float[2]; double }
set_args "0", 1
get_results "0", P5
invokecc P0
get_results "0", P5
new P2, ['ResizablePMCArray']
.include "datatypes.pasm"
push P2, .DATATYPE_FLOAT
Expand Down Expand Up @@ -893,8 +893,8 @@ OUTPUT
dlfunc P0, P1, "nci_pi", "pi"
# this test function returns a struct { char; int }
set_args "0", 2
get_results "0", P5
invokecc P0
get_results "0", P5
new P2, ['ResizablePMCArray']
.include "datatypes.pasm"
push P2, .DATATYPE_CHAR
Expand Down Expand Up @@ -927,8 +927,8 @@ OUTPUT
dlfunc P0, P1, "nci_pi", "pi"
# this test function returns a struct { char*; int }
set_args "0", 3
get_results "0", P5
invokecc P0
get_results "0", P5
new P2, ['ResizablePMCArray']
.include "datatypes.pasm"
push P2, .DATATYPE_CSTR
Expand All @@ -955,8 +955,8 @@ OUTPUT
dlfunc P0, P1, "nci_pi", "pi"
# this test function returns a struct { char; x->{int, double} }
set_args "0", 4
get_results "0", P5
invokecc P0
get_results "0", P5
.include "datatypes.pasm"
# the contained structure
new P3, ['ResizablePMCArray']
Expand Down Expand Up @@ -1009,8 +1009,8 @@ OUTPUT
loadlib P1, "libnci_test"
dlfunc P0, P1, "nci_pi", "pi"
set_args "0", 8
get_results "0", P5
invokecc P0
get_results "0", P5
.include "datatypes.pasm"
# the contained structure pointer
new P6, 'OrderedHash'
Expand Down Expand Up @@ -1080,8 +1080,8 @@ OUTPUT
dlfunc P0, P1, "nci_pi", "pi"
# this test function returns a struct { int (*f)(char *) }
set_args "0", 5
get_results "0", P5
invokecc P0
get_results "0", P5
new P2, ['ResizablePMCArray']
.include "datatypes.pasm"
push P2, .DATATYPE_FUNC_PTR
Expand All @@ -1096,8 +1096,8 @@ OUTPUT
# now we get a callable NCI PMC
set P0, P5[0]
set_args "0", "hello call_back"
get_results "0", I5
invokecc P0
get_results "0", I5
print I5
print "\n"
end
Expand All @@ -1111,8 +1111,8 @@ OUTPUT
dlfunc P0, P1, "nci_pi", "pi"
# this test function returns a struct { int; {int; int} int }
set_args "0", 6
get_results "0", P5
invokecc P0
get_results "0", P5
.include "datatypes.pasm"
# the nested structure
new P3, ['ResizablePMCArray']
Expand Down Expand Up @@ -1166,8 +1166,8 @@ OUTPUT
dlfunc P0, P1, "nci_pi", "pi"
# this test function returns a struct { char; {char; int} char }
set_args "0", 7
get_results "0", P5
invokecc P0
get_results "0", P5
.include "datatypes.pasm"
# the nested structure
new P3, ['ResizablePMCArray']
Expand Down Expand Up @@ -1221,8 +1221,8 @@ OUTPUT
dlfunc P0, P1, "nci_pi", "pi"
# this test function returns a struct { char; {char; int} char }
set_args "0", 7
get_results "0", P5
invokecc P0
get_results "0", P5
.include "datatypes.pasm"
# the nested structure
new P3, ['OrderedHash']
Expand Down Expand Up @@ -1345,8 +1345,8 @@ OUTPUT
set P5[3], "hello from Parrot\x0"
set I5, 1
set_args "0", P5
get_results "0", I5
invokecc P0
get_results "0", I5
print I5
print "\n"
end
Expand Down Expand Up @@ -2140,9 +2140,9 @@ OUTPUT
loadlib P1, "libnci_test"
set_args "0,0", P2, P3
get_results "0", I5
dlfunc P0, P1, "nci_i33", "i33"
invokecc P0
get_results "0", I5
print "Double: "
print P2
Expand Down Expand Up @@ -2222,8 +2222,8 @@ OUTPUT
loadlib P1, "libnci_test"
dlfunc P0, P1, "nci_piiii", "piiii"
set_args "0,0,0,0", 100,200,400,800
get_results "0", P5
invokecc P0
get_results "0", P5
new P6, 'OrderedHash'
set P6[ 'count' ], .DATATYPE_INT
Expand Down

0 comments on commit 75aa62c

Please sign in to comment.