Upgrade most builds to use Bazel 9.0.0
Keep one build on 8.5.1 to test WORKSPACE Fixes the -Wdeprecated-declaration warnings enabled by default in Bazel 9 that come from the single-arg Invoke(). Fixes the new -Winconsistent-missing-override that we intentionally use in a test. Upgrades RE2 to a version compatible with Bazel 9. PiperOrigin-RevId: 865966282 Change-Id: I5f7c3b60daf5f8a90be08004d96aaa59611e35c4
This commit is contained in:
committed by
Copybara-Service
parent
32c3dce34b
commit
5a9c3f9e8d
@@ -35,6 +35,13 @@
|
||||
// Silence C4503 (decorated name length exceeded) for MSVC.
|
||||
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4503)
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
// This file intentionally tests many ways of writing Mock classes, including
|
||||
// with and without the override keyword.
|
||||
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
|
||||
#endif
|
||||
|
||||
#ifdef GTEST_OS_WINDOWS
|
||||
// MSDN says the header file to be included for STDMETHOD is BaseTyps.h but
|
||||
// we are getting compiler errors if we use basetyps.h, hence including
|
||||
|
||||
@@ -327,7 +327,7 @@ TEST(LinkTest, TestInvoke) {
|
||||
InvokeHelper test_invoke_helper;
|
||||
|
||||
EXPECT_CALL(mock, VoidFromString(_))
|
||||
.WillOnce(Invoke(&InvokeHelper::StaticVoidFromString))
|
||||
.WillOnce(&InvokeHelper::StaticVoidFromString)
|
||||
.WillOnce(Invoke(&test_invoke_helper, &InvokeHelper::VoidFromString));
|
||||
mock.VoidFromString(nullptr);
|
||||
mock.VoidFromString(nullptr);
|
||||
@@ -360,7 +360,7 @@ TEST(LinkTest, TestWithArg) {
|
||||
Mock mock;
|
||||
|
||||
EXPECT_CALL(mock, VoidFromString(_))
|
||||
.WillOnce(WithArg<0>(Invoke(&InvokeHelper::StaticVoidFromString)));
|
||||
.WillOnce(WithArg<0>(&InvokeHelper::StaticVoidFromString));
|
||||
mock.VoidFromString(nullptr);
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ TEST(LinkTest, TestWithArgs) {
|
||||
Mock mock;
|
||||
|
||||
EXPECT_CALL(mock, VoidFromString(_))
|
||||
.WillOnce(WithArgs<0>(Invoke(&InvokeHelper::StaticVoidFromString)));
|
||||
.WillOnce(WithArgs<0>(&InvokeHelper::StaticVoidFromString));
|
||||
mock.VoidFromString(nullptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user