The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
test_formula_core.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <array>
#include "formula/formula.hpp"
#include "formula/callable.hpp"
#include "formula/tokenizer.hpp"
Include dependency graph for test_formula_core.cpp:

Go to the source code of this file.

Classes

class  mock_char
 
class  mock_party
 

Macros

#define GETTEXT_DOMAIN   "wesnoth-test"
 

Functions

 BOOST_AUTO_TEST_CASE (test_formula_basic_arithmetic)
 
 BOOST_AUTO_TEST_CASE (test_formula_basic_logic)
 
 BOOST_AUTO_TEST_CASE (test_formula_callable)
 
 BOOST_AUTO_TEST_CASE (test_formula_where_clause)
 
 BOOST_AUTO_TEST_CASE (test_formula_strings)
 
 BOOST_AUTO_TEST_CASE (test_formula_dice)
 
 BOOST_AUTO_TEST_CASE (test_formula_containers)
 
 BOOST_AUTO_TEST_CASE (test_formula_tokenizer)
 

Variables

mock_char c
 
mock_party p
 

Macro Definition Documentation

◆ GETTEXT_DOMAIN

#define GETTEXT_DOMAIN   "wesnoth-test"

Definition at line 15 of file test_formula_core.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/8]

BOOST_AUTO_TEST_CASE ( test_formula_basic_arithmetic  )

Definition at line 70 of file test_formula_core.cpp.

References c.

◆ BOOST_AUTO_TEST_CASE() [2/8]

BOOST_AUTO_TEST_CASE ( test_formula_basic_logic  )

Definition at line 92 of file test_formula_core.cpp.

References c.

◆ BOOST_AUTO_TEST_CASE() [3/8]

BOOST_AUTO_TEST_CASE ( test_formula_callable  )

Definition at line 108 of file test_formula_core.cpp.

References p.

◆ BOOST_AUTO_TEST_CASE() [4/8]

BOOST_AUTO_TEST_CASE ( test_formula_containers  )

◆ BOOST_AUTO_TEST_CASE() [5/8]

BOOST_AUTO_TEST_CASE ( test_formula_dice  )

Definition at line 143 of file test_formula_core.cpp.

References wfl::variant::as_int(), and wfl::formula::evaluate().

◆ BOOST_AUTO_TEST_CASE() [6/8]

BOOST_AUTO_TEST_CASE ( test_formula_strings  )

Definition at line 127 of file test_formula_core.cpp.

References c.

◆ BOOST_AUTO_TEST_CASE() [7/8]

BOOST_AUTO_TEST_CASE ( test_formula_tokenizer  )

Definition at line 176 of file test_formula_core.cpp.

References t.

◆ BOOST_AUTO_TEST_CASE() [8/8]

BOOST_AUTO_TEST_CASE ( test_formula_where_clause  )

Definition at line 118 of file test_formula_core.cpp.

References p.

Variable Documentation

◆ c

◆ p

Definition at line 68 of file test_formula_core.cpp.

Referenced by unit_map::add(), config::add_child_at_total(), theme::add_object(), plugins_manager::add_plugin(), image::apply_light(), std::begin(), blur_alpha_surface(), blur_surface(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), cave_map_generator::cave_map_generator_job::cave_map_generator_job(), std::cbegin(), std::cend(), config::child_range(), config::child_range(), game_events::event_handlers::clean_up_expired_handlers(), config::clear_diff_track(), color_blend(), rect::contains(), wfl::formula_callable::convert_map(), std::crbegin(), std::crend(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wfl::gamestate::DEFINE_WFL_FUNCTION(), wesnothd::server::delete_game(), config_attribute_value::empty(), std::end(), ai::configuration::expand_simplified_aspects(), display::fade_to(), display::fade_tod_mask(), theme::find_element(), ai::generate_and_push_ai_table(), cave_map_generator::cave_map_generator_job::generate_chambers(), events::map_command_handler< Worker >::get_aliases(), pathfind::full_cost_map::get_average_cost_at(), wesnothd::ban_manager::get_ban_info(), gui2::dialogs::gamestate_inspector::controller::get_controller(), preprocessor_streambuf::get_current_file(), config::get_deprecated_child_range(), active_ability_list::get_extremum(), get_filename(), unit::get_known_boolean_state_name(), ai::typesafe_aspect< T >::get_lua(), wfl::config_callable::get_value(), utils::string_map_variable_set< T >::get_variable_access_read(), wesnothd::server::handle_join_server_queue(), wesnothd::server::handle_leave_server_queue(), wesnothd::server::handle_player_in_game(), campaignd::server::handle_upload(), ai::impl_ai_get(), impl_mp_settings_get(), impl_mp_settings_len(), impl_unit_type_list(), lua_common::impl_vconfig_pairs_collect(), lua_common::impl_vconfig_pairs_iter(), impl_warn(), unit_map::insert(), lua_fileops::intf_read_file(), lua_common::intf_textdomain(), wesnothd::server::is_login_allowed(), lua_fileops::load_file(), plugins_manager::load_plugin(), luaW_checkconfig(), luaW_toteam(), luaW_tounittype(), luaW_toweapon(), main(), spirit_po::catalog< hashmap_type, pf_compiler >::merge(), mirror_walk(), unit_map::move(), point::operator*(), point::operator*=(), vconfig::attribute_iterator::operator->(), vconfig::all_children_iterator::operator->(), point::operator/(), point::operator/=(), std::operator<<(), utils::shared_reference< T >::operator=(), utils::shared_reference< T >::operator=(), desktop::os_version(), php_crypt_blowfish_rn(), cave_map_generator::cave_map_generator_job::place_passage(), game_state::place_sides_in_preferred_locations(), image::precache_file_existence(), std::rbegin(), game_config::config_cache::read_defines_queue(), unit_ability_t::recursion_guard::recursion_guard(), config::recursive_clear_value(), config::remove_child(), config::remove_children(), theme::remove_object(), std::rend(), unit_map::replace(), lua_fileops::resolve_filename(), display::scaled_to_zoom(), wesnothd::server::send_server_message_to_lobby(), wesnothd::server::send_to_lobby(), sdl::window::set_logical_size(), utils::shared_reference< T >::shared_reference(), utils::shared_reference< T >::shared_reference(), color_t::smooth_blend(), utils::square_parenthetical_split(), config_attribute_value::t_str(), config_attribute_value::to_bool(), mp_game_settings::to_config(), font::pango_text::to_draw_scale(), ai::try_aspect_as(), wesnothd::ban_manager::unban_group(), wb::side_actions::update_recruited_unit(), utils::wildcard_string_match(), statistics_record::write_str_int_map(), and gui2::widget::~widget().