00001 /* $Id: test_formula_ai.cpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2008 - 2012 by Pauli Nieminen <paniemin@cc.hut.fi> 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY. 00012 00013 See the COPYING file for more details. 00014 */ 00015 00016 #define GETTEXT_DOMAIN "wesnoth-test" 00017 00018 #include <boost/test/unit_test.hpp> 00019 00020 00021 00022 #include "tests/utils/play_scenario.hpp" 00023 00024 00025 BOOST_AUTO_TEST_SUITE( formula_ai ) 00026 00027 BOOST_AUTO_TEST_CASE( test_move ) 00028 { 00029 test_utils::play_scenario scenario("formula"); 00030 00031 scenario.add_formula_command("move(loc(11,3), loc(15,5))"); 00032 00033 scenario.play(); 00034 00035 // Remember that map_location() handles automatically transition to 1 based from 0 based locations 00036 BOOST_CHECK_EQUAL(scenario.get_unit_id(map_location(14, 4)), "side_1_leader"); 00037 } 00038 00039 00040 BOOST_AUTO_TEST_SUITE_END()
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:12 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |