Adds gtest_all_test.cc. Also cleans up gtest_unittest.cc.
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user