Commit graph

119 commits

Author SHA1 Message Date
Charles Dang
a436c46f13 Comment out [terrain_mask] inclusion possibly breaking feeding test 2015-08-13 15:29:35 +11:00
gfgtdf
49219ad0fd add team share_vision=all/shroud/none
previously there were 2 flags share_view=yes/no and share_maps=yes/no,
but only 3 possible settings (share both, share none, only share shroud)
(so share_maps= was ignored if share_viewv=yes). This made the wml code and
the c++ code needlessly complicated.

Now these 2 flags are replaced by share_vision=all/shroud/none
2015-07-23 14:00:08 +02:00
Elvish_Hunter
d4a3c76447 Improved the [role] unit test
A new unit test, called 'test_role_lua' was added, to ensure that the [role]
tag could be used from Lua.
Also, in the first unit test the types list is stored in a variable, to
ensure that variable substitution works as intended
2015-06-13 21:23:40 +02:00
Elvish_Hunter
1b239aa3e6 Added a new unit test for [role] 2015-06-10 22:07:28 +02:00
Chris Beck
f4c99b3a1a fixup wesnoth.wml_conditionals, add unit tests 2015-04-10 14:16:21 -04:00
Charles Dang
0911b1f4d5 Added some conditional unit tests 2015-04-03 08:31:13 +11:00
Charles Dang
d9ef035bc0 Ran wmlindent on the new unit test. Some formatting had to be manually fixed. 2015-01-08 06:07:07 +11:00
Chris Beck
8459bf7104 add lua function "fire_wml_menu_item" and unit tests for menu items
this commit also changed slightly the way that wml menu events
are synced. previously they were run via "run_in_synced_context",
now they are run via "run_in_synced_context_if_not_already", which
makes it safe to fire them from lua (a synced context).
2015-01-06 21:42:52 -05:00
Charles Dang
46fc0d4d93 Fixup HEAD, small formatting bit I missed 2015-01-05 20:57:05 +11:00
Charles Dang
3b43c7dcf1 Ran wmlindnet on unit tests. Some formatting had to be manually corrected 2015-01-05 20:42:12 +11:00
Chris Beck
18b5059b23 add some [time_area] unit tests 2015-01-05 02:34:09 -05:00
Chris Beck
6a3321d0db fix bug #23130 (xp modifier not working), add unit tests
Reverts commit e85c37e161 which was
an error.

I chose to use a scoped_pointer this time around because the
definition of play_controller should not actually depend on the
complete definition of unit_type.
2015-01-02 18:03:24 -05:00
Chris Beck
a273be5520 add a wml unit test for {CLEAR_VARIABLE} macro 2014-12-29 00:39:14 -05:00
Chris Beck
2239ab3f65 add a unit test for lua get_sides return object 2014-12-26 01:07:57 -05:00
Chris Beck
2396cfc937 reduce the failure probability of a lua random unit test
It seemed to spuriously pass on travis when it should be failing,
this should be much more unlikely now.
2014-12-19 22:51:30 -05:00
Chris Beck
d1d0990235 add a unit test for wesnoth.require 2014-12-06 23:32:29 -05:00
Chris Beck
69d7924df5 add a wml unit test for lua dofile 2014-12-05 15:30:12 -05:00
Chris Beck
a8d69793ee add tests for {MOVE_UNIT} macro 2014-10-18 15:44:05 -04:00
Chris Beck
6cb9c518c7 Merge branch 'has_ally_master'
Conflicts:
	wml_test_schedule
2014-07-12 11:05:18 -04:00
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
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: f24f6adee1

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
403af25e9d
2014-05-16 19:35:06 -04:00