Commit graph

38 commits

Author SHA1 Message Date
Pentarctagon
ede10ca10c
slows tests (#9401) 2024-10-01 17:54:36 -05:00
pentarctagon
d278ae9c5f poison ability tests 2024-09-29 22:15:47 -05:00
pentarctagon
d32a363ae8 plague tests 2024-09-10 18:14:50 -05:00
pentarctagon
9e756f9fc5 petrifies tests 2024-09-07 19:53:08 -05:00
pentarctagon
96420da3d5 heal_on_hit tests - results are identical to drains aside from default value 2024-09-01 19:40:14 -05:00
pentarctagon
f22fb410a3 firststrike tests 2024-08-31 10:14:36 -05:00
pentarctagon
815739f1c2 drains tests 2024-08-25 20:46:15 -05:00
pentarctagon
32063bfc7c add disable ability tests 2024-08-17 21:13:10 -05:00
pentarctagon
8bebc86b6a damage_type tests 2024-08-07 21:32:46 -05:00
Pentarctagon
3cef48fe38
damage ability tests (#9137) 2024-07-30 19:06:38 -05:00
Pentarctagon
124cf1ccf0
chance_to_hit tests (#9093) 2024-07-21 17:30:37 -05:00
Pentarctagon
a2993884cd
Add berserk weapon special abilities tests (#8973)
Changes:
* CHECK_STRIKES macro now takes a comma-delimited list of strike counts for when units have a different number of strikes for different weapons, and updates the existing usage in the attacks tests
* Fixed a typo in the attacks_zero test
* Adds tests for berserk as a weapon special ability.

Berserk's handling differs from attacks as a weapon special ability:
* A value less than 1 is treated as effectively infinite rounds of combat (undocumented)
* The cumulative attribute is handled differently - in some cases it sums the values instead of using the highest single value whereas for attacks it always uses the highest single value

Also now exclude data/tests/ from scons pot-update since it was hitting the argument limit for number of arguments to a script.
2024-06-15 20:20:54 -05:00
pentarctagon
26de1195e3 add a bunch of attacks tests 2024-01-08 12:04:45 -06:00
Pentarctagon
d4b1e7e6c4
Add some more abilities' tests (hides, skirmisher, teleport) 2024-01-01 12:34:08 +01:00
Pentarctagon
f992190267
add a bunch of illuminates tests. (#8139) 2023-12-23 12:07:45 -06:00
Pentarctagon
e94d4f0b7e
add a bunch of leadership ability tests (#8125) 2023-12-17 18:29:27 -06:00
Pentarctagon
6322ca8bc8
add a bunch of resistance ability tests (#8105) 2023-12-15 09:59:01 -06:00
Pentarctagon
0ec7048a02
add a bunch of regenerate tests (#8079)
mostly the same as the heals tests, since they're basically the same ability with different defaults.
2023-12-05 23:15:26 -06:00
Pentarctagon
87ed0d0339
Add a bunch of tests for heals. (#8074)
Covers only attributes, not filters.
2023-11-30 11:09:52 +01:00
Steve Cotton
aaf2735c1c Add [test_do_attack_by_id], a wrapper for [do_command][attack]
The new tag takes ids instead of needing coordinates. So instead of storing
units or hardcoding values, an attack can be done like this:

```
[test_do_attack_by_id]
	attacker=alice
	defender=bob
	weapon=0
[/test_do_attack_by_id]
```

Add a simpler unit for unit tests than the Elvish Archer / Orcish Grunt
combo, cherry-picked from gfgtdf's PR #7589. This is a unit with a 10x1
melee attack, and 0% defense on all terrains.

Remove the test race's undead_variation=
For testing custom plague abilities, this triggered a warning when
converting to any unit type that doesn't have variation_id=wolf,
restricting tests to using only Walking Corpse and Soulless.
2023-07-02 18:54:17 +02:00
Steve Cotton
a9ed25e694 Reorder WML includes so manual tests can use the unit-test macros
Move the line that includes data/test/scenarios/manual_tests/ below the
line that includes data/test/macros/. This allows a manual test to use
the setup in COMMON_KEEP_A_B_C_D_UNIT_TEST, putting units in the right position
to test combat and leadership abilities.

Also improve comments in data/test/_main.cfg.
2023-05-08 10:58:22 +02:00
Celtic Minstrel
cbbd34a79e
Add new attacks_used key to [attack] (#7351) 2023-02-04 19:55:04 +01:00
Kingofd
492c20baa6
Add exclusive unit traits handling similar to require_amla (#7109) 2023-01-19 13:49:39 -05:00
Pentarctagon
30b55575e6 Add toplevel FilterWML tests folder. 2022-12-21 12:30:04 -06:00
Pentarctagon
129f5742fc Tests cleanup. 2022-12-21 12:30:04 -06:00
Pentarctagon
5eae1b6199 Reorganize unit tests. 2022-12-21 12:30:04 -06:00
Celtic Minstrel
574bc1a36e Resolve [terrain_mask]mask_file= relative to the [binary_path] like map_file= is 2021-05-11 14:52:22 -04:00
Ignacio R. Morelle
1799d5eb0d wmlindent pass on data/test/, safe subset
There is some WML in data/test/scenarios/ that causes wmlindent to
misbehave (bug #22264 and possibly others awaiting a more thorough
diagnosis), so that subdir is not part of this commit.
2014-07-02 22:04:52 -04:00
Chris Beck
91d545c7d7 fixup test directory
C++ tests load from /data/test/ again, and the _main includes in
data/ and data/test/ are fixed up to accomodate this.

This fixes up cc138a4ed9
2014-05-12 11:43:55 -04:00
Chris Beck
0797abd9ea add WML unit test examples, and include the test directory
add some trivial tests, and the _main.cfg files to ensure they are included
2014-04-08 18:09:32 -04:00
Alexander van Gessel
54f98f5d9e s/{@/{/g on mainline WML. 2009-03-24 23:05:19 +01:00
Eric S. Raymond
4861e50155 Reindent mainline in preparation for 1.6. 2008-12-08 17:45:47 +00:00
Pauli Nieminen
5d756ba985 Hacked play_scenario test code to work for formula ai testing 2008-09-05 09:59:17 +00:00
Eric S. Raymond
318486ce4b Reindent most of the data tree in preparation for making wmlindent smarter. 2008-08-28 17:57:00 +00:00
Pauli Nieminen
b28f8077a4 Fixed test/_main.cfg to include correct paths for test data 2008-08-27 21:58:06 +00:00
Pauli Nieminen
43ca9ef2cc Created wesnoth-test domain for unit tests 2008-08-27 09:12:52 +00:00
Pauli Nieminen
c934825607 Excluded data/test/ from tarball 2008-08-23 16:08:37 +00:00
Pauli Nieminen
ccc03df4b4 Moved test data to data/test/ 2008-08-19 08:34:38 +00:00
Renamed from src/tests/data/_main.cfg (Browse further)