Chris Beck
5a64d43fae
add [has_ally],[has_enemy] tags for standard side filter
...
Unlike [allied_with] and [enemy_of], these will match if only if
there is *any* ally or enemy matching the filter. The other versions
of the tag match only if all sides matching the filter are
allied / opposed.
This commit also adds a unit test that checks that it works as
expected.
2014-07-12 10:33:56 -04:00
Chris Beck
72d91daed0
fixup [filter_vision] tags
...
This is the master version of PR #237 , with unit tests.
2014-07-12 09:59:24 -04:00
Chris Beck
1cb74d62f8
Merge pull request #229 from cbeck88/wmi_items_preference
...
add adv. preference for number of menu items displayed at once,
and remaining fixups there
2014-07-07 14:09:46 -04:00
Ignacio R. Morelle
e527969bdc
wmlindent pass on data/test/scenarios/, safe subset
...
This commit only includes files that weren't incorrectly modified by
wmlindent as the result of bugs; in other words, all files but the
following:
* break_replay_with_lua_random.cfg
* characterize_pathfinding.cfg
* event_handlers_in_events.cfg
* recruit_facing.cfg
2014-07-03 19:56:35 -04:00
Chris Beck
cee6874786
Merge branch 'refactor_unit_filter'
2014-07-03 19:27:36 -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
4046666bee
fixup lines with two closers on a line in wml test directory
...
wmlindent chokes on these
commit made with the following command:
find data/test/scenarios/ -type f -print0 | xargs -0 sed -i
"s|^\([[:space:]]*\[\/.*\]\)[[:space:]]*)\}[[:space:]]*$|\1\n)}|"
2014-07-02 21:29:04 -04:00
Chris Beck
df44636990
add [show_if]'s to the test scenario for this feature
2014-07-01 14:22:00 -04:00
Chris Beck
fe3b5f4576
add adv. preference for number of menu items displayed at once
...
See earlier commit: f24f6adee142c088595647d5506737c48892bf38
Forum discussion: http://forums.wesnoth.org/viewtopic.php?f=6&t=40668
2014-06-28 22:47:56 -04:00
Chris Beck
14808e186b
add unit test for an object-based "feeding" ability
...
based on tekelili's forum post here:
http://forums.wesnoth.org/viewtopic.php?f=8&t=40449#p572206
2014-06-21 22:08:32 -04:00
Chris Beck
5e9d356c9f
unit tests for defining custom event handlers in events and firing
2014-06-21 16:58:40 -04:00
Chris Beck
f43cb8edc2
add tests for scenario ending by killing enemy leader
...
Tests killing, killing on retal, and levelling up on killing,
in various configurations.
2014-06-07 17:21:00 -04:00
Chris Beck
de55f1dfc7
increase coverage of reachability tests, and rebuild answers
2014-05-28 12:49:07 -04:00
Chris Beck
3a102774b5
fixup pathfind tests, add reachability tests
2014-05-28 01:31:09 -04:00
Chris Beck
6cb367594b
test [store_locations], and try to characterize [find_path]
2014-05-27 20:30:30 -04:00
Chris Beck
cad6edf182
add comment to test_relative_dir.cfg
2014-05-27 12:00:30 -04:00
Alexander van Gessel
4d7de12e47
Unit tests for deterministic unit facings
2014-05-27 17:30:13 +02:00
Chris Beck
f664b4e5af
add test of [modify_unit] facing= attribute
2014-05-26 23:34:48 -04:00
Chris Beck
b272239ea9
add replace_schedule in prestart test
2014-05-26 20:14:16 -04:00
Chris Beck
ec5ec4fb38
add tests of modify_turns tag
2014-05-26 20:02:05 -04:00
Chris Beck
7cc62266e9
unit tests for giving gold in prestart
2014-05-26 19:06:00 -04:00
Chris Beck
d129d80ebe
Add unit tests for check victory function
...
Mainly focused on defeat_condition field right now... woudl be good
to add some that test victory_when_enemies_defeated.
2014-05-22 17:21:53 -04:00
aquileia
8136065f75
Fix readme files about unit test scenarios
2014-05-19 17:13:27 -04:00
Chris Beck
ab29ba7e43
add map location rotate wml interface
2014-05-19 16:29:07 -04:00
Chris Beck
3f5350a5ef
add wml relative dir query tag, and interactive test scenario
2014-05-19 14:35:07 -04:00
Chris Beck
86fea3c551
add unit test for berzerk + firststrike interaction
2014-05-16 23:53:28 -04:00
Chris Beck
4e16a998a2
refactor break_replay tests into one file
2014-05-16 22:54:03 -04:00
Chris Beck
8d161347bc
refactor assert, return, two_plus_two, to each be one file
2014-05-16 22:45:54 -04:00
Chris Beck
bf2dda129c
refactor sighted events test to be one file
2014-05-16 22:37:13 -04:00
Chris Beck
af4b671266
add unit test for basic unit map functionality
2014-05-16 22:23:48 -04:00
Chris Beck
d7374f4080
add test_move unit tests
2014-05-16 21:25:23 -04:00
Chris Beck
9964be2849
fixup move_skip_sighted tests
2014-05-16 20:29:26 -04:00
Chris Beck
2c486ed699
add tests of the [move] skip_sighted_option
...
This is partially a follow up of previous commit
403af25e9da77dbf7aa295ccd901af3bdcd6f889
2014-05-16 19:35:06 -04:00
Chris Beck
94fdab4389
add sighted events unit tests
2014-05-16 18:09:52 -04:00
Chris Beck
9df026f8e8
move test_grunt_tod_damage map to a map file
2014-05-16 17:11:27 -04:00
Chris Beck
0201fe3247
put generic unit test map in its own file
2014-05-16 17:05:31 -04:00
Chris Beck
7b6a1ec74d
fixup messed up whitespace and similar
2014-05-15 22:12:59 -04:00
Chris Beck
89f67d1a5d
add fixed_lua_random_replay test
2014-05-13 21:27:17 -04:00
Chris Beck
92bbf8c02c
add "break replay with lua random" test
2014-05-13 20:58:42 -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 cc138a4ed96f3ac1f8c5130aa6842d1429013da4
2014-05-12 11:43:55 -04:00
Chris Beck
c52e5ed410
add sanity checks for unit test mechanism
...
also, reorganize the test schedule file
2014-05-11 01:57:49 -04:00
Chris Beck
e3d47b5f02
rename wml unit tests
...
tests should have helpful names and not numbers
2014-05-11 01:38:09 -04:00
Chris Beck
a37ec8bbdb
make [command] [attack] handler a bit friendlier
...
Now, it won't warn about mismatch with gamestate when you don't
specify attacker_type or defender_type.
Simplify unit test 6 accordingly.
2014-05-10 22:41:54 -04:00
Chris Beck
654c066550
refactor test #6 to use [do_command]
2014-05-10 22:26:39 -04:00
Chris Beck
c611481e26
fixup readme.txt
...
fixed a typo, added a clarifying sentence about C++ / WML tests
2014-05-09 23:37:03 -04:00
Chris Beck
851519cd07
enable linger mode to unit test macros ASSERT, RETURN
...
I initially had linger mode off in the endlevel tags of these
macros, to make sure they didn't block the end of noninteractive
scenarios.
But it turns out its better to have it on. It doesn't block the
tests when they run noninteractively, and it means that if a test
fails, you can boot it up with --showgui, and then run :inspect
from linger mode to see what happened. If you don't have linger
mode, then even with --showgui the failed test closes out too
quickly.
2014-05-09 23:04:03 -04:00
Chris Beck
8f10e6e84c
fixup whitespace in unit_test_5.cfg
2014-05-09 01:47:13 -04:00
Chris Beck
e96f6e3ef2
add unit tests 5 and 6
...
Unit test 5 checks that units placed at off-map coordinates end up
in the recall list of their side.
Unit test 6 checks that grunts (without traits) are doing the
right amount of damage at day, dusk, and night.
Also add these to the script.
2014-05-09 00:00:17 -04:00
Chris Beck
9df86d5420
add unit test 4, which AI wrote in github comments
2014-05-08 17:51:21 -04:00
Chris Beck
634ee2d1d8
add wml unit tests two and three
...
- test two tests a basic property of events
- test three tests unit placement on the map in
case of a collision
2014-04-08 18:09:50 -04:00