mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 13:40:26 +00:00

Adds support for using these in the weapons and ability filters: * "-1", which was previously treated as an parse error (no number before the separator). * "-3--1" * "-infinity" as the lower number in the range, provided a different upper number is given. This treats "-infinity" (with no other number), "-infinity--infinity", "infinity" (with no other number) and "infinity-infinity" as errors. It seems unlikely that someone would intend to use a filter that can't match any reasonable number. The range "-infinity-infinity" will be parsed successfully. I don't see a use case for that, but nor do I see a reason to add extra C++ to reject it. However, it's not added to the schema, as I think it's good for the schema to give a warning when someone creates a filter which will accept every value (including accepting the default, so "-infinity-infinity" accepts the unset value too). Includes new unit tests for the C++ and the Lua stringx.parse_range functions. The next commit adds more WML tests, but is kept separate to credit the author. This started as a change to move common filter functions from unit.cpp to somewhere that they could be reused for other config-based filters. In the process a missing feature was found and added, the move is still included in a single Git commit because the move was required in order to make these functions accessible to the Boost unit tests. Two CodeBlocks project files additionally get src/utils/any.hpp added, which was in one of them but missing from the other two. I noticed because these are alphabetically at the start of the src/utils file list. Thanks to @CelticMinstrel for the review comments and Xcode project updates.
33 lines
869 B
Plaintext
33 lines
869 B
Plaintext
tests/gui/fire_event.cpp
|
|
tests/gui/iterator.cpp
|
|
tests/gui/test_gui2.cpp
|
|
tests/gui/visitor.cpp
|
|
tests/main.cpp
|
|
tests/test_addons.cpp
|
|
tests/test_commandline_options.cpp
|
|
tests/test_config.cpp
|
|
tests/test_config_cache.cpp
|
|
tests/test_config_filters.cpp
|
|
tests/test_filesystem.cpp
|
|
tests/test_formula_core.cpp
|
|
tests/test_formula_function.cpp
|
|
tests/test_formula_timespan.cpp
|
|
tests/test_image_modifications.cpp
|
|
tests/test_irdya_date.cpp
|
|
tests/test_lexical_cast.cpp
|
|
tests/test_map_location.cpp
|
|
tests/test_mp_connect.cpp
|
|
tests/test_recall_list.cpp
|
|
tests/test_rng.cpp
|
|
tests/test_serialization.cpp
|
|
tests/test_simple_wml.cpp
|
|
tests/test_team.cpp
|
|
tests/test_unit_map.cpp
|
|
tests/test_util.cpp
|
|
tests/test_version.cpp
|
|
tests/test_whiteboard_side_actions.cpp
|
|
tests/utils/fake_display.cpp
|
|
tests/utils/game_config_manager_tests.cpp
|
|
tests/utils/wml_equivalence.cpp
|
|
tests/wml/test_macro_define.cpp
|