]>
git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/googletest/googlemock/test/gmock-function-mocker_nc_test.py
1 """Negative compilation tests for Google Mock macro MOCK_METHOD."""
6 IS_LINUX
= os
.name
== "posix" and os
.uname()[0] == "Linux"
9 "WARNING: Negative compilation tests are not supported on this platform")
12 # Suppresses the 'Import not at the top of the file' lint complaint.
13 # pylint: disable-msg=C6204
14 from google3
.testing
.pybase
import fake_target_util
15 from google3
.testing
.pybase
import googletest
17 # pylint: enable-msg=C6204
20 class GMockMethodNCTest(googletest
.TestCase
):
21 """Negative compilation tests for MOCK_METHOD."""
23 # The class body is intentionally empty. The actual test*() methods
24 # will be defined at run time by a call to
25 # DefineNegativeCompilationTests() later.
29 # Defines a list of test specs, where each element is a tuple
30 # (test name, list of regexes for matching the compiler errors).
32 ("MOCK_METHOD_INVALID_CONST_SPEC",
33 [r
"onst cannot be recognized as a valid specification modifier"]),
36 # Define a test method in GMockNCTest for each element in TEST_SPECS.
37 fake_target_util
.DefineNegativeCompilationTests(
39 "google3/third_party/googletest/googlemock/test/gmock-function-mocker_nc",
40 "gmock-function-mocker_nc.o", TEST_SPECS
)
42 if __name__
== "__main__":