maptest.cpp

Go to the documentation of this file.
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 #include <iostream>
00011 
00012 #include "../actions/jumpdrivecommand.h"
00013 #include "../loaders.h"
00014 #include "../itemrepository.h"
00015 #include "unittestutil.h"
00016 #include "../gamemap.h"
00017 #include "../lua/luarunner.h"
00018 #include "../lua/luastate.h"
00019 #include "../spfst-legacy.h"
00020 
00021 
00022 void runScript( const ASCString& script ) 
00023 {
00024    LuaState state;
00025    LuaRunner runner( state );
00026    runner.runFile( script );
00027    assertOrThrow( runner.getErrors().empty() );
00028 }
00029 
00030 void testMaps() 
00031 {
00032    auto_ptr<GameMap> game ( startMap("kam005.map"));
00033    actmap = game.get();
00034    runScript( "kam005.lua" );
00035    actmap = NULL;
00036 }
00037 

Generated on Mon May 21 01:26:35 2012 for Advanced Strategic Command by  doxygen 1.5.1