mirror of
https://github.com/google/googletest.git
synced 2024-12-28 11:10:44 +08:00
Adds gtest_all_test.cc. Also cleans up gtest_unittest.cc.
This commit is contained in:
parent
cd3e4016ea
commit
a5391b50a2
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
48
test/gtest_all_test.cc
Normal file
48
test/gtest_all_test.cc
Normal file
@ -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"
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user