Unverified Commit 06b97592 authored by Gennadiy Civil's avatar Gennadiy Civil Committed by GitHub
Browse files

Merge branch 'master' into ignore-cmake-generated-files

parents 51b65058 997d343d
...@@ -26,16 +26,14 @@ ...@@ -26,16 +26,14 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// A helper program for testing that Google Test parses the environment // A helper program for testing that Google Test parses the environment
// variables correctly. // variables correctly.
#include "gtest/gtest.h"
#include <iostream> #include <iostream>
#include "gtest/gtest.h"
#include "src/gtest-internal-inl.h" #include "src/gtest-internal-inl.h"
using ::std::cout; using ::std::cout;
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
//
// Google Test filepath utilities // Google Test filepath utilities
// //
// This file tests classes and functions used internally by // This file tests classes and functions used internally by
...@@ -51,7 +50,7 @@ namespace internal { ...@@ -51,7 +50,7 @@ namespace internal {
namespace { namespace {
#if GTEST_OS_WINDOWS_MOBILE #if GTEST_OS_WINDOWS_MOBILE
// TODO(wan@google.com): Move these to the POSIX adapter section in // FIXME: Move these to the POSIX adapter section in
// gtest-port.h. // gtest-port.h.
// Windows CE doesn't have the remove C function. // Windows CE doesn't have the remove C function.
......
...@@ -40,8 +40,6 @@ Note that test sharding may also influence which tests are filtered. Therefore, ...@@ -40,8 +40,6 @@ Note that test sharding may also influence which tests are filtered. Therefore,
we test that here also. we test that here also.
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import os import os
import re import re
import sets import sets
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Unit test for Google Test test filters. // Unit test for Google Test test filters.
// //
......
...@@ -136,11 +136,11 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase): ...@@ -136,11 +136,11 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase):
self.assert_(p.exited) self.assert_(p.exited)
self.assertEquals(0, p.exit_code) self.assertEquals(0, p.exit_code)
# TODO(wan@google.com): libtool causes the built test binary to be # FIXME: libtool causes the built test binary to be
# named lt-gtest_xml_outfiles_test_ instead of # named lt-gtest_xml_outfiles_test_ instead of
# gtest_xml_outfiles_test_. To account for this possibility, we # gtest_xml_outfiles_test_. To account for this possibility, we
# allow both names in the following code. We should remove this # allow both names in the following code. We should remove this
# hack when Chandler Carruth's libtool replacement tool is ready. # when libtool replacement tool is ready.
output_file_name1 = test_name + '.json' output_file_name1 = test_name + '.json'
output_file1 = os.path.join(self.output_dir_, output_file_name1) output_file1 = os.path.join(self.output_dir_, output_file_name1)
output_file_name2 = 'lt-' + output_file_name1 output_file_name2 = 'lt-' + output_file_name1
......
...@@ -26,13 +26,10 @@ ...@@ -26,13 +26,10 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Authors: Dan Egnor (egnor@google.com)
// Ported to Windows: Vadim Berman (vadimb@google.com)
#include "gtest/internal/gtest-linked_ptr.h"
#include <stdlib.h> #include <stdlib.h>
#include "gtest/internal/gtest-linked_ptr.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
namespace { namespace {
......
...@@ -37,8 +37,6 @@ by invoking googletest-list-tests-unittest_ (a program written with ...@@ -37,8 +37,6 @@ by invoking googletest-list-tests-unittest_ (a program written with
Google Test) the command line flags. Google Test) the command line flags.
""" """
__author__ = 'phanna@google.com (Patrick Hanna)'
import re import re
import gtest_test_utils import gtest_test_utils
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: phanna@google.com (Patrick Hanna)
// Unit test for Google Test's --gtest_list_tests flag. // Unit test for Google Test's --gtest_list_tests flag.
// //
......
...@@ -25,17 +25,17 @@ ...@@ -25,17 +25,17 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
// //
// The Google C++ Testing and Mocking Framework (Google Test) // The Google C++ Testing and Mocking Framework (Google Test)
// //
// This file verifies Google Test event listeners receive events at the // This file verifies Google Test event listeners receive events at the
// right times. // right times.
#include "gtest/gtest.h"
#include <vector> #include <vector>
#include "gtest/gtest.h"
using ::testing::AddGlobalTestEnvironment; using ::testing::AddGlobalTestEnvironment;
using ::testing::Environment; using ::testing::Environment;
using ::testing::InitGoogleTest; using ::testing::InitGoogleTest;
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// //
// Tests for the Message class. // Tests for the Message class.
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
//
// Google Test UnitTestOptions tests // Google Test UnitTestOptions tests
// //
// This file tests classes and functions used internally by // This file tests classes and functions used internally by
...@@ -106,8 +105,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) { ...@@ -106,8 +105,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
#elif GTEST_OS_FUCHSIA #elif GTEST_OS_FUCHSIA
const bool success = exe_str == "app"; const bool success = exe_str == "app";
#else #else
// TODO(wan@google.com): remove the hard-coded "lt-" prefix when // FIXME: remove the hard-coded "lt-" prefix when libtool replacement is ready
// Chandler Carruth's libtool replacement is ready.
const bool success = const bool success =
exe_str == "googletest-options-test" || exe_str == "googletest-options-test" ||
exe_str == "gtest_all_test" || exe_str == "gtest_all_test" ||
......
...@@ -31,16 +31,13 @@ ...@@ -31,16 +31,13 @@
"""Tests the text output of Google C++ Testing and Mocking Framework. """Tests the text output of Google C++ Testing and Mocking Framework.
To update the golden file:
SYNOPSIS googletest_output_test.py --build_dir=BUILD/DIR --gengolden
googletest_output_test.py --build_dir=BUILD/DIR --gengolden where BUILD/DIR contains the built googletest-output-test_ file.
# where BUILD/DIR contains the built googletest-output-test_ file. googletest_output_test.py --gengolden
googletest_output_test.py --gengolden googletest_output_test.py
googletest_output_test.py
""" """
__author__ = 'wan@google.com (Zhanyong Wan)'
import difflib import difflib
import os import os
import re import re
...@@ -58,7 +55,7 @@ NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support' ...@@ -58,7 +55,7 @@ NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support'
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
IS_WINDOWS = os.name == 'nt' IS_WINDOWS = os.name == 'nt'
# TODO(vladl@google.com): remove the _lin suffix. # FIXME: remove the _lin suffix.
GOLDEN_NAME = 'googletest-output-test-golden-lin.txt' GOLDEN_NAME = 'googletest-output-test-golden-lin.txt'
PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_') PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_')
......
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
// googletest-output-test.py to ensure that Google Test generates the // googletest-output-test.py to ensure that Google Test generates the
// desired messages. Therefore, most tests in this file are MEANT TO // desired messages. Therefore, most tests in this file are MEANT TO
// FAIL. // FAIL.
//
// Author: wan@google.com (Zhanyong Wan)
#include "gtest/gtest-spi.h" #include "gtest/gtest-spi.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -30,16 +30,7 @@ ...@@ -30,16 +30,7 @@
"""Verifies that Google Test warns the user when not initialized properly.""" """Verifies that Google Test warns the user when not initialized properly."""
__author__ = 'jmadill@google.com (Jamie Madill)' import gtest_test_utils
import os
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
if IS_LINUX:
import gtest_test_utils
else:
import gtest_test_utils
binary_name = 'googletest-param-test-invalid-name1-test_' binary_name = 'googletest-param-test-invalid-name1-test_'
COMMAND = gtest_test_utils.GetTestExecutablePath(binary_name) COMMAND = gtest_test_utils.GetTestExecutablePath(binary_name)
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: jmadill@google.com (Jamie Madill)
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -30,16 +30,7 @@ ...@@ -30,16 +30,7 @@
"""Verifies that Google Test warns the user when not initialized properly.""" """Verifies that Google Test warns the user when not initialized properly."""
__author__ = 'jmadill@google.com (Jamie Madill)' import gtest_test_utils
import os
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
if IS_LINUX:
import gtest_test_utils
else:
import gtest_test_utils
binary_name = 'googletest-param-test-invalid-name2-test_' binary_name = 'googletest-param-test-invalid-name2-test_'
COMMAND = gtest_test_utils.GetTestExecutablePath(binary_name) COMMAND = gtest_test_utils.GetTestExecutablePath(binary_name)
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: jmadill@google.com (Jamie Madill)
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
// //
// Tests for Google Test itself. This file verifies that the parameter // Tests for Google Test itself. This file verifies that the parameter
// generators objects produce correct parameter sequences and that // generators objects produce correct parameter sequences and that
...@@ -68,7 +67,7 @@ using ::testing::internal::UnitTestOptions; ...@@ -68,7 +67,7 @@ using ::testing::internal::UnitTestOptions;
// Prints a value to a string. // Prints a value to a string.
// //
// TODO(wan@google.com): remove PrintValue() when we move matchers and // FIXME: remove PrintValue() when we move matchers and
// EXPECT_THAT() from Google Mock to Google Test. At that time, we // EXPECT_THAT() from Google Mock to Google Test. At that time, we
// can write EXPECT_THAT(x, Eq(y)) to compare two tuples x and y, as // can write EXPECT_THAT(x, Eq(y)) to compare two tuples x and y, as
// EXPECT_THAT() and the matchers know how to print tuples. // EXPECT_THAT() and the matchers know how to print tuples.
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
// Authors: vladl@google.com (Vlad Losev)
//
// The Google C++ Testing and Mocking Framework (Google Test) // The Google C++ Testing and Mocking Framework (Google Test)
// //
// This header file provides classes and functions used internally // This header file provides classes and functions used internally
......
...@@ -26,14 +26,13 @@ ...@@ -26,14 +26,13 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
// //
// Tests for Google Test itself. This verifies that the basic constructs of // Tests for Google Test itself. This verifies that the basic constructs of
// Google Test work. // Google Test work.
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "googletest-param-test-test.h" #include "test/googletest-param-test-test.h"
using ::testing::Values; using ::testing::Values;
using ::testing::internal::ParamGenerator; using ::testing::internal::ParamGenerator;
...@@ -44,17 +43,18 @@ using ::testing::internal::ParamGenerator; ...@@ -44,17 +43,18 @@ using ::testing::internal::ParamGenerator;
ParamGenerator<int> extern_gen = Values(33); ParamGenerator<int> extern_gen = Values(33);
// Tests that a parameterized test case can be defined in one translation unit // Tests that a parameterized test case can be defined in one translation unit
// and instantiated in another. The test is defined in googletest-param-test-test.cc // and instantiated in another. The test is defined in
// and ExternalInstantiationTest fixture class is defined in // googletest-param-test-test.cc and ExternalInstantiationTest fixture class is
// gtest-param-test_test.h. // defined in gtest-param-test_test.h.
INSTANTIATE_TEST_CASE_P(MultiplesOf33, INSTANTIATE_TEST_CASE_P(MultiplesOf33,
ExternalInstantiationTest, ExternalInstantiationTest,
Values(33, 66)); Values(33, 66));
// Tests that a parameterized test case can be instantiated // Tests that a parameterized test case can be instantiated
// in multiple translation units. Another instantiation is defined // in multiple translation units. Another instantiation is defined
// in googletest-param-test-test.cc and InstantiationInMultipleTranslaionUnitsTest // in googletest-param-test-test.cc and
// fixture is defined in gtest-param-test_test.h // InstantiationInMultipleTranslaionUnitsTest fixture is defined in
// gtest-param-test_test.h
INSTANTIATE_TEST_CASE_P(Sequence2, INSTANTIATE_TEST_CASE_P(Sequence2,
InstantiationInMultipleTranslaionUnitsTest, InstantiationInMultipleTranslaionUnitsTest,
Values(42*3, 42*4, 42*5)); Values(42*3, 42*4, 42*5));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment