#include "../ascstring.h"#include "../errors.h"#include "../actions/context.h"#include "../vehicle.h"#include "../turncontrol.h"Include dependency graph for unittestutil.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | TestFailure |
Functions | |
| GameMap * | startMap (const ASCString &filename) |
| Context | createTestingContext (GameMap *gamemap) |
| void | testCargoMovement (Vehicle *veh, int movement) |
| void | testCargoMovementMax (Vehicle *veh, int movement) |
| Vehicle * | getFirstCargo (ContainerBase *carrier) |
| void | move (Vehicle *veh, const MapCoordinate &dest) |
| void | attack (Vehicle *veh, const MapCoordinate &target) |
| void attack | ( | Vehicle * | veh, | |
| const MapCoordinate & | target | |||
| ) |
Definition at line 32 of file unittestutil.cpp.
References ActionRegistry::AttackCommand, createTestingContext(), and ActionResult::successful().
Referenced by GuiFunctions::AttackGui::execute(), GuiFunctions::Attack::execute(), testAttack1(), testAttack2(), testAttack3(), testLoseMap(), testView1(), and testView3().
Definition at line 66 of file unittestutil.cpp.
References Context::actingPlayer, Context::actionContainer, GameMap::actions, GameMap::actplayer, Context::display, Context::gamemap, GameMap::getPlayer(), GameMap::getPlayerView(), Context::parentAction, and Context::viewingPlayer.
Referenced by attack(), move(), moveUnitTest(), runTasks(), testActions(), testAttack1(), testAttack2(), testAttack3(), testDiplomacy1(), testDiplomacy2(), testDiplomacy3(), testHeightChangeAI(), testHeightChangeGUI(), testJumpdrive(), testMapResizeWithMovement(), testMovement1(), testMovementFieldsReachable(), testMovementTracks(), testObjectConstruction1(), testObjectRemoval(), testRecycling(), testresearch1(), testresearch2(), testTransferControl(), testView1(), and testView3().
| Vehicle* getFirstCargo | ( | ContainerBase * | carrier | ) |
Definition at line 101 of file unittestutil.cpp.
References ContainerBase::getCargo().
Referenced by testRecycling(), and testTransferControl().
| void move | ( | Vehicle * | veh, | |
| const MapCoordinate & | dest | |||
| ) |
Definition at line 21 of file unittestutil.cpp.
References createTestingContext(), ActionRegistry::MoveUnitCommand, and ActionResult::successful().
Referenced by CargoGuiFunctions::Movement::execute(), GuiFunctions::MovementBase::execute(), PathFinder::getMovementFields(), TrainUnitCommand::go(), WeatherSystem::read(), Vehicle::resetMovement(), MoveUnit::runAction(), testActions(), testAttack2(), testMovement1(), testMovementRF(), testMovementTracks(), testView1(), and testView2().
Definition at line 44 of file unittestutil.cpp.
References GameMap::actplayer, computeview(), LoadableItemType::filename, GameMap::levelfinished, tmaploaders::loadmap(), mapLoadingExceptionChecker(), next_turn(), and GameMap::replayinfo.
Referenced by testActions(), testAiHeliMovement1(), testAiMovement1(), testAiMovement2(), testAiMovement3(), testAiMovement4(), testAiMovement5(), testAiMovement6(), testAiMovement7(), testAiService1(), testAiService2(), testAttack1(), testAttack2(), testAttack3(), testDiplomacy1(), testDiplomacy2(), testDiplomacy3(), testHeightChangeAI(), testHeightChangeGUI(), testJumpdrive(), testLongDistMovement(), testLoseMap(), testMapResizeWithMovement(), testMaps(), testMovement1(), testMovementFieldsReachable(), testMovementRF(), testMovementTracks(), testObjectConstruction1(), testObjectRemoval(), testRecycling(), testresearch1(), testresearch2(), testTransferControl(), testView1(), testView2(), and testView3().
| void testCargoMovement | ( | Vehicle * | veh, | |
| int | movement | |||
| ) |
Definition at line 79 of file unittestutil.cpp.
References assertOrThrow, ContainerBase::getCargo(), Vehicle::getMovement(), and testCargoMovement().
Referenced by testAttack1(), testCargoMovement(), and testMovement1().
| void testCargoMovementMax | ( | Vehicle * | veh, | |
| int | movement | |||
| ) |
Definition at line 90 of file unittestutil.cpp.
References assertOrThrow, ContainerBase::getCargo(), Vehicle::getMovement(), and testCargoMovementMax().
Referenced by testCargoMovementMax().
1.5.1