00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * (at your option) any later version. * 00007 * * 00008 ***************************************************************************/ 00009 00010 #ifndef unittestutilH 00011 #define unittestutilH 00012 00013 #include "../ascstring.h" 00014 #include "../errors.h" 00015 #include "../actions/context.h" 00016 #include "../vehicle.h" 00017 #include "../turncontrol.h" 00018 00019 extern GameMap* startMap( const ASCString& filename ); 00020 00021 class TestFailure : public ASCmsgException { 00022 public: 00023 TestFailure( const ASCString& message ) : ASCmsgException (message ){ 00024 } 00025 }; 00026 00027 extern Context createTestingContext( GameMap* gamemap ); 00028 extern void testCargoMovement( Vehicle* veh, int movement ); 00029 extern void testCargoMovementMax( Vehicle* veh, int movement ); 00030 extern Vehicle* getFirstCargo( ContainerBase* carrier ); 00031 extern void move( Vehicle* veh, const MapCoordinate& dest ); 00032 extern void attack( Vehicle* veh, const MapCoordinate& target ); 00033 00034 00035 #endif
1.5.1