diff options
-rw-r--r-- | Makefile.am | 5 | ||||
-rwxr-xr-x | msvc/gtest_unittest.vcproj | 4 | ||||
-rw-r--r-- | scons/SConscript | 2 | ||||
-rw-r--r-- | test/gtest_all_test.cc | 48 | ||||
-rw-r--r-- | test/gtest_unittest.cc | 19 |
5 files changed, 54 insertions, 24 deletions
diff --git a/Makefile.am b/Makefile.am index 5971516..2a465dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,8 @@ EXTRA_DIST = \ scons/SConscript \ scripts/fuse_gtest_files.py \ scripts/gen_gtest_pred_impl.py \ - src/gtest-all.cc + src/gtest-all.cc \ + test/gtest_all_test.cc # MSVC project files EXTRA_DIST += \ @@ -272,7 +273,7 @@ test_gtest_typed_test_test_LDADD = lib/libgtest_main.la TESTS += test/gtest_unittest check_PROGRAMS += test/gtest_unittest test_gtest_unittest_SOURCES = test/gtest_unittest.cc -test_gtest_unittest_LDADD = lib/libgtest.la +test_gtest_unittest_LDADD = lib/libgtest_main.la # The following tests depend on the presence of a Python installation and are # keyed off of it. TODO(chandlerc@google.com): While we currently only attempt diff --git a/msvc/gtest_unittest.vcproj b/msvc/gtest_unittest.vcproj index 609aa9a..07e00a2 100755 --- a/msvc/gtest_unittest.vcproj +++ b/msvc/gtest_unittest.vcproj @@ -107,8 +107,8 @@ </Configurations> <References> <ProjectReference - ReferencedProjectIdentifier="{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}" - Name="gtest"/> + ReferencedProjectIdentifier="{3AF54C8A-10BF-4332-9147-F68ED9862032}" + Name="gtest_main"/> </References> <Files> <Filter diff --git a/scons/SConscript b/scons/SConscript index dc1423e..17f9dcd 100644 --- a/scons/SConscript +++ b/scons/SConscript @@ -163,7 +163,7 @@ GtestUnitTest(env, 'gtest-typed-test_test', gtest_main, additional_sources=['../test/gtest-typed-test2_test.cc']) GtestUnitTest(env, 'gtest-param-test_test', gtest, additional_sources=['../test/gtest-param-test2_test.cc']) -GtestUnitTest(env, 'gtest_unittest', gtest) +GtestUnitTest(env, 'gtest_unittest', gtest_main) GtestUnitTest(env, 'gtest_output_test_', gtest) GtestUnitTest(env, 'gtest_color_test_', gtest) GtestUnitTest(env, 'gtest-linked_ptr_test', gtest_main) diff --git a/test/gtest_all_test.cc b/test/gtest_all_test.cc new file mode 100644 index 0000000..f73044d --- /dev/null +++ b/test/gtest_all_test.cc @@ -0,0 +1,48 @@ +// Copyright 2009, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Author: wan@google.com (Zhanyong Wan) +// +// Tests for Google C++ Testing Framework (Google Test) +// +// Sometimes it's desirable to build most of Google Test's own tests +// by compiling a single file. This file serves this purpose. +#include "test/gtest_environment_test.cc" +#include "test/gtest-filepath_test.cc" +#include "test/gtest-linked_ptr_test.cc" +#include "test/gtest-message_test.cc" +#include "test/gtest-options_test.cc" +#include "test/gtest-port_test.cc" +#include "test/gtest_pred_impl_unittest.cc" +#include "test/gtest_prod_test.cc" +#include "test/gtest-test-part_test.cc" +#include "test/gtest-typed-test_test.cc" +#include "test/gtest-typed-test2_test.cc" +#include "test/gtest_unittest.cc" +#include "test/production.cc" diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc index 335b9e0..f8dbff0 100644 --- a/test/gtest_unittest.cc +++ b/test/gtest_unittest.cc @@ -5389,22 +5389,3 @@ TEST(GetCurrentOsStackTraceExceptTopTest, ReturnsTheStackTrace) { EXPECT_STREQ("", GetCurrentOsStackTraceExceptTop(unit_test, 0).c_str()); EXPECT_STREQ("", GetCurrentOsStackTraceExceptTop(unit_test, 1).c_str()); } - -#ifndef GTEST_OS_SYMBIAN -// We will want to integrate running the unittests to a different -// main application on Symbian. -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - -#ifdef GTEST_HAS_DEATH_TEST - if (!testing::internal::GTEST_FLAG(internal_run_death_test).empty()) { - // Skip the usual output capturing if we're running as the child - // process of an threadsafe-style death test. - freopen("/dev/null", "w", stdout); - } -#endif // GTEST_HAS_DEATH_TEST - - // Runs all tests using Google Test. - return RUN_ALL_TESTS(); -} -#endif // GTEST_OS_SYMBIAN |