#1019: Make Test;More;ok and nok use a PMC argument
-------------------+--------------------------------------------------------
Reporter: flh | Type: patch
Status: new | Priority: normal
Milestone: | Component: testing
Version: trunk | Severity: medium
Keywords: | Lang:
Patch: new | Platform: all
-------------------+--------------------------------------------------------
The first argument of Test;More;ok and Test;More;nok is currently an
integer.
When we call "ok($P0)", the VTABLE method "get_integer" gets called on
$P0, while we would expect the "get_bool" method to be called.
The attached patch:
* turns the "passed" argument of Test;More;ok and Test;More;nok into a
PMC, on which we call istrue (or isfalse for nok),
* implements the "get_bool" in Env, to prevent a failure in t/pmc/env.t,
* adds tests in t/library/test_more.t, which pass with the new behaviour,
but fail with the current one,
* tests the Test;More;nok (copied from ok), which wasn't tested before.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1019>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets