Advanced Strategic Command
unittestutil.h
Go to the documentation of this file.
1 /***************************************************************************
2  * *
3  * This program is free software; you can redistribute it and/or modify *
4  * it under the terms of the GNU General Public License as published by *
5  * the Free Software Foundation; either version 2 of the License, or *
6  * (at your option) any later version. *
7  * *
8  ***************************************************************************/
9 
10 #ifndef unittestutilH
11 #define unittestutilH
12 
13 #include "../ascstring.h"
14 #include "../errors.h"
15 #include "../actions/context.h"
16 #include "../vehicle.h"
17 #include "../turncontrol.h"
18 
19 extern GameMap* startMap( const ASCString& filename );
20 
21 class TestFailure : public ASCmsgException {
22  public:
23  TestFailure( const ASCString& message ) : ASCmsgException (message ){
24  }
25 };
26 
27 extern Context createTestingContext( GameMap* gamemap );
28 extern void testCargoMovement( Vehicle* veh, int movement );
29 extern void testCargoMovementMax( Vehicle* veh, int movement );
30 extern Vehicle* getFirstCargo( ContainerBase* carrier );
31 extern void move( Vehicle* veh, const MapCoordinate& dest );
32 extern void move( Vehicle* veh, const MapCoordinate3D& dest );
33 extern void attack( Vehicle* veh, const MapCoordinate& target );
34 
35 
36 #endif
ASCString message
Definition: errors.h:39
ASCString filename
The name of the file from which the item was loaded.
Definition: typen.h:290
GameMap * startMap(const ASCString &filename)
void testCargoMovementMax(Vehicle *veh, int movement)
The ASCString class provides an abstract way to manipulate strings.
Definition: ascstring.h:14
TestFailure(const ASCString &message)
Definition: unittestutil.h:23
Context createTestingContext(GameMap *gamemap)
void attack(Vehicle *veh, const MapCoordinate &target)
Coordinate on the twodimensional map.
Definition: typen.h:202
void move(Vehicle *veh, const MapCoordinate &dest)
void testCargoMovement(Vehicle *veh, int movement)
Coordinate on the map including height.
Definition: typen.h:238
The parent class of Vehicle and Building; The name Container originates from Battle Isle...
Definition: containerbase.h:40
Vehicle * getFirstCargo(ContainerBase *carrier)
The map. THE central structure of ASC, which holds everything not globally available together...
Definition: gamemap.h:182