Home
last modified time | relevance | path

Searched +full:mock +full:- +full:tests (Results 1 – 25 of 1277) sorted by relevance

12345678910>>...52

/aosp_15_r20/external/cronet/third_party/boringssl/src/third_party/googletest/googlemock/test/
H A Dgmock_link_test.h30 // 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 …]
H A Dgmock-nice-strict_test.cc30 #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 …]
H A Dgmock-spec-builders_test.cc30 // 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 …]
H A Dgmock-actions_test.cc30 // 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 …]
/aosp_15_r20/external/cronet/third_party/googletest/src/googlemock/test/
H A Dgmock_link_test.h30 // 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 …]
H A Dgmock-nice-strict_test.cc30 #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 …]
H A Dgmock-spec-builders_test.cc30 // 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 …]
H A Dgmock-actions_test.cc30 // 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 …]
/aosp_15_r20/external/googletest/googlemock/test/
H A Dgmock_link_test.h30 // 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 …]
H A Dgmock-nice-strict_test.cc30 #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 …]
H A Dgmock-spec-builders_test.cc30 // 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 …]
H A Dgmock-actions_test.cc30 // 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 …]
/aosp_15_r20/tools/test/connectivity/acts/framework/tests/controllers/sl4a_lib/
Dsl4a_manager_test.py3 # Copyright 2018 - The Android Open Source Project
9 # http://www.apache.org/licenses/LICENSE-2.0
16 import mock
24 """Tests the sl4a_manager module-level functions."""
31 """Tests sl4a_manager.create_sl4a_manager().
33 Tests that a new Sl4aManager is returned without an error.
35 adb = mock.Mock()
41 """Tests sl4a_manager.create_sl4a_manager().
43 Tests that a second call to create_sl4a_manager() does not create a
46 adb = mock.Mock()
[all …]
Dsl4a_session_test.py3 # Copyright 2018 - The Android Open Source Project
9 # http://www.apache.org/licenses/LICENSE-2.0
17 import mock
21 from mock import patch
31 """Tests the Sl4aSession class."""
34 """Tests Sl4aSession.is_alive.
36 Tests that the session is_alive when it has not been terminated.
38 session = mock.Mock()
44 """Tests Sl4aSession.is_alive.
46 Tests that the session is_alive when it has not been terminated.
[all …]
Drpc_client_test.py3 # Copyright 2018 - The Android Open Source Project
9 # http://www.apache.org/licenses/LICENSE-2.0
18 import mock
28 """Tests the rpc_client.RpcClient class."""
31 """Tests rpc_client.RpcClient.terminate().
33 Tests that if some connections are still working, we log this before
36 session = mock.Mock()
39 lambda _: mock.Mock(),
40 lambda _: mock.Mock())
41 client._log = mock.Mock()
[all …]
/aosp_15_r20/external/python/mobly/tests/mobly/controllers/android_device_lib/
Dsnippet_client_v2_test.py7 # 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 …]
/aosp_15_r20/external/bazelbuild-rules_go/third_party/
H A Dcom_github_golang_mock-gazelle.patch1 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 …]
/aosp_15_r20/tools/test/connectivity/acts/framework/tests/controllers/monsoon_lib/sampling/engine/
Dassembly_line_test.py3 # Copyright 2019 - The Android Open Source Project
9 # http://www.apache.org/licenses/LICENSE-2.0
19 import mock
32 return mock.patch('%s.%s' % (full_module_name, import_name))
36 """Tests the basic functionality of ProcessAssemblyLine."""
38 @mock.patch('multiprocessing.Pool')
40 """Tests run() with no nodes does not spawn a new process."""
48 @mock.patch('multiprocessing.Pool')
50 """Tests run() with a node spawns a new process for each node."""
51 node_list = [mock.Mock(), mock.Mock()]
[all …]
/aosp_15_r20/tools/test/connectivity/acts/framework/tests/libs/proc/
Dprocess_test.py3 # Copyright 2018 - The Android Open Source Project
9 # http://www.apache.org/licenses/LICENSE-2.0
21 import mock
45 """Tests the acts.libs.proc.process.Process class."""
55 return mock.patch('acts.libs.proc.process.%s' % imported_name,
61 """Tests that set_on_output_callback sets on_output_callback."""
62 callback = mock.Mock()
72 """Tests that set_on_terminate_callback sets _on_terminate_callback."""
73 callback = mock.Mock()
83 """Tests that start raises an exception if it has already been called
[all …]
/aosp_15_r20/external/pigweed/pw_build/py/
H A Dbazel_query_test.py7 # https://www.apache.org/licenses/LICENSE-2.0
14 """Tests for the pw_build.bazel_query module."""
21 from unittest import mock
36 def __init__(self, source_dir: str) -> None:
37 """Creates a workspace mock helper."""
43 def source_dir(self) -> str:
47 def add_call(self, *args: str, result=None) -> None:
52 def finalize(self, mock_run) -> None:
53 """Add the registered call results to a subprocess mock."""
55 mock.MagicMock(**attr) for attr in self._results
[all …]
/aosp_15_r20/tools/asuite/atest/test_runners/
H A Dmobly_test_runner_unittest.py7 # http://www.apache.org/licenses/LICENSE-2.0
16 # pylint: disable=protected-access
17 # pylint: disable=invalid-name
23 from unittest import mock
52 """Unit tests for MoblyResultUploader."""
54 def setUp(self) -> None:
56 mock.patch(
60 mock.patch(
64 mock.patch('atest.logstorage.logstorage_utils.BuildClient'),
72 def tearDown(self) -> None:
[all …]
/aosp_15_r20/tools/test/connectivity/acts/framework/tests/libs/logging/
Dlog_stream_test.py3 # Copyright 2018 - The Android Open Source Project
9 # http://www.apache.org/licenses/LICENSE-2.0
20 import mock
41 """Tests the _LogStream class in acts.libs.logging.log_stream."""
45 return mock.patch('acts.libs.logging.log_stream.%s' % imported_name,
60 @mock.patch('os.makedirs')
62 """Tests that a NullHandler is added to the logger upon initialization.
75 @mock.patch('os.makedirs')
78 """Tests that a style is invalid if it sets the same handler twice.
92 @mock.patch('os.makedirs')
[all …]
/aosp_15_r20/external/cronet/build/lacros/
H A Dtest_runner_test.py3 # 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 …]
/aosp_15_r20/out/soong/raw-aosp_shiba/49/
D493d6f5cb7c098e012c869c70cdcbdd9323deaa53 from: "out/host/linux-x86/bin/lint"
7 from: "out/host/linux-x86/bin/lint_project_xml"
11 from: "out/host/linux-x86/bin/soong_zip"
15 from: "out/host/linux-x86/bin/zipsync"
19 from: "out/host/linux-x86/framework/lint.jar"
31 …latform.api.stubs.from-text/android_common/conscrypt.module.platform.api.stubs.from-text/conscrypt…
32 …latform.api.stubs.from-text/android_common/conscrypt.module.platform.api.stubs.from-text/conscrypt…
35 …t/soong/.intermediates/external/guava/guava-android-host/linux_glibc_common/local-javac-header/gua…
36 …t/soong/.intermediates/external/guava/guava-android-host/linux_glibc_common/local-javac-header/gua…
39 …rom: "out/soong/.intermediates/external/guava/guava-both/linux_glibc_common/local-javac-header/gua…
[all …]
/aosp_15_r20/external/cronet/build/chromeos/
H A Dgenerate_skylab_tast_filter_test.py4 # 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 …]

12345678910>>...52