From d63bb00f94512184f2e12971e64ac4ce0db3248e Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Thu, 13 Jun 2013 20:23:42 +0300 Subject: [PATCH] Revert "Fix running debug projects that use unit testing" This reverts commit ced3dd2. --- Common/Common.vcxproj | 1 - Common/Common.vcxproj.filters | 1 - Common/MathParser_Test.cpp | 4 +++- Common/PathUtil_Test.cpp | 4 +++- Common/StringUtil_Test.cpp | 4 +++- Common/Test.h | 38 ----------------------------------- Library/ConfigParser_Test.cpp | 4 +++- 7 files changed, 12 insertions(+), 44 deletions(-) delete mode 100644 Common/Test.h diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index 94d6cb41..97eeda9d 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -37,7 +37,6 @@ - diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 85332656..2f4f152e 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -18,6 +18,5 @@ - \ No newline at end of file diff --git a/Common/MathParser_Test.cpp b/Common/MathParser_Test.cpp index fb75bbb7..7c547769 100644 --- a/Common/MathParser_Test.cpp +++ b/Common/MathParser_Test.cpp @@ -16,9 +16,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "Test.h" +#include "CppUnitTest.h" #include "MathParser.h" +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + namespace MathParser { TEST_CLASS(Common_MathParser_Test) diff --git a/Common/PathUtil_Test.cpp b/Common/PathUtil_Test.cpp index 60dbc391..61d920ef 100644 --- a/Common/PathUtil_Test.cpp +++ b/Common/PathUtil_Test.cpp @@ -16,10 +16,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "Test.h" +#include "CppUnitTest.h" #include "PathUtil.h" #include +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + namespace PathUtil { TEST_CLASS(Common_PathUtil_Test) diff --git a/Common/StringUtil_Test.cpp b/Common/StringUtil_Test.cpp index 673348a1..6797b2b4 100644 --- a/Common/StringUtil_Test.cpp +++ b/Common/StringUtil_Test.cpp @@ -16,9 +16,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "Test.h" +#include "CppUnitTest.h" #include "StringUtil.h" +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + namespace StringUtil { TEST_CLASS(Common_StringUtil_Test) diff --git a/Common/Test.h b/Common/Test.h deleted file mode 100644 index c7d3a8d0..00000000 --- a/Common/Test.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2013 Rainmeter Team - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#ifndef RM_COMMON_TEST_H -#define RM_COMMON_TEST_H - -// This file is meant to be included only by unit testing .cpp files. - -#include "CppUnitTest.h" - -#ifndef _DEBUG -#error Unit testing is not available in Release builds. -#endif - -// DLL projects should delay-load the CppUnitTestFramework.dll to avoid "module not found" errors -// since CppUnitTestFramework.dll is available only when running tests. -#ifdef _MD -#pragma comment(linker, "/DELAYLOAD:Microsoft.VisualStudio.TestTools.CppUnitTestFramework.dll") -#endif - -using namespace Microsoft::VisualStudio::CppUnitTestFramework; - -#endif diff --git a/Library/ConfigParser_Test.cpp b/Library/ConfigParser_Test.cpp index 7ca46ac6..4dc63df6 100644 --- a/Library/ConfigParser_Test.cpp +++ b/Library/ConfigParser_Test.cpp @@ -16,9 +16,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "../Common/Test.h" +#include "CppUnitTest.h" #include "ConfigParser.h" +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + TEST_CLASS(Library_ConfigParser_Test) { public: