Ticket #1019 (closed patch: fixed)

Opened 5 years ago

Last modified 5 years ago

Make Test;More;ok and nok use a PMC argument

Reported by: flh Owned by:
Priority: normal Milestone:
Component: testing Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform: all

Description

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.

Attachments

ok_calls_get_bool.patch Download (4.1 KB) - added by flh 5 years ago.

Change History

Changed 5 years ago by flh

Changed 5 years ago by dukeleto

  • status changed from new to closed
  • resolution set to fixed
  • patch changed from new to applied
Note: See TracTickets for help on using tickets.