Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEInternalTest Class Reference

#include <GNEInternalTest.h>

Inheritance diagram for GNEInternalTest:
[legend]
Collaboration diagram for GNEInternalTest:
[legend]

Public Member Functions

const std::map< std::string, int > & getAttributesEnum () const
 get map with attributesEnum jump steps
 
const std::map< std::string, InternalTest::ContextualMenu > & getContextualMenuOperations () const
 get map with contextual menu operation jump steps
 
const InternalTest::ViewPositiongetLastMovedPosition () const
 get last moved position
 
const std::map< std::string, InternalTest::Movement > & getMovements () const
 get map with movement pairs
 
FXint getTime () const
 get currentTime
 
const std::map< std::string, InternalTest::ViewPosition > & getViewPositions () const
 get map with view position pairs
 
 GNEInternalTest (const std::string &testFile)
 constructor
 
std::vector< InternalTest::ViewPositioninterpolateViewPositions (const InternalTest::ViewPosition &viewStartPosition, const int offsetStartX, const int offsetStartY, const InternalTest::ViewPosition &viewEndPosition, const int offsetEndX, const int offsetEndY) const
 interpolate view positions
 
bool isRunning () const
 check if test is running
 
void runNeteditInternalTests (GNEApplicationWindow *applicationWindow)
 run netedit internal test
 
void updateLastMovedPosition (const int x, const int y)
 update last moved position
 
 ~GNEInternalTest ()
 destructor
 
functions related with test steps
void addTestSteps (InternalTestStep *internalTestStep)
 add test steps
 
InternalTestStepgetCurrentStep () const
 get current step
 
InternalTestStepsetNextStep ()
 get current step and set next step
 

Protected Member Functions

std::vector< std::string > cleanLines (const std::vector< std::pair< bool, std::string > > &linesRaw) const
 clear lines
 
std::map< std::string, int > parseAttributesEnumFile (const std::string filePath) const
 parse attributesEnum file
 
std::map< std::string, InternalTest::ContextualMenuparseContextualMenuOperationsFile (const std::string filePath) const
 parse attributesEnum file
 
std::map< std::string, InternalTest::MovementparseMovementsFile (const std::string filePath) const
 parse movements file
 
std::map< std::string, InternalTest::ViewPositionparseViewPositionsFile (const std::string filePath) const
 parse viewPositions file
 
bool startWith (const std::string &str, const std::string &prefix) const
 check if the given string start with
 

Protected Attributes

std::map< std::string, int > myAttributesEnum
 vector with attributesEnum jump steps
 
std::map< std::string, InternalTest::ContextualMenumyContextualMenuOperations
 vector with contextual menu operation jump steps
 
InternalTestStepmyCurrentTestStep = nullptr
 current test step
 
InternalTestStepmyInitialTestStep = nullptr
 initial test steps
 
InternalTest::ViewPosition myLastMovedPosition
 last moved position
 
InternalTestStepmyLastTestStep = nullptr
 last test steps
 
std::map< std::string, InternalTest::MovementmyMovements
 vector with movements
 
bool myRunning = false
 flag to indicate if test is running
 
std::map< std::string, InternalTest::ViewPositionmyViewPositions
 vector with view positions
 

Private Member Functions

 GNEInternalTest ()=delete
 Invalidated default constructor.
 
 GNEInternalTest (const GNEInternalTest &)=delete
 Invalidated copy constructor.
 
GNEInternalTestoperator= (const GNEInternalTest &src)=delete
 Invalidated assignment operator.
 

Detailed Description

Definition at line 35 of file GNEInternalTest.h.

Constructor & Destructor Documentation

◆ GNEInternalTest() [1/3]

GNEInternalTest::GNEInternalTest ( const std::string &  testFile)

constructor

Definition at line 35 of file GNEInternalTest.cpp.

◆ ~GNEInternalTest()

GNEInternalTest::~GNEInternalTest ( )

destructor

Definition at line 40 of file GNEInternalTest.cpp.

◆ GNEInternalTest() [2/3]

GNEInternalTest::GNEInternalTest ( )
privatedelete

Invalidated default constructor.

◆ GNEInternalTest() [3/3]

GNEInternalTest::GNEInternalTest ( const GNEInternalTest )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ addTestSteps()

void InternalTest::addTestSteps ( InternalTestStep internalTestStep)
inherited

add test steps

Definition at line 201 of file InternalTest.cpp.

References InternalTest::myCurrentTestStep, InternalTest::myInitialTestStep, InternalTest::myLastTestStep, and InternalTestStep::setNextStep().

Referenced by InternalTestStep::InternalTestStep(), InternalTestStep::InternalTestStep(), InternalTestStep::InternalTestStep(), and InternalTestStep::InternalTestStep().

Here is the caller graph for this function:

◆ cleanLines()

std::vector< std::string > InternalTest::cleanLines ( const std::vector< std::pair< bool, std::string > > &  linesRaw) const
protectedinherited

clear lines

Definition at line 464 of file InternalTest.cpp.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ getAttributesEnum()

◆ getContextualMenuOperations()

const std::map< std::string, InternalTest::ContextualMenu > & InternalTest::getContextualMenuOperations ( ) const
inherited

get map with contextual menu operation jump steps

Definition at line 251 of file InternalTest.cpp.

References InternalTest::myContextualMenuOperations.

Referenced by InternalTestStep::contextualMenuOperation().

Here is the caller graph for this function:

◆ getCurrentStep()

InternalTestStep * InternalTest::getCurrentStep ( ) const
inherited

get current step

Definition at line 224 of file InternalTest.cpp.

References InternalTest::myCurrentTestStep.

Referenced by runNeteditInternalTests().

Here is the caller graph for this function:

◆ getLastMovedPosition()

const InternalTest::ViewPosition & InternalTest::getLastMovedPosition ( ) const
inherited

get last moved position

Definition at line 269 of file InternalTest.cpp.

References InternalTest::myLastMovedPosition.

Referenced by InternalTestStep::buildMouseClickEvent(), and InternalTestStep::buildMouseMoveEvent().

Here is the caller graph for this function:

◆ getMovements()

const std::map< std::string, InternalTest::Movement > & InternalTest::getMovements ( ) const
inherited

get map with movement pairs

Definition at line 263 of file InternalTest.cpp.

References InternalTest::myMovements.

Referenced by InternalTestStep::moveElement(), InternalTestStep::moveElementHorizontal(), and InternalTestStep::moveElementVertical().

Here is the caller graph for this function:

◆ getTime()

FXint InternalTest::getTime ( ) const
inherited

get currentTime

Definition at line 236 of file InternalTest.cpp.

Referenced by InternalTestStep::buildKeyPressEvent(), InternalTestStep::buildKeyReleaseEvent(), InternalTestStep::buildMouseClickEvent(), and InternalTestStep::buildMouseMoveEvent().

Here is the caller graph for this function:

◆ getViewPositions()

◆ interpolateViewPositions()

std::vector< InternalTest::ViewPosition > InternalTest::interpolateViewPositions ( const InternalTest::ViewPosition viewStartPosition,
const int  offsetStartX,
const int  offsetStartY,
const InternalTest::ViewPosition viewEndPosition,
const int  offsetEndX,
const int  offsetEndY 
) const
inherited

interpolate view positions

Definition at line 281 of file InternalTest.cpp.

References InternalTest::ViewPosition::getX(), InternalTest::ViewPosition::getY(), and numPointsInterpolation.

Referenced by InternalTestStep::buildMouseDragDrop().

Here is the caller graph for this function:

◆ isRunning()

bool InternalTest::isRunning ( ) const
inherited

check if test is running

Definition at line 230 of file InternalTest.cpp.

References InternalTest::myRunning.

Referenced by GNEDeleteFrame::SubordinatedElements::checkElements(), and GNEApplicationWindow::onCmdRunTests().

Here is the caller graph for this function:

◆ operator=()

GNEInternalTest & GNEInternalTest::operator= ( const GNEInternalTest src)
privatedelete

Invalidated assignment operator.

◆ parseAttributesEnumFile()

std::map< std::string, int > InternalTest::parseAttributesEnumFile ( const std::string  filePath) const
protectedinherited

parse attributesEnum file

Definition at line 305 of file InternalTest.cpp.

References StringUtils::isInt(), TL, StringUtils::toInt(), and WRITE_ERRORF.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ parseContextualMenuOperationsFile()

std::map< std::string, InternalTest::ContextualMenu > InternalTest::parseContextualMenuOperationsFile ( const std::string  filePath) const
protectedinherited

parse attributesEnum file

Definition at line 336 of file InternalTest.cpp.

References StringUtils::isInt(), TL, and WRITE_ERRORF.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ parseMovementsFile()

std::map< std::string, InternalTest::Movement > InternalTest::parseMovementsFile ( const std::string  filePath) const
protectedinherited

parse movements file

Definition at line 421 of file InternalTest.cpp.

References StringUtils::isInt(), TL, and WRITE_ERRORF.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ parseViewPositionsFile()

std::map< std::string, InternalTest::ViewPosition > InternalTest::parseViewPositionsFile ( const std::string  filePath) const
protectedinherited

parse viewPositions file

Definition at line 386 of file InternalTest.cpp.

References StringUtils::isInt(), TL, and WRITE_ERRORF.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ runNeteditInternalTests()

void GNEInternalTest::runNeteditInternalTests ( GNEApplicationWindow applicationWindow)

run netedit internal test

Definition at line 44 of file GNEInternalTest.cpp.

References InternalTestStep::APP, InternalTest::getCurrentStep(), GNEApplicationWindow::getViewNet(), GNEViewNet::getViewParent(), InternalTestStep::INIT, InternalTest::myRunning, InternalTest::setNextStep(), InternalTestStep::TLS_PHASES, InternalTestStep::TLS_PHASETABLE, and InternalTestStep::VIEW.

Referenced by GNEApplicationWindow::onCmdRunTests().

Here is the caller graph for this function:

◆ setNextStep()

InternalTestStep * InternalTest::setNextStep ( )
inherited

get current step and set next step

Definition at line 216 of file InternalTest.cpp.

References InternalTestStep::getNextStep(), and InternalTest::myCurrentTestStep.

Referenced by GNEDialog::openDialog(), and runNeteditInternalTests().

Here is the caller graph for this function:

◆ startWith()

bool InternalTest::startWith ( const std::string &  str,
const std::string &  prefix 
) const
protectedinherited

check if the given string start with

Definition at line 478 of file InternalTest.cpp.

Referenced by InternalTest::InternalTest().

Here is the caller graph for this function:

◆ updateLastMovedPosition()

void InternalTest::updateLastMovedPosition ( const int  x,
const int  y 
)
inherited

update last moved position

Definition at line 275 of file InternalTest.cpp.

References InternalTest::myLastMovedPosition.

Referenced by InternalTestStep::buildMouseMoveEvent(), and InternalTestStep::setupAndStart().

Here is the caller graph for this function:

Field Documentation

◆ myAttributesEnum

std::map<std::string, int> InternalTest::myAttributesEnum
protectedinherited

vector with attributesEnum jump steps

Definition at line 202 of file InternalTest.h.

Referenced by InternalTest::getAttributesEnum(), and InternalTest::InternalTest().

◆ myContextualMenuOperations

std::map<std::string, InternalTest::ContextualMenu> InternalTest::myContextualMenuOperations
protectedinherited

vector with contextual menu operation jump steps

Definition at line 205 of file InternalTest.h.

Referenced by InternalTest::getContextualMenuOperations(), and InternalTest::InternalTest().

◆ myCurrentTestStep

InternalTestStep* InternalTest::myCurrentTestStep = nullptr
protectedinherited

current test step

Definition at line 196 of file InternalTest.h.

Referenced by InternalTest::addTestSteps(), InternalTest::getCurrentStep(), and InternalTest::setNextStep().

◆ myInitialTestStep

InternalTestStep* InternalTest::myInitialTestStep = nullptr
protectedinherited

initial test steps

Definition at line 190 of file InternalTest.h.

Referenced by InternalTest::addTestSteps(), and InternalTest::~InternalTest().

◆ myLastMovedPosition

InternalTest::ViewPosition InternalTest::myLastMovedPosition
protectedinherited

last moved position

Definition at line 214 of file InternalTest.h.

Referenced by InternalTest::getLastMovedPosition(), and InternalTest::updateLastMovedPosition().

◆ myLastTestStep

InternalTestStep* InternalTest::myLastTestStep = nullptr
protectedinherited

last test steps

Definition at line 193 of file InternalTest.h.

Referenced by InternalTest::addTestSteps().

◆ myMovements

std::map<std::string, InternalTest::Movement> InternalTest::myMovements
protectedinherited

vector with movements

Definition at line 211 of file InternalTest.h.

Referenced by InternalTest::getMovements(), and InternalTest::InternalTest().

◆ myRunning

bool InternalTest::myRunning = false
protectedinherited

flag to indicate if test is running

Definition at line 199 of file InternalTest.h.

Referenced by InternalTest::isRunning(), and runNeteditInternalTests().

◆ myViewPositions

std::map<std::string, InternalTest::ViewPosition> InternalTest::myViewPositions
protectedinherited

vector with view positions

Definition at line 208 of file InternalTest.h.

Referenced by InternalTest::getViewPositions(), and InternalTest::InternalTest().


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