Permalink
Browse files

Applied to master patch previously applied to

leto/embed_grant branch.  Then, patch
'Parrot_PMC_defined_keyed_str' test in the same way other
tests had been corrected.  Now all tests PASS on Darwin/PPC.
  • Loading branch information...
1 parent 68ee5a9 commit 7413e3082f331153013dafafc44397cab2db463c @jkeenan jkeenan committed Apr 23, 2011
Showing with 48 additions and 1 deletion.
  1. +48 −1 t/src/extend_vtable.t
View
@@ -10,7 +10,7 @@ use File::Spec::Functions;
plan skip_all => 'src/parrot_config.o does not exist' unless -e catfile(qw/src parrot_config.o/);
-plan tests => 100;
+plan tests => 105;
=head1 NAME
@@ -151,6 +151,15 @@ CODE
# actual tests start here
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_does_pmc" );
+ pmc2 = Parrot_PMC_new(interp, Parrot_PMC_typenum(interp, "Role"));
+ integer = Parrot_PMC_does_pmc(interp,pmc,pmc2);
+ Parrot_printf(interp,"%d\n", (int) integer);
+CODE
+0
+Done!
+OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_repr");
string = Parrot_PMC_get_repr(interp, rpa);
Parrot_printf(interp,"%Ss\n", string);
@@ -195,6 +204,7 @@ Done!
OUTPUT
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_number_keyed_str");
+ string = createstring(interp,"foo");
number = Parrot_PMC_get_number_keyed_str(interp, hash, string);
Parrot_printf(interp,"%.6f\n", number);
CODE
@@ -203,6 +213,7 @@ Done!
OUTPUT
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_integer_keyed_str");
+ string = createstring(interp,"foo");
integer = Parrot_PMC_get_integer_keyed_str(interp, hash, string);
Parrot_printf(interp,"%d\n", integer);
CODE
@@ -211,6 +222,7 @@ Done!
OUTPUT
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_exists_keyed_str");
+ string = createstring(interp,"foo");
integer = Parrot_PMC_exists_keyed_str(interp, hash, string);
Parrot_printf(interp,"%d\n", integer);
CODE
@@ -341,11 +353,20 @@ Done!
OUTPUT
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_delete_keyed_str");
+ string = createstring(interp,"foo");
Parrot_PMC_delete_keyed_str(interp, hash, string);
CODE
Done!
OUTPUT
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_pmc_keyed_str");
+ string = createstring(interp,"foo");
+ pmc2 = Parrot_PMC_get_pmc_keyed_str(interp, hash, string);
+CODE
+Done!
+OUTPUT
+
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_string_keyed_str");
string = createstring(interp,"foo");
string = Parrot_PMC_get_string_keyed_str(interp, hash, string);
@@ -355,6 +376,14 @@ CODE
Done!
OUTPUT
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_defined_keyed");
+ integer = Parrot_PMC_defined_keyed(interp, hash, key_int);
+ Parrot_printf(interp,"%d\n", integer);
+CODE
+0
+Done!
+OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_defined_keyed_int");
integer = Parrot_PMC_defined_keyed_int(interp, rpa, 42);
Parrot_printf(interp,"%d\n", integer);
@@ -363,6 +392,23 @@ CODE
Done!
OUTPUT
+# TODO: Improve this test
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_delete_keyed_str");
+ string = createstring(interp,"foo");
+ Parrot_PMC_delete_keyed_str(interp, hash, string);
+CODE
+Done!
+OUTPUT
+
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_defined_keyed_str");
+ string = createstring(interp,"foo");
+ integer = Parrot_PMC_defined_keyed_str(interp, hash, string);
+ Parrot_printf(interp,"%d\n", integer);
+CODE
+0
+Done!
+OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_(set|get)_number_keyed_int");
number = 42.0;
number2 = 17.8;
@@ -1507,6 +1553,7 @@ CODE
Done!
OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_assign_pmc" );
Parrot_PMC_set_integer_native(interp, pmc, -42);
Parrot_PMC_set_integer_native(interp, pmc2, 1000);

0 comments on commit 7413e30

Please sign in to comment.