diff options
author | Gennadiy Civil <misterg@google.com> | 2018-01-26 21:30:57 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-01-26 21:30:57 (GMT) |
commit | 6c0c389601fc823f2e4c1ae27b39cb13d5d0a7d4 (patch) | |
tree | 7e8e18070115a3b8d447211ee2cedf37b944a9b5 /googlemock | |
parent | 92c93802e13e84f4d916f45dd99417cdeb38841b (diff) | |
download | googletest-6c0c389601fc823f2e4c1ae27b39cb13d5d0a7d4.zip googletest-6c0c389601fc823f2e4c1ae27b39cb13d5d0a7d4.tar.gz googletest-6c0c389601fc823f2e4c1ae27b39cb13d5d0a7d4.tar.bz2 |
Adding tests to googlemock bazelrefs/pull/1430/head
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/test/BUILD.bazel | 72 | ||||
-rwxr-xr-x | googlemock/test/gmock_test_utils.py | 6 |
2 files changed, 72 insertions, 6 deletions
diff --git a/googlemock/test/BUILD.bazel b/googlemock/test/BUILD.bazel index 4c2df9e..0fe72a6 100644 --- a/googlemock/test/BUILD.bazel +++ b/googlemock/test/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2017 Google Inc. +# Copyright 2017 Google Inc. # All Rights Reserved. # # @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Author: misterg@google.com (Gennadiy Civil) -# +# # Bazel Build for Google C++ Testing Framework(Google Test)-googlemock licenses(["notice"]) @@ -53,3 +53,71 @@ cc_test( }), deps = ["//:gtest"], ) + +# Py tests + +py_library( + name = "gmock_test_utils", + testonly = 1, + srcs = ["gmock_test_utils.py"], +) + +cc_binary( + name = "gmock_leak_test_", + testonly = 1, + srcs = ["gmock_leak_test_.cc"], + deps = [ + "//:gtest_main", + ], +) + +py_test( + name = "gmock_leak_test", + size = "medium", + srcs = ["gmock_leak_test.py"], + data = [ + ":gmock_leak_test_", + ":gmock_test_utils", + ], +) + +cc_test( + name = "gmock_link_test", + size = "small", + srcs = [ + "gmock_link2_test.cc", + "gmock_link_test.cc", + "gmock_link_test.h", + ], + deps = [ + "//:gtest_main", + ], +) + +cc_binary( + name = "gmock_output_test_", + srcs = ["gmock_output_test_.cc"], + deps = [ + "//:gtest", + ], +) + +py_test( + name = "gmock_output_test", + size = "medium", + srcs = ["gmock_output_test.py"], + data = [ + ":gmock_output_test_", + ":gmock_output_test_golden.txt", + ], + deps = [":gmock_test_utils"], +) + +cc_test( + name = "gmock_test", + size = "small", + srcs = ["gmock_test.cc"], + deps = [ + "//:gtest_main", + ], +) diff --git a/googlemock/test/gmock_test_utils.py b/googlemock/test/gmock_test_utils.py index 20e3d3d..1983c53 100755 --- a/googlemock/test/gmock_test_utils.py +++ b/googlemock/test/gmock_test_utils.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # Copyright 2006, Google Inc. # All rights reserved. # @@ -41,11 +39,11 @@ import sys SCRIPT_DIR = os.path.dirname(__file__) or '.' # isdir resolves symbolic links. -gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../gtest/test') +gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../googletest/test') if os.path.isdir(gtest_tests_util_dir): GTEST_TESTS_UTIL_DIR = gtest_tests_util_dir else: - GTEST_TESTS_UTIL_DIR = os.path.join(SCRIPT_DIR, '../../gtest/test') + GTEST_TESTS_UTIL_DIR = os.path.join(SCRIPT_DIR, '../../googletest/test') sys.path.append(GTEST_TESTS_UTIL_DIR) import gtest_test_utils # pylint: disable-msg=C6204 |