Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t] Parrot_PMC_i_divide_int

  • Loading branch information...
commit 028299bc90468f031b3794c4536b5c80aa2005ff 1 parent f69fe31
@leto leto authored
Showing with 12 additions and 4 deletions.
  1. +12 −4 t/src/extend_vtable.t
View
16 t/src/extend_vtable.t
@@ -1188,15 +1188,23 @@ CODE
Done!
OUTPUT
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_i_divide_int" );
+ Parrot_PMC_set_integer_native(interp, pmc, 42);
+ integer = 21;
+
+ Parrot_PMC_i_divide_int(interp, pmc, integer);
+ integer = Parrot_PMC_get_integer(interp, pmc);
+ printf("%d\n", integer);
+CODE
+2
+Done!
+OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_divide_int" );
Parrot_PMC_set_integer_native(interp, pmc, 42);
Parrot_PMC_set_integer_native(interp, pmc3, 0);
integer = 21;
- /*
- We must pass in the destination, but the return
- value of the function must be used. This is broken.
- */
pmc3 = Parrot_PMC_divide_int(interp, pmc, integer, pmc3);
integer = Parrot_PMC_get_integer(interp, pmc3);
printf("%d\n", integer);
Please sign in to comment.
Something went wrong with that request. Please try again.