Classes | Typedefs | Functions

test_utils Namespace Reference

Classes

class  fake_display_manager
struct  less_ptr
class  event_node
 Base class for all event nodes to be used to fire fake input events. More...
class  event_node_keyboard
 modifies SDL_GetKeyState table to have correct state. More...
class  event_node_mouse_motion
 Uses special SDL_WarpMouse function to generate mouse move events. More...
class  event_node_mouse_click
 Used to create SDL_MOUSEBUTTONDOWN/UP events with correct x,y values. More...
class  fake_event_source
 fake_event_source is used to generate new events in events::pump() Timing used in function is loop counter incremented everytime events::pump() is called. More...
class  game_config_manager
struct  add_key_type_to_source
class  end_position_collector
class  timing
class  play_scenario
 simple abstaction to settup scenario playing test case More...

Typedefs

typedef boost::shared_ptr
< event_node
event_node_ptr

Functions

game_displayget_fake_display (const int width, const int height)
 Gets a fake test display.
static bool match_english (const language_def &def)
const configget_test_config_ref ()
config get_test_config ()
template<class T >
bool one_of (const T &val, int va_number,...)
 Used to check if first parameter matches one of given values used with BOOST_CHECK_PREDICATE.

Typedef Documentation

typedef boost::shared_ptr<event_node> test_utils::event_node_ptr

Definition at line 103 of file fake_event_source.hpp.


Function Documentation

game_display & test_utils::get_fake_display ( const int  width,
const int  height 
)

Gets a fake test display.

The width and height parameter are ignored if either of them is less than zero.

Parameters:
width The width of the display.
height The height of the dislay.
Returns:
The display.

Referenced by test_utils::play_scenario::play(), and wesnoth_global_fixture::wesnoth_global_fixture().

Here is the caller graph for this function:

config test_utils::get_test_config (  ) 

Referenced by BOOST_AUTO_TEST_CASE().

Here is the caller graph for this function:

const config & test_utils::get_test_config_ref (  ) 

Referenced by config_cache_fixture::config_cache_fixture().

Here is the caller graph for this function:

static bool test_utils::match_english ( const language_def def  )  [static]

Definition at line 35 of file game_config_manager.cpp.

References language_def::localename.

template<class T >
bool test_utils::one_of ( const T &  val,
int  va_number,
  ... 
)

Used to check if first parameter matches one of given values used with BOOST_CHECK_PREDICATE.

Definition at line 28 of file predicate.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:25:40 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs