The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros | Functions | Variables
test_map_location.cpp File Reference
#include <boost/assign/list_of.hpp>
#include "utils/functional.hpp"
#include <boost/test/unit_test.hpp>
#include "map/location.hpp"
Include dependency graph for test_map_location.cpp:

Go to the source code of this file.

Classes

struct  MLFixture
 

Macros

#define GETTEXT_DOMAIN   "wesnoth-test"
 

Functions

 BOOST_GLOBAL_FIXTURE (MLFixture)
 
 BOOST_AUTO_TEST_SUITE (test_map_location)
 
static map_location vector_difference (const map_location &v1, const map_location &v2)
 
static void characterization_distance_direction (const std::vector< map_location > &locs, const std::vector< map_location::DIRECTION > &dir_answers, const std::vector< size_t > &int_answers, map_location::RELATIVE_DIR_MODE mode)
 
static size_t get_first (std::pair< size_t, std::string > arg)
 
static map_location::DIRECTION get_second (std::pair< size_t, std::string > arg)
 
 BOOST_AUTO_TEST_CASE (map_location_characterization_test_radial_mode)
 
static std::pair< map_location,
map_location
mirror_walk (std::pair< map_location, map_location > p, map_location::DIRECTION d)
 
 BOOST_AUTO_TEST_CASE (reality_check_vector_negation)
 
static void reality_check_get_direction_helper (const map_location &loc, const map_location::DIRECTION d)
 
 BOOST_AUTO_TEST_CASE (reality_check_get_direction)
 
static map_location::DIRECTION legacy_get_opposite_dir (map_location::DIRECTION d)
 
 BOOST_AUTO_TEST_CASE (check_get_opposite_dir_refactor)
 
 BOOST_AUTO_TEST_CASE (check_rotate)
 
static void rotate_around_centers (const std::vector< map_location > &locs)
 
 BOOST_AUTO_TEST_CASE (check_rotate_around_center)
 

Variables

static std::vector< map_locationpreset_locs
 
static map_location va
 
static map_location vb
 
static map_location vc
 
static map_location vz
 
static map_location vt1
 
static map_location vt2
 
static map_location vt3
 
static map_location vs1
 
static map_location vs2
 
static map_location vs3
 
static map_location vs4
 
static map_location::DIRECTION n = map_location::NORTH
 
static map_location::DIRECTION ne = map_location::NORTH_EAST
 
static map_location::DIRECTION nw = map_location::NORTH_WEST
 
static map_location::DIRECTION s = map_location::SOUTH
 
static map_location::DIRECTION se = map_location::SOUTH_EAST
 
static map_location::DIRECTION sw = map_location::SOUTH_WEST
 

Macro Definition Documentation

#define GETTEXT_DOMAIN   "wesnoth-test"

Definition at line 15 of file test_map_location.cpp.

Function Documentation

BOOST_AUTO_TEST_CASE ( map_location_characterization_test_radial_mode  )
BOOST_AUTO_TEST_CASE ( reality_check_vector_negation  )

Definition at line 276 of file test_map_location.cpp.

References mirror_walk(), ne, nw, se, and sw.

BOOST_AUTO_TEST_CASE ( reality_check_get_direction  )

Definition at line 306 of file test_map_location.cpp.

References ne, nw, reality_check_get_direction_helper(), se, and sw.

BOOST_AUTO_TEST_CASE ( check_get_opposite_dir_refactor  )
BOOST_AUTO_TEST_CASE ( check_rotate  )
BOOST_AUTO_TEST_CASE ( check_rotate_around_center  )

Definition at line 400 of file test_map_location.cpp.

References rotate_around_centers().

BOOST_AUTO_TEST_SUITE ( test_map_location  )
BOOST_GLOBAL_FIXTURE ( MLFixture  )
static void characterization_distance_direction ( const std::vector< map_location > &  locs,
const std::vector< map_location::DIRECTION > &  dir_answers,
const std::vector< size_t > &  int_answers,
map_location::RELATIVE_DIR_MODE  mode 
)
static
static size_t get_first ( std::pair< size_t, std::string arg)
static

Definition at line 131 of file test_map_location.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

static map_location::DIRECTION get_second ( std::pair< size_t, std::string arg)
static

Definition at line 132 of file test_map_location.cpp.

References map_location::parse_direction().

Referenced by BOOST_AUTO_TEST_CASE().

static map_location::DIRECTION legacy_get_opposite_dir ( map_location::DIRECTION  d)
static
static std::pair<map_location , map_location> mirror_walk ( std::pair< map_location, map_location p,
map_location::DIRECTION  d 
)
static

Definition at line 268 of file test_map_location.cpp.

References map_location::get_opposite_dir().

Referenced by BOOST_AUTO_TEST_CASE().

static void reality_check_get_direction_helper ( const map_location loc,
const map_location::DIRECTION  d 
)
static
static void rotate_around_centers ( const std::vector< map_location > &  locs)
static

Definition at line 383 of file test_map_location.cpp.

References map_location::rotate_right_around_center().

Referenced by BOOST_AUTO_TEST_CASE().

static map_location vector_difference ( const map_location v1,
const map_location v2 
)
static

Variable Documentation

Definition at line 25 of file test_map_location.cpp.

std::vector<map_location> preset_locs
static

Definition at line 23 of file test_map_location.cpp.

Definition at line 28 of file test_map_location.cpp.

map_location va
static

Definition at line 24 of file test_map_location.cpp.

map_location vb
static

Definition at line 24 of file test_map_location.cpp.

map_location vc
static

Definition at line 24 of file test_map_location.cpp.

map_location vs1
static

Definition at line 24 of file test_map_location.cpp.

map_location vs2
static

Definition at line 24 of file test_map_location.cpp.

map_location vs3
static

Definition at line 24 of file test_map_location.cpp.

map_location vs4
static

Definition at line 24 of file test_map_location.cpp.

map_location vt1
static

Definition at line 24 of file test_map_location.cpp.

map_location vt2
static

Definition at line 24 of file test_map_location.cpp.

map_location vt3
static

Definition at line 24 of file test_map_location.cpp.

map_location vz
static

Definition at line 24 of file test_map_location.cpp.