1 /************************************************************************
3 ** Copyright (C) 2010 Strahinja Markovic
5 ** This file is part of FlightCrew.
7 ** FlightCrew is free software: you can redistribute it and/or modify
8 ** it under the terms of the GNU Lesser General Public License as published
9 ** by the Free Software Foundation, either version 3 of the License, or
10 ** (at your option) any later version.
12 ** FlightCrew is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU Lesser General Public License for more details.
17 ** You should have received a copy of the GNU Lesser General Public License
18 ** along with FlightCrew. If not, see <http://www.gnu.org/licenses/>.
20 *************************************************************************/
22 #include <stdafx_tests.h>
24 #include <gmock/gmock.h>
25 #include <xercesc/util/PlatformUtils.hpp>
27 namespace xc = XERCES_CPP_NAMESPACE;
29 // MS C++ compiler/linker has a bug on Windows (not on Windows CE), which
30 // causes a link error when _tmain is defined in a static library and UNICODE
31 // is enabled. For this reason instead of _tmain, main function is used on
32 // Windows. See the following link to track the current status of this bug:
33 // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=394464
34 #if GTEST_OS_WINDOWS_MOBILE
37 int _tmain(int argc, TCHAR** argv)
40 int main(int argc, char** argv)
42 #endif // GTEST_OS_WINDOWS_MOBILE
43 std::cout << "Running main() from test_main.cpp\n";
45 xc::XMLPlatformUtils::Initialize();
47 testing::InitGoogleMock(&argc, argv);
48 int test_run_result = RUN_ALL_TESTS();
50 xc::XMLPlatformUtils::Terminate();
52 return test_run_result;