[wesnoth-commits] [wesnoth/wesnoth] c5dec7: Unit tests: make separate files for each starting ...

Steve Cotton noreply at github.com
Mon Apr 18 02:49:06 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: c5dec737848dff58ca88d8db6c4af39fd10c2238
      https://github.com/wesnoth/wesnoth/commit/c5dec737848dff58ca88d8db6c4af39fd10c2238
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2022-04-18 (Mon, 18 Apr 2022)

  Changed paths:
    A data/test/macros/start_position_common_keep_a_b_c_d.cfg
    A data/test/macros/start_position_generic.cfg
    M data/test/macros/wml_unit_test_macros.cfg
    M data/test/scenarios/firststrike_and_laststrike.cfg

  Log Message:
  -----------
  Unit tests: make separate files for each starting position

Turn the 4 side setup of the firststrike_and_laststrike test into a macro
called `COMMON_KEEP_A_B_C_D`for reuse in other tests.

The comment for `GENERIC_UNIT_TEST` gets a couple of extra paragraphs.

All the files get wmlindent run on them, which reindents `FAIL_IF_NOT`.

The main reason for having these is separate files is Git's fuzzy-patch
matching when merging and rebasing. Having large blocks of identical text
in `wml_unit_test_macros.cfg` can mean the wrong section gets patched.





More information about the Commits mailing list