Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests: make separate files for each starting position #6627

Merged
merged 1 commit into from Apr 18, 2022

Conversation

stevecotton
Copy link
Contributor

Turn the 4 side setup of the firststrike_and_laststrike test into a macro
called COMMON_KEEP_A_B_C_Dfor 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.

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.
@stevecotton stevecotton merged commit c5dec73 into wesnoth:master Apr 18, 2022
@stevecotton stevecotton deleted the unit_test_start_positions branch April 18, 2022 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unit Tests Issues involving Wesnoth's unit test suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants