QTestFixture Class Reference

Base class for all Gazebo GUI unit tests. More...

#include <QTestFixture.hh>

Inherits QObject.

Public Member Functions

 QTestFixture ()
 

Protected Member Functions

void GetMemInfo (double &_resident, double &_share)
 Get memory information about the current process. More...
 
void Load (const std::string &_worldFilename, bool _paused=false, bool _serverScene=true, bool _clientScene=false)
 Load a world. More...
 
void ProcessEventsAndDraw (QMainWindow *_mainWindow=NULL, const unsigned int _repeat=10, const unsigned int _ms=30)
 Give the GUI time to process events and trigger main window repaint. More...
 
void SetPause (bool _pause)
 Pause or unpause the world. More...
 

Protected Attributes

double resMaxPercentChange
 Maximum allowed percent change in resident memory usage. More...
 
gazebo::Serverserver
 The Gazebo server, which is run in a thread. More...
 
boost::thread * serverThread
 Thread to run the Gazebo server. More...
 
double shareMaxPercentChange
 Maximum allowed percent change in shared memory usage. More...
 

Detailed Description

Base class for all Gazebo GUI unit tests.

Constructor & Destructor Documentation

Member Function Documentation

void GetMemInfo ( double &  _resident,
double &  _share 
)
protected

Get memory information about the current process.

Parameters
[out]_residentResident size, in Kb.
[out]_shareShared memory, in Kb.
void Load ( const std::string &  _worldFilename,
bool  _paused = false,
bool  _serverScene = true,
bool  _clientScene = false 
)
protected

Load a world.

Parameters
[in]_worldFilenameName of the world to load.
[in]_pausedTrue to start the world paused.
[in]_serverSceneTrue to create a scene on the server
[in]_clientSceneTrue to create a scene on the client
void ProcessEventsAndDraw ( QMainWindow *  _mainWindow = NULL,
const unsigned int  _repeat = 10,
const unsigned int  _ms = 30 
)
protected

Give the GUI time to process events and trigger main window repaint.

Parameters
[in]_mainWindowPointer to the main window. If left void, repaint won't be triggered.
[in]_repeatNumber of times to repeat the loop.
[in]_msTime to sleep for each loop in milliseconds.
void SetPause ( bool  _pause)
protected

Pause or unpause the world.

Parameters
[in]_pauseTrue to pause the world

Member Data Documentation

double resMaxPercentChange
protected

Maximum allowed percent change in resident memory usage.

gazebo::Server* server
protected

The Gazebo server, which is run in a thread.

boost::thread* serverThread
protected

Thread to run the Gazebo server.

double shareMaxPercentChange
protected

Maximum allowed percent change in shared memory usage.


The documentation for this class was generated from the following file: