Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'leto/embed_grant'

  • Loading branch information...
commit 61176bb71505dd4d2a5d9c53adc1ba139698c0b2 2 parents ed159d0 + d7afbd7
@leto leto authored
Showing with 81 additions and 8 deletions.
  1. +81 −8 t/src/extend_vtable.t
View
89 t/src/extend_vtable.t
@@ -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 => 90;
+plan tests => 100;
=head1 NAME
@@ -151,6 +151,41 @@ CODE
# actual tests start here
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_repr");
+ string = Parrot_PMC_get_repr(interp, rpa);
+ Parrot_printf(interp,"%Ss\n", string);
+CODE
+[ ]
+Done!
+OUTPUT
+
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_pmc_keyed");
+ pmc2 = Parrot_PMC_get_pmc_keyed(interp, rpa, key_int);
+CODE
+Done!
+OUTPUT
+
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_string_keyed_int");
+ string = Parrot_PMC_get_string_keyed_int(interp, rpa, 42);
+ Parrot_printf(interp,"%Ss\n", string);
+CODE
+
+Done!
+OUTPUT
+
+
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_pmc_keyed_int");
+ pmc2 = Parrot_PMC_get_pmc_keyed_int(interp, rpa, 0);
+CODE
+Done!
+OUTPUT
+
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_delete_keyed_int");
+ Parrot_PMC_delete_keyed_int(interp, rpa, 0);
+CODE
+Done!
+OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_exists_keyed_int");
integer = Parrot_PMC_exists_keyed_int(interp, rpa, 0);
Parrot_printf(interp,"%d\n", integer);
@@ -159,6 +194,36 @@ CODE
Done!
OUTPUT
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_number_keyed_str");
+ number = Parrot_PMC_get_number_keyed_str(interp, hash, string);
+ Parrot_printf(interp,"%.6f\n", number);
+CODE
+0.000000
+Done!
+OUTPUT
+
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_integer_keyed_str");
+ integer = Parrot_PMC_get_integer_keyed_str(interp, hash, string);
+ Parrot_printf(interp,"%d\n", integer);
+CODE
+0
+Done!
+OUTPUT
+
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_exists_keyed_str");
+ integer = Parrot_PMC_exists_keyed_str(interp, hash, string);
+ Parrot_printf(interp,"%d\n", integer);
+CODE
+0
+Done!
+OUTPUT
+
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_delete_keyed");
+ Parrot_PMC_delete_keyed(interp, rpa, key_int);
+CODE
+Done!
+OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_exists_keyed");
integer = Parrot_PMC_exists_keyed(interp, rpa, key_int);
Parrot_printf(interp,"%d\n", integer);
@@ -238,13 +303,6 @@ CODE
Done!
OUTPUT
-extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_string_keyed_int");
- string = Parrot_PMC_get_string_keyed_int(interp, rpa, 42);
- Parrot_printf(interp,"%Ss\n", string);
-CODE
-
-Done!
-OUTPUT
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_(set|get)_number_keyed");
Parrot_PMC_set_number_keyed(interp, rpa, key_int, 42.0);
@@ -282,6 +340,12 @@ CODE
Done!
OUTPUT
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_delete_keyed_str");
+ Parrot_PMC_delete_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);
@@ -407,6 +471,15 @@ CODE
Done!
OUTPUT
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_delprop");
+ type = Parrot_PMC_typenum(interp, "Class");
+ pmc = Parrot_PMC_new(interp, type);
+
+ Parrot_PMC_delprop(interp, pmc, string);
+CODE
+Done!
+OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_(add|remove)_parent");
type = Parrot_PMC_typenum(interp, "Class");
pmc = Parrot_PMC_new(interp, type);
Please sign in to comment.
Something went wrong with that request. Please try again.