Test-More / TB2

Test::Builder version 2, the next generation of building testing modules in Perl
Other
1 stars 0 forks source link

Put Test::Builder->_ending logic into a watcher #171

Closed schwernbot closed 10 years ago

schwernbot commented 10 years ago

From: @schwern Date: Wednesday Nov 09, 2011 at 20:23 GMT Orig: https://github.com/Test-More/test-more/issues/189

The work Test::Builder->_ending does on determining if a test passed or failed and issuing reasons why must go into an EventWatcher. This allows it to fire on subtest end as well as have only one point take care of it instead of each builder doing their own logic.

  1. Move the logic into History.
  2. Make a watcher to set the exit code, so it's optional.

This includes removing $tb->{Ending}

schwernbot commented 10 years ago

From: @schwern Date: Tuesday Nov 15, 2011 at 01:23 GMT Orig: https://github.com/Test-More/test-more/issues/189#issuecomment-2739571

Looks like I didn't tag all the changes. Whoops.

The logic was moved into History->test_was_successful.

The exit code stuff was moved into Test::Builder->test_exit_code. I decided against a watcher because there's no event to watch and the exit code logic is really kinda gross. There's a new Test::Builder->no_change_exit_code control.

Test::Builder still does some ending work, but now very little and most of it will melt away with other changes. I'm going to call this one good.