The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros | Functions | Variables
test_formula_core.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <ctime>
#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

#define GETTEXT_DOMAIN   "wesnoth-test"

Definition at line 15 of file test_formula_core.cpp.

Function Documentation

BOOST_AUTO_TEST_CASE ( test_formula_basic_arithmetic  )

Definition at line 70 of file test_formula_core.cpp.

BOOST_AUTO_TEST_CASE ( test_formula_basic_logic  )

Definition at line 92 of file test_formula_core.cpp.

References c.

BOOST_AUTO_TEST_CASE ( test_formula_callable  )

Definition at line 108 of file test_formula_core.cpp.

References p.

BOOST_AUTO_TEST_CASE ( test_formula_where_clause  )

Definition at line 118 of file test_formula_core.cpp.

References p.

BOOST_AUTO_TEST_CASE ( test_formula_strings  )

Definition at line 127 of file test_formula_core.cpp.

References c.

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 ( test_formula_containers  )
BOOST_AUTO_TEST_CASE ( test_formula_tokenizer  )

Variable Documentation

Definition at line 67 of file test_formula_core.cpp.

Referenced by gui2::dialogs::campaign_selection::add_campaign_to_tree(), ai::component_manager::add_component(), terrain_builder::add_constraints(), ai::typesafe_known_aspect< T >::add_facet(), ai::composite_aspect< T >::add_facet(), theme::add_object(), add_prefixes(), ai::lua_goal::add_targets(), image::apply_light(), BOOST_AUTO_TEST_CASE(), gui2::builder_grid::builder_grid(), gui2::implementation::builder_panel::builder_panel(), gui2::implementation::builder_toggle_panel::builder_toggle_panel(), cave_map_generator::cave_map_generator_job::cave_map_generator_job(), ai::config_value_translator< terrain_filter >::cfg_to_value(), ai::component_manager::change_component(), tokenizer::char_type(), characterization_distance_direction(), unit_type::check_id(), ai::composite_aspect< T >::composite_aspect(), default_map_generator::config_name(), context_free_grammar_generator::context_free_grammar_generator(), help::convert_to_wml(), gui2::create_builder_widget(), ai::composite_aspect< T >::create_facet(), default_map_generator_job::default_generate_map(), ai::component_manager::delete_component(), events::map_command_handler< chat_command_handler >::dispatch(), events::chat_command_handler::do_gen_room_query(), do_interpolation(), gui::textbox::draw_contents(), gui::menu::style::draw_row_bg(), display::enable_menu(), utils::basic_string_view< charT, traits >::ends_with(), escape(), font::escape_text(), gui2::dialogs::game_load::evaluate_summary_string(), f_call(), f_parser(), unit_filter_impl::unit_filter_compound::fill(), ai::find_component(), find_ref(), color_t::from_argb_bytes(), color_t::from_rgba_bytes(), mp::game_info::game_info(), buffered_istream::get(), lua_kernel_base::get_attribute_names(), get_checksum(), preprocessor_data::get_chunk(), gui2::dialogs::gamestate_inspector::controller::get_controller(), replay::get_data_range(), wfl::map_callable::get_inputs(), replay::get_last_real_command(), get_noise(), wfl::variant_string::get_serialized_string(), controller_base::get_theme(), wfl::string_callable::get_value(), getcached(), getupvalname(), gui::textbox::handle_key_down(), campaignd::server::handle_request(), campaignd::server::handle_upload(), font::text_surface::hash(), config::hash(), events::map_command_handler< chat_command_handler >::help_command(), intf_debug_ai(), lua_gui2::intf_set_dialog_active(), lua_gui2::intf_set_dialog_callback(), lua_gui2::intf_set_dialog_canvas(), lua_gui2::intf_set_dialog_markup(), lua_gui2::intf_set_dialog_value(), lua_gui2::intf_set_dialog_visible(), l_randomizePivot(), llex(), game_config::load_config(), ai_testing::log_turn(), luaF_newCclosure(), luaF_newLclosure(), luaK_setlist(), luaL_loadfilex(), luaV_execute(), preferences::manager::manager(), markov_generate_name(), unit_animation::matches(), theme::modify(), gui2::dialogs::mp_options_helper::mp_options_helper(), gui2::dialogs::mp_join_game::network_handler(), gamemap::num_valid_starting_positions(), color_t::operator!=(), gui2::implementation::parse_list_data(), help::parse_text(), gui2::dialogs::formula_debugger::pre_show(), ai::print_component(), ai::component_manager::print_component_tree(), mp::lobby_info::process_gamelist(), mp::lobby_info::process_gamelist_diff(), mp::lobby_info::process_userlist(), events::pump(), preprocessor_data::put(), rank_castle_location(), statistics::stats::read(), actions::undo_action::read_event_vector(), read_line(), preprocessor_data::read_line(), preprocessor_data::read_rest_of_line(), read_string(), preprocessor_data::read_word(), events::map_command_handler< chat_command_handler >::register_command(), gui2::tree_view::remove_node(), gui2::toggle_button_definition::resolution::resolution(), gui2::toggle_panel_definition::resolution::resolution(), font::semi_escape_text(), gui2::chatbox::send_chat_message(), ai::typesafe_known_aspect< T >::set(), location_palette_item::set_item_id(), team::set_objectives_changed(), gui2::progress_bar::set_percentage(), utils::set_split(), editor::editor_map::set_starting_position_labels(), cave_map_generator::cave_map_generator_job::set_terrain(), gui2::chatbox::set_wesnothd_connection(), events::menu_handler::show_chat_log(), editor::editor_controller::show_menu(), controller_base::show_menu(), lua_gui2::show_message_box(), singlematch(), preprocessor_data::skip_eol(), preprocessor_data::skip_spaces(), skipBOM(), skipcomment(), utils::basic_string_view< charT, traits >::starts_with(), sound::stop_bell(), sound::stop_sound(), sound::stop_UI_sound(), str_char(), t_translation::string_to_layer_(), t_string_base::t_string_base(), test_eof(), mp_game_settings::to_config(), carryover_info::to_config(), attack_type::to_config(), tokenizer::tokenizer(), replay::undo_cut(), unescape(), unit::unit(), unit_moves(), unit_weapons(), gui2::multimenu_button::update_config_from_toggle_states(), utils::urlencode(), utf8_decode(), config::valid_id(), ai::variant_value_translator< terrain_filter >::variant_to_value(), gui2::builder_window::window_resolution::window_resolution(), game_events::WML_HANDLER_FUNCTION(), and ucs4_convert_impl::utf8_impl::write().

Definition at line 68 of file test_formula_core.cpp.

Referenced by unit_map::add(), theme::add_object(), plugins_manager::add_plugin(), image::apply_light(), archive_dir(), aux_close(), aux_upvalue(), auxsort(), blur_alpha_surface(), blur_surface(), BOOST_AUTO_TEST_CASE(), spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), cave_map_generator::cave_map_generator_job::cave_map_generator_job(), config::child_range(), choosePivot(), classend(), config::clear_diff_track(), wfl::formula_callable::convert_map(), createstdfile(), currentline(), currentpc(), wesnothd::game::debug_player_info(), wfl::variant_map::deref_iterator(), filesystem::dir_size(), config_attribute_value::empty(), ai::configuration::expand_simplified_aspects(), f_gc(), f_parser(), f_tostring(), gui2::listbox::finalize(), theme::find_element(), findlast(), findlocal(), funcinfo(), funcnamefromcode(), g_read(), cave_map_generator::cave_map_generator_job::generate_chambers(), events::map_command_handler< chat_command_handler >::get_aliases(), gui2::dialogs::gamestate_inspector::controller::get_controller(), preprocessor_streambuf::get_current_file(), unit_ability_list::get_extremum(), get_filename(), wfl::config_callable::get_value(), image::pixel_callable::get_value(), getiofile(), getupvalref(), gmatch(), wesnothd::server::handle_login(), wesnothd::server::handle_player_in_game(), ai::impl_ai_get(), lua_common::impl_vconfig_ipairs_collect(), lua_common::impl_vconfig_ipairs_iter(), lua_common::impl_vconfig_pairs_collect(), lua_common::impl_vconfig_pairs_iter(), unit_map::insert(), lua_fileops::intf_read_file(), lua_common::intf_textdomain(), io_fclose(), io_noclose(), io_open(), io_pclose(), io_popen(), io_readline(), io_tmpfile(), io_type(), wesnothd::ban_manager::is_ip_banned(), filesystem::is_root(), lua_fileops::load_file(), plugins_manager::load_plugin(), lua_rotate(), luaC_checkfinalizer(), luaD_precall(), luaF_findupval(), luaG_runerror(), luaG_traceexec(), luaH_set(), luaH_setint(), luaK_codek(), luaL_checkudata(), luaL_testudata(), luaS_new(), luaS_remove(), luaS_resize(), luaV_execute(), luaW_checkconfig(), luaW_toteam(), luaW_tounittype(), luaW_toweapon(), main(), makeseed(), matchbalance(), utils::smart_list< Data >::merge(), spirit_po::catalog< hashmap_type, pf_compiler >::merge(), mirror_walk(), unit_map::move(), filesystem::nearest_extant_parent(), newfile(), newprefile(), filesystem::normalize_path(), opencheck(), image::adjust_alpha_modification::operator()(), image::adjust_channels_modification::operator()(), vconfig::attribute_iterator::operator->(), vconfig::all_children_iterator::operator->(), operator<<(), desktop::os_version(), game_state::place_sides_in_preferred_locations(), sdl::point_in_rect(), image::precache_file_existence(), propagatemark(), pushclosure(), read_all(), read_chars(), game_config::config_cache::read_defines_queue(), config::recursive_clear_value(), remarkupvals(), config::remove_child(), config::remove_children(), utils::smart_list< Data >::remove_if(), theme::remove_object(), lua_fileops::resolve_filename(), scanformat(), searcher_Croot(), wesnothd::game::send_user_list(), separatetobefnz(), skipBOM(), utils::square_parenthetical_split(), str_char(), str_find_aux(), str_gsub(), str_lower(), str_rep(), str_reverse(), str_upper(), sweeplist(), sweeptolive(), config_attribute_value::t_str(), config_attribute_value::to_bool(), mp_game_settings::to_config(), tofile(), ai::try_aspect_as(), tryfuncTM(), wesnothd::ban_manager::unban_group(), actions::undo_action::undo_action(), utils::smart_list< Data >::unique(), schema_validation::schema_validator::validate(), varinfo(), game_events::WML_HANDLER_FUNCTION(), write_str_int_map(), and gui2::widget::~widget().