From 13f72e581e9f01ae32d13abc8f85cd9e637c798b Mon Sep 17 00:00:00 2001 From: alexvins Date: Wed, 2 Apr 2014 04:39:15 +0000 Subject: [PATCH] [c::b] +tests project --- test/CMapEditManagerTest.cpp | 12 ++++++++++-- test/StdInc.h | 2 +- test/Test.cbp | 30 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 test/Test.cbp diff --git a/test/CMapEditManagerTest.cpp b/test/CMapEditManagerTest.cpp index ae638da64..6baa5cf73 100644 --- a/test/CMapEditManagerTest.cpp +++ b/test/CMapEditManagerTest.cpp @@ -82,8 +82,16 @@ BOOST_AUTO_TEST_CASE(CMapEditManager_DrawTerrain_View) { try { - // Load maps and json config - auto loader = new CFilesystemLoader("test/", "."); + // Load maps and json config + + #if defined(__MINGW32__) + const std::string TEST_DATA_DIR = "test/"; + #else + const std::string TEST_DATA_DIR = "."; + #endif // defined + + + auto loader = new CFilesystemLoader("test/", TEST_DATA_DIR); dynamic_cast(CResourceHandler::get())->addLoader(loader, false); const auto originalMap = CMapService::loadMap("test/TerrainViewTest"); auto map = CMapService::loadMap("test/TerrainViewTest"); diff --git a/test/StdInc.h b/test/StdInc.h index 5fc0c32c0..ac257b5f0 100644 --- a/test/StdInc.h +++ b/test/StdInc.h @@ -2,7 +2,7 @@ #include "../Global.h" -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__MINGW32__) #define BOOST_TEST_DYN_LINK #endif diff --git a/test/Test.cbp b/test/Test.cbp new file mode 100644 index 000000000..ef48ffe96 --- /dev/null +++ b/test/Test.cbp @@ -0,0 +1,30 @@ + + + + + +