Adds missing copyright in test/gtest-test-part_test.cc (by Markus Heule). Minor format adjustments.

This commit is contained in:
zhanyong.wan 2009-05-29 19:46:51 +00:00
parent 8de91f8f83
commit 1bd424d960
6 changed files with 43 additions and 5 deletions

View File

@ -787,6 +787,6 @@ int main(int argc, char **argv) {
GeneratorEvaluationTest::set_param_value(1);
#endif // GTEST_HAS_PARAM_TEST
testing::InitGoogleTest(&argc, argv);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

View File

@ -1,5 +1,34 @@
// Copyright 2008 Google Inc. All Rights Reserved.
// Copyright 2008 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: mheule@google.com (Markus Heule)
//
#include <gtest/gtest-test-part.h>

View File

@ -140,7 +140,7 @@ INSTANTIATE_TEST_CASE_P(SeqQ, ParamTest, testing::Values(5, 6));
} // namespace
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

View File

@ -79,7 +79,7 @@ TEST(FooDeathTest, Test1) {
} // namespace
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

View File

@ -253,8 +253,13 @@ class GTestOutputTest(unittest.TestCase):
def testOutput(self):
output = GetOutputOfAllCommands()
golden_file = open(GOLDEN_PATH, 'rb')
golden = golden_file.read()
# A mis-configured source control system can cause \r appear in EOL
# sequences when we read the golden file irrespective of an operating
# system used. Therefore, we need to strip those \r's from newlines
# unconditionally.
golden = ToUnixLineEnding(golden_file.read())
golden_file.close()
# We want the test to pass regardless of death tests being

View File

@ -974,6 +974,10 @@ int main(int argc, char **argv) {
// We just run the tests, knowing some of them are intended to fail.
// We will use a separate Python script to compare the output of
// this program with the golden file.
// It's hard to test InitGoogleTest() directly, as it has many
// global side effects. The following line serves as a sanity test
// for it.
testing::InitGoogleTest(&argc, argv);
if (argc >= 2 &&
String(argv[1]) == "--gtest_internal_skip_environment_and_ad_hoc_tests")