| /external/cronet/third_party/boringssl/src/third_party/googletest/googlemock/test/ |
| D | gmock_link_test.h | 30 // Google Mock - a framework for writing C++ mock classes. 32 // This file tests that: 33 // a. A header file defining a mock class can be included in multiple 60 // ACTION()-generated 61 // ACTION_P()-generated 62 // ACTION_P2()-generated 104 // This test requires identical definitions of Interface and Mock to be 109 // definitions of Interface and Mock tests MUST be kept in the SAME 110 // NON-ANONYMOUS namespace in this file. The test fixture class LinkTest 127 #include "gtest/internal/gtest-port.h" [all …]
|
| D | gmock-nice-strict_test.cc | 30 #include "gmock/gmock-nice-strict.h" 36 #include "gtest/gtest-spi.h" 40 // clash with ::testing::Mock. 41 class Mock { class 43 Mock() = default; 48 Mock(const Mock&) = delete; 49 Mock& operator=(const Mock&) = delete; 77 // Defines some mock classes needed by the tests. 144 // Tests that a raw mock generates warnings for uninteresting calls. 155 HasSubstr("Uninteresting mock function call")); in TEST() [all …]
|
| D | gmock-spec-builders_test.cc | 30 // Google Mock - a framework for writing C++ mock classes. 32 // This file tests the spec builder syntax. 34 #include "gmock/gmock-spec-builders.h" 43 #include "gmock/internal/gmock-port.h" 44 #include "gtest/gtest-spi.h" 46 #include "gtest/internal/gtest-port.h" 68 // This line verifies that a mock method can take a by-reference 73 // Tells Google Mock how to print a value of type Incomplete. 77 // Even though this mock class contains a mock method that takes in TEST() 78 // by-reference an argument whose type is incomplete, we can still in TEST() [all …]
|
| D | gmock-actions_test.cc | 30 // Google Mock - a framework for writing C++ mock classes. 32 // This file tests the built-in actions. 34 #include "gmock/gmock-actions.h" 48 #include "gmock/internal/gmock-port.h" 49 #include "gtest/gtest-spi.h" 51 #include "gtest/internal/gtest-port.h" 91 internal::negation<std::integral_constant<int, -1>>>::value, in TEST() 102 // false-y input". 107 struct MyTrue : std::integral_constant<int, -1> {}; 194 // The first overload is callable for const and non-const rvalues and lvalues. in TEST() [all …]
|
| /external/cronet/third_party/googletest/src/googlemock/test/ |
| D | gmock_link_test.h | 30 // Google Mock - a framework for writing C++ mock classes. 32 // This file tests that: 33 // a. A header file defining a mock class can be included in multiple 60 // ACTION()-generated 61 // ACTION_P()-generated 62 // ACTION_P2()-generated 104 // This test requires identical definitions of Interface and Mock to be 109 // definitions of Interface and Mock tests MUST be kept in the SAME 110 // NON-ANONYMOUS namespace in this file. The test fixture class LinkTest 127 #include "gtest/internal/gtest-port.h" [all …]
|
| D | gmock-nice-strict_test.cc | 30 #include "gmock/gmock-nice-strict.h" 36 #include "gtest/gtest-spi.h" 40 // clash with ::testing::Mock. 41 class Mock { class 43 Mock() {} in Mock() function in Mock 48 GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock); 76 // Defines some mock classes needed by the tests. 141 // Tests that a raw mock generates warnings for uninteresting calls. 152 HasSubstr("Uninteresting mock function call")); in TEST() 157 // Tests that a raw mock generates warnings for uninteresting calls [all …]
|
| D | gmock-spec-builders_test.cc | 30 // Google Mock - a framework for writing C++ mock classes. 32 // This file tests the spec builder syntax. 34 #include "gmock/gmock-spec-builders.h" 42 #include "gmock/internal/gmock-port.h" 43 #include "gtest/gtest-spi.h" 45 #include "gtest/internal/gtest-port.h" 54 void SetCallCount(int n, ExpectationBase* exp) { exp->call_count_ = n; } in SetCallCount() 85 using testing::Mock; 111 // This line verifies that a mock method can take a by-reference 116 // Tells Google Mock how to print a value of type Incomplete. [all …]
|
| /external/googletest/googlemock/test/ |
| D | gmock_link_test.h | 30 // Google Mock - a framework for writing C++ mock classes. 32 // This file tests that: 33 // a. A header file defining a mock class can be included in multiple 60 // ACTION()-generated 61 // ACTION_P()-generated 62 // ACTION_P2()-generated 104 // This test requires identical definitions of Interface and Mock to be 109 // definitions of Interface and Mock tests MUST be kept in the SAME 110 // NON-ANONYMOUS namespace in this file. The test fixture class LinkTest 127 #include "gtest/internal/gtest-port.h" [all …]
|
| D | gmock-nice-strict_test.cc | 30 #include "gmock/gmock-nice-strict.h" 36 #include "gtest/gtest-spi.h" 40 // clash with ::testing::Mock. 41 class Mock { class 43 Mock() = default; 48 Mock(const Mock&) = delete; 49 Mock& operator=(const Mock&) = delete; 77 // Defines some mock classes needed by the tests. 144 // Tests that a raw mock generates warnings for uninteresting calls. 155 HasSubstr("Uninteresting mock function call")); in TEST() [all …]
|
| D | gmock-spec-builders_test.cc | 30 // Google Mock - a framework for writing C++ mock classes. 32 // This file tests the spec builder syntax. 34 #include "gmock/gmock-spec-builders.h" 43 #include "gmock/internal/gmock-port.h" 44 #include "gtest/gtest-spi.h" 46 #include "gtest/internal/gtest-port.h" 68 // This line verifies that a mock method can take a by-reference 73 // Tells Google Mock how to print a value of type Incomplete. 77 // Even though this mock class contains a mock method that takes in TEST() 78 // by-reference an argument whose type is incomplete, we can still in TEST() [all …]
|
| D | gmock-actions_test.cc | 30 // Google Mock - a framework for writing C++ mock classes. 32 // This file tests the built-in actions. 34 #include "gmock/gmock-actions.h" 48 #include "gmock/internal/gmock-port.h" 49 #include "gtest/gtest-spi.h" 51 #include "gtest/internal/gtest-port.h" 91 internal::negation<std::integral_constant<int, -1>>>::value, in TEST() 102 // false-y input". 107 struct MyTrue : std::integral_constant<int, -1> {}; 194 // The first overload is callable for const and non-const rvalues and lvalues. in TEST() [all …]
|
| /external/python/mobly/tests/mobly/controllers/android_device_lib/ |
| D | snippet_client_v2_test.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 14 """Unit tests for mobly.controllers.android_device_lib.snippet_client_v2.""" 18 from unittest import mock 24 from tests.lib import mock_android_device 36 """Mock class of adb proxy which covers all the calls used by snippet clients. 49 mock_shell_func: mock.Mock, used for recording the calls to the shell 51 mock_forward_func: mock.Mock, used for recording the calls to the forward 59 self.mock_shell_func = mock.Mock() 60 self.mock_forward_func = mock.Mock() 63 """Mock `shell` of mobly.controllers.android_device_lib.adb.AdbProxy.""" [all …]
|
| /external/angle/build/chromeos/ |
| D | generate_skylab_tast_filter_test.py | 4 # Use of this source code is governed by a BSD-style license that can be 8 from unittest import mock 25 REQUIRED_ARGS = ['script', 'generate-filter', '--output', 'output.filter'] 31 file_mock = mock.mock_open(read_data=TAST_CONTROL) 32 args = REQUIRED_ARGS + ['--tast-expr', TAST_EXPR] 34 with mock.patch('sys.argv', args),\ 35 mock.patch('builtins.open', file_mock),\ 36 mock.patch('os.chmod'),\ 37 mock.patch("json.dump", mock.MagicMock()) as dump: 43 file_mock = mock.mock_open(read_data=TAST_CONTROL) [all …]
|
| /external/cronet/build/chromeos/ |
| D | generate_skylab_tast_filter_test.py | 4 # Use of this source code is governed by a BSD-style license that can be 8 from unittest import mock 25 REQUIRED_ARGS = ['script', 'generate-filter', '--output', 'output.filter'] 31 file_mock = mock.mock_open(read_data=TAST_CONTROL) 32 args = REQUIRED_ARGS + ['--tast-expr', TAST_EXPR] 34 with mock.patch('sys.argv', args),\ 35 mock.patch('builtins.open', file_mock),\ 36 mock.patch('os.chmod'),\ 37 mock.patch("json.dump", mock.MagicMock()) as dump: 43 file_mock = mock.mock_open(read_data=TAST_CONTROL) [all …]
|
| D | test_runner_test.py | 3 # Use of this source code is governed by a BSD-style license that can be 14 # The following non-std imports are fetched via vpython. See the list at 16 import mock # pylint: disable=import-error 17 from parameterized import parameterized # pylint: disable=import-error 24 "start": "2020-01-01T15:41:30.799228462-08:00", 25 "end": "2020-01-01T15:41:53.318914698-08:00", 34 self.mock_rdb = mock.patch.object( 56 '--suite-name=chrome_all_tast_tests', 57 '--board=eve', 58 '--flash', [all …]
|
| /external/angle/build/lacros/ |
| D | test_runner_test.py | 3 # Use of this source code is governed by a BSD-style license that can be 14 import mock 23 time.sleep = mock.Mock() 28 @mock.patch.object(os.path, 32 args = ['--some_flag="flag"'] 36 'testing/buildbot/filters/linux-lacros.browser_tests.filter')) 37 self.assertTrue(args[1].startswith('--test-launcher-filter-file=')) 39 args = ['--some_flag="flag"'] 43 args = ['--test-launcher-filter-file=new/filter'] 54 @mock.patch.object(os.path, 'isfile', return_value=True) [all …]
|
| /external/cronet/build/lacros/ |
| D | test_runner_test.py | 3 # Use of this source code is governed by a BSD-style license that can be 14 import mock 23 time.sleep = mock.Mock() 28 @mock.patch.object(os.path, 32 args = ['--some_flag="flag"'] 36 'testing/buildbot/filters/linux-lacros.browser_tests.filter')) 37 self.assertTrue(args[1].startswith('--test-launcher-filter-file=')) 39 args = ['--some_flag="flag"'] 43 args = ['--test-launcher-filter-file=new/filter'] 54 @mock.patch.object(os.path, 'isfile', return_value=True) [all …]
|
| /external/bazelbuild-rules_go/third_party/ |
| D | com_github_golang_mock-gazelle.patch | 1 diff -urN a/gomock/BUILD.bazel b/gomock/BUILD.bazel 2 --- a/gomock/BUILD.bazel 1970-01-01 00:00:00.000000000 +0000 3 +++ b/gomock/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000 4 @@ -0,0 +1,34 @@ 16 + importpath = "github.com/golang/mock/gomock", 39 diff -urN a/gomock/internal/mock_gomock/BUILD.bazel b/gomock/internal/mock_gomock/BUILD.bazel 40 --- a/gomock/internal/mock_gomock/BUILD.bazel 1970-01-01 00:00:00.000000000 +0000 41 +++ b/gomock/internal/mock_gomock/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000 42 @@ -0,0 +1,15 @@ 48 + importpath = "github.com/golang/mock/gomock/internal/mock_gomock", [all …]
|
| /external/oss-fuzz/infra/cifuzz/ |
| D | clusterfuzz_deployment_test.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 14 """Tests for clusterfuzz_deployment.py""" 18 from unittest import mock 29 # https://github.com/google/oss-fuzz/tree/master/projects/example project. 36 EXPECTED_LATEST_BUILD_PATH = os.path.join(WORKSPACE, 'cifuzz-prev-build') 38 # pylint: disable=unused-argument 64 """Tests OSSFuzz.""" 72 @mock.patch('http_utils.download_and_unpack_zip', return_value=True) 74 """Tests that we can download a corpus for a valid project.""" 76 expected_url = ('https://storage.googleapis.com/example-backup.' [all …]
|
| D | run_fuzzers_test.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 14 """Tests for running fuzzers.""" 21 from unittest import mock 30 # pylint: disable=wrong-import-position 38 # https://github.com/google/oss-fuzz/tree/master/projects/example project. 54 class RunFuzzerIntegrationTestMixin: # pylint: disable=too-few-public-methods,invalid-name 86 """Tests run_fuzzers with a valid MSAN build.""" 99 """Tests run_fuzzers with a valid UBSAN build.""" 104 """Tests BaseFuzzTargetRunner.""" 106 def _create_runner(self, **kwargs): # pylint: disable=no-self-use [all …]
|
| D | get_coverage_test.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 14 """Tests for get_coverage.py""" 18 from unittest import mock 25 # pylint: disable=protected-access 35 INVALID_TARGET = 'not-a-fuzz-target' 43 """Tests _get_oss_fuzz_fuzzer_stats_dir_url.""" 45 @mock.patch('http_utils.get_json_from_url', 48 'gs://oss-fuzz-coverage/systemd/fuzzer_stats/20210303' 51 """Tests that a project's coverage report can be downloaded and parsed. 59 'https://storage.googleapis.com/oss-fuzz-coverage/' [all …]
|
| /external/oss-fuzz/infra/base-images/base-builder/ |
| D | bisect_clang_test.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 16 """Tests for bisect_clang.py""" 18 from unittest import mock 24 LLVM_REPO_PATH = '/llvm-project' 29 return ['git', '-C', LLVM_REPO_PATH] + list(args) 35 patcher = mock.patch.dict(os.environ, env) 40 class BisectClangTestMixin: # pylint: disable=too-few-public-methods 43 def setUp(self): # pylint: disable=invalid-name 51 """Tests for get_clang_build_env.""" 78 """Tests for search_bisect_output.""" [all …]
|
| /external/toolchain-utils/cros_utils/ |
| D | bugs_test.py | 3 # Use of this source code is governed by a BSD-style license that can be 7 # pylint: disable=protected-access 9 """Tests bug filing bits.""" 17 import unittest.mock 25 class Tests(unittest.TestCase): class 26 """Tests for the bugs module.""" 29 """Tests JSON file writing.""" 53 with open(file_path, encoding="utf-8") as f: 67 @unittest.mock.patch.object(bugs, "_WriteBugJSONFile") 69 """Tests AppendToExistingBug.""" [all …]
|
| /external/angle/build/fuchsia/test/ |
| D | log_manager_unittests.py | 3 # Use of this source code is governed by a BSD-style license that can be 9 import unittest.mock as mock namespace 19 @mock.patch('log_manager.run_continuous_ffx_command') 20 def test_no_logs(self, mock_ffx) -> None: 27 @mock.patch('log_manager.run_continuous_ffx_command') 28 def test_log_to_stdout(self, mock_ffx) -> None: 36 @mock.patch('log_manager.run_continuous_ffx_command') 37 @mock.patch('builtins.open') 38 def test_log_to_file(self, mock_open, mock_ffx) -> None: 47 @mock.patch('log_manager.run_continuous_ffx_command') [all …]
|
| /external/cronet/build/fuchsia/test/ |
| D | log_manager_unittests.py | 3 # Use of this source code is governed by a BSD-style license that can be 9 import unittest.mock as mock namespace 19 @mock.patch('log_manager.run_continuous_ffx_command') 20 def test_no_logs(self, mock_ffx) -> None: 27 @mock.patch('log_manager.run_continuous_ffx_command') 28 def test_log_to_stdout(self, mock_ffx) -> None: 36 @mock.patch('log_manager.run_continuous_ffx_command') 37 @mock.patch('builtins.open') 38 def test_log_to_file(self, mock_open, mock_ffx) -> None: 47 @mock.patch('log_manager.run_continuous_ffx_command') [all …]
|