Permalink
Browse files

[t] Parrot_PMC_i_divide_float

  • Loading branch information...
1 parent 028299b commit 1cbdea9e7bccb4f4a221496796b49df1b1a2bc4e @leto leto committed May 27, 2011
Showing with 11 additions and 5 deletions.
  1. +11 −5 t/src/extend_vtable.t
View
@@ -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);

0 comments on commit 1cbdea9

Please sign in to comment.