Advanced Strategic Command
eventtest.cpp
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 
11 #include "../actions/moveunitcommand.h"
12 #include "../loaders.h"
13 #include "../itemrepository.h"
14 #include "unittestutil.h"
15 
16 
17 void testLoseMap()
18 {
19  auto_ptr<GameMap> game ( startMap("unittest-eventlose.map"));
20 
21  Vehicle* veh = game->getField(5,4)->vehicle;
22  assertOrThrow( veh != NULL );
23 
24  attack( veh, MapCoordinate( 6,6 ));
25 
26  next_turn( game.get(), NextTurnStrategy_Abort(), NULL, -1 );
27 
28  assertOrThrow ( game->actplayer == 2 );
29 
30 }
31 
32 void testEvents()
33 {
34  // testLoseMap();
35 }
#define assertOrThrow(expr)
Definition: errors.h:69
void testEvents()
Definition: eventtest.cpp:32
void next_turn(GameMap *gamemap, const NextTurnStrategy &nextTurnStrategy, MapDisplayInterface *display, int playerView)
Coordinate on the twodimensional map.
Definition: typen.h:202
GameMap * startMap(const ASCString &filename)
void attack(Vehicle *veh, const MapCoordinate &target)
void testLoseMap()
Definition: eventtest.cpp:17