7 Commits

Author SHA1 Message Date
CrawlCycle
a6f36becb9 Test parsing of WML define and undef macros by the preprocessor & parser
This commit adds tools to test parsing of WML macros by the preprocessor
and parser. The commit also adds two tests of the #define and #undef
WML macro as examples.

The tests consist of three steps:

1. Define one WML string containing macros and one WML string
   that lacks macros in each test. The two WML strings should be
   equivalent after preprocessing.

2. Transform each WML string into a syntax tree (represented by config
   objects) with the preprocessor and parser of Wesnoth.

3. Check if the two config objects are equal. Since the two WML strings
   are equivalent, the two configs object should be equivalent if the
   preprocessor and parsers are both correct.

The output of the preprocessor is in an undocumented format. Therefore,
this commit does not test the preprocessor as an isolated unit.
2020-11-28 14:52:48 -05:00
Iris Morelle
37cca84684 Add utils::format_timespan() for formatting time lengths for user display 2019-03-01 02:29:20 -03:00
Martin Hrubý
96bbebb514 Fix building with Xcode 10 (#3460)
Resolves #3458.

(cherry-picked from commit 50301f84e33d828c39835bc47f04dd1107631960)
2018-10-07 03:24:17 +00:00
Pentarctagon
d6833d76d0 Remove unused test file and images.
(cherry-picked from commit 0a7ed44c087f1c66d65b8656fc197309d4c0325a)
2018-10-07 03:22:49 +00:00
Charles Dang
34e065e011 Tests: removed another empty file I missed in c93aebb1debc
Its contents were also removed when SDL 1.2 was dropped.
2017-11-27 09:47:45 +11:00
Charles Dang
c93aebb1de Tests: removed empty files
These were emptied out when SDL 1.2 was removed (358bd1235f07d8d577). I seem to recall
someone saying it might be worth keeping them around in case something needed to be put
back, but it's been a year and a half. Not much worth in keeping empty files.
2017-11-27 09:42:14 +11:00
Gregory A Lundberg
d091391899 Renamed the target and binary for the Boost unit tests from test to boost_unit_tests
This quells warnings from CMake about reserved target names, and reduces confusion about which `test` is intended: the wesnoth executable or the standard shell command.
2017-11-06 20:32:27 +02:00