[wesnoth-commits] [wesnoth/wesnoth] 9a0b95: Separate unit test results from scenario victory/d...

Pentarctagon noreply at github.com
Tue Apr 7 21:45:36 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 9a0b95f9a09e1b86f0918658c05eaea801a251ed
      https://github.com/wesnoth/wesnoth/commit/9a0b95f9a09e1b86f0918658c05eaea801a251ed
  Author: Pentarctagon <pentarctagon at tutamail.com>
  Date:   2020-04-07 (Tue, 07 Apr 2020)

  Changed paths:
    M data/lua/wml/endlevel.lua
    M data/schema/core/actionwml.cfg
    M data/test/macros/wml_unit_test_macros.cfg
    A data/test/scenarios/events-test_defeat.cfg
    A data/test/scenarios/events-test_die.cfg
    A data/test/scenarios/events-test_filterable1.cfg
    A data/test/scenarios/events-test_filterable2.cfg
    A data/test/scenarios/events-test_filterable3.cfg
    A data/test/scenarios/events-test_nonfilterable.cfg
    A data/test/scenarios/events-test_victory.cfg
    M data/test/scenarios/interrupts.cfg
    M data/test/scenarios/test_lua_wml_tagnames.cfg
    M run_wml_tests
    M src/game_end_exceptions.cpp
    M src/game_end_exceptions.hpp
    M src/game_launcher.cpp
    M src/game_launcher.hpp
    M src/playsingle_controller.cpp
    M src/scripting/game_lua_kernel.cpp
    M wml_test_schedule

  Log Message:
  -----------
  Separate unit test results from scenario victory/defeat.

This adds an additional `test_result` attribute to [endlevel], intended for use with the automated unit tests. This allows for the unit tests to differentiate a pass/fail result separately from scenario victory or defeat, which allows for more accurately determining the outcome of a test as well as addresses the potential, for example, for a scenario to be expect to pass because of the {SUCCEED} macro but instead passes because the scenario ended as a victory through some other method.

Additional unit tests which were the original motivation for this change are also added as part of this.  They test, as much as possible, that events are executed at all, and are then also executed in the expected order.





More information about the Commits mailing list