From 8d497e4b50d5fabbfb4d377aa427ead5dd1bbeac Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 15 Mar 2011 20:00:54 -0700 Subject: [PATCH] change the way the market tests are included. --- src/gamecode.vcxproj | 5 +---- src/gamecode/market.c | 4 ---- src/gamecode/market_test.c | 16 +++++++++++++++- src/tests.c | 3 +-- src/tests.h | 2 ++ 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/gamecode.vcxproj b/src/gamecode.vcxproj index 0872d49ec..17572c776 100644 --- a/src/gamecode.vcxproj +++ b/src/gamecode.vcxproj @@ -99,10 +99,7 @@ - - true - true - + diff --git a/src/gamecode/market.c b/src/gamecode/market.c index 569a29b37..d49e528b6 100644 --- a/src/gamecode/market.c +++ b/src/gamecode/market.c @@ -177,7 +177,3 @@ void do_markets(void) ql_free(traders); } } - -#ifndef DISABLE_TESTS -#include "market_test.c" -#endif diff --git a/src/gamecode/market_test.c b/src/gamecode/market_test.c index b697ccc53..d60c71982 100644 --- a/src/gamecode/market_test.c +++ b/src/gamecode/market_test.c @@ -1,7 +1,21 @@ #include -#include +#include "platform.h" +#include "market.h" +#include "tests.h" + +#include +#include +#include +#include +#include +#include #include +#include + +#include + +#include static void market_curse(CuTest * tc) { diff --git a/src/tests.c b/src/tests.c index 7224b4dbf..fa5b6e315 100644 --- a/src/tests.c +++ b/src/tests.c @@ -10,8 +10,7 @@ #include #include #include - -CuSuite *get_market_suite(void); +#include #include #include diff --git a/src/tests.h b/src/tests.h index 01cef3516..2a3c4f625 100644 --- a/src/tests.h +++ b/src/tests.h @@ -3,6 +3,8 @@ extern "C" { #endif #ifndef DISABLE_TESTS + struct building_type; + struct building; void test_cleanup(void); struct terrain_type * test_create_terrain(const char * name, unsigned int flags);