From 46f34aa327db507e927fe48110c61e6e31f73820 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Mon, 23 Feb 2015 16:42:23 +0100 Subject: [PATCH] Prepare for tests using libgit2 Signed-off-by: Sven Strickroth --- ext/build/gtest.vcxproj | 1 - ext/build/gtest.vcxproj.filters | 3 --- test/UnitTests/UnitTests.cpp | 35 ++++++++++++++++++++++++++++++++ test/UnitTests/UnitTests.vcxproj | 1 + test/UnitTests/UnitTests.vcxproj.filters | 3 +++ test/UnitTests/stdafx.cpp | 5 ----- 6 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 test/UnitTests/UnitTests.cpp diff --git a/ext/build/gtest.vcxproj b/ext/build/gtest.vcxproj index 5c6e05b70..44c9ca0db 100644 --- a/ext/build/gtest.vcxproj +++ b/ext/build/gtest.vcxproj @@ -44,7 +44,6 @@ - diff --git a/ext/build/gtest.vcxproj.filters b/ext/build/gtest.vcxproj.filters index e888864e7..f73cc3593 100644 --- a/ext/build/gtest.vcxproj.filters +++ b/ext/build/gtest.vcxproj.filters @@ -14,9 +14,6 @@ Source Files - - Source Files - diff --git a/test/UnitTests/UnitTests.cpp b/test/UnitTests/UnitTests.cpp new file mode 100644 index 000000000..9bea08df3 --- /dev/null +++ b/test/UnitTests/UnitTests.cpp @@ -0,0 +1,35 @@ +// TortoiseGit - a Windows shell extension for easy version control + +// Copyright (C) 2015 - TortoiseGit + +// 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, +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// + +#include "stdafx.h" +#include "gtest/gtest.h" +#include "gitindex.h" + +int _tmain(int argc, _TCHAR* argv[]) +{ + git_libgit2_init(); + testing::InitGoogleTest(&argc, argv); + int result = RUN_ALL_TESTS(); + git_libgit2_shutdown(); + return result; +} + +CGitIndexFileMap g_IndexFileMap; +CString g_sGroupingUUID; +CString sOrigCWD; diff --git a/test/UnitTests/UnitTests.vcxproj b/test/UnitTests/UnitTests.vcxproj index a868a829a..f664c70ef 100644 --- a/test/UnitTests/UnitTests.vcxproj +++ b/test/UnitTests/UnitTests.vcxproj @@ -111,6 +111,7 @@ + diff --git a/test/UnitTests/UnitTests.vcxproj.filters b/test/UnitTests/UnitTests.vcxproj.filters index 861aa7452..3ee1b30a3 100644 --- a/test/UnitTests/UnitTests.vcxproj.filters +++ b/test/UnitTests/UnitTests.vcxproj.filters @@ -157,5 +157,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/test/UnitTests/stdafx.cpp b/test/UnitTests/stdafx.cpp index 8dcaf4707..f4feeeab5 100644 --- a/test/UnitTests/stdafx.cpp +++ b/test/UnitTests/stdafx.cpp @@ -3,11 +3,6 @@ // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" -#include "gitindex.h" // reference any additional headers you need in STDAFX.H // and not in this file - -CGitIndexFileMap g_IndexFileMap; -CString g_sGroupingUUID; -CString sOrigCWD; -- 2.11.4.GIT