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_float

  • Loading branch information...
commit 1cbdea9e7bccb4f4a221496796b49df1b1a2bc4e 1 parent 028299b
@leto leto authored
Showing with 11 additions and 5 deletions.
  1. +11 −5 t/src/extend_vtable.t
View
16 t/src/extend_vtable.t
@@ -1213,15 +1213,21 @@ CODE
Done!
OUTPUT
+extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_i_divide_float" );
+ Parrot_PMC_set_integer_native(interp, pmc, 42);
+ number = 21.0;
+ Parrot_PMC_i_divide_float(interp, pmc, number);
+ number = Parrot_PMC_get_number(interp, pmc);
+ printf("%.2f\n", number);
+CODE
+2.00
+Done!
+OUTPUT
+
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_divide_float" );
Parrot_PMC_set_integer_native(interp, pmc, 42);
Parrot_PMC_set_integer_native(interp, pmc3, 0);
number = 21.0;
-
- /*
- We must pass in the destination, but the return
- value of the function must be used. This is broken.
- */
pmc3 = Parrot_PMC_divide_float(interp, pmc, number, pmc3);
number = Parrot_PMC_get_number(interp, pmc3);
printf("%.2f\n", number);
Please sign in to comment.
Something went wrong with that request. Please try again.