Migrate tests to use MockWarningHandler for warning interception.
PiperOrigin-RevId: 933656759 Change-Id: Ia21514c302799034bf598445933dd90427284737
This commit is contained in:
committed by
Copybara-Service
parent
38c3388046
commit
cedaa47d61
+3
-2
@@ -117,8 +117,9 @@ class MockWarningHandler {
|
||||
// Mock method called when a warning is intercepted.
|
||||
MOCK_METHOD(void, Warn, (const std::string& msg));
|
||||
|
||||
// Allow any number of warnings without triggering test failure.
|
||||
void ExpectWarnings();
|
||||
// Allow any number of warnings (if empty) or expect at least one warning
|
||||
// containing the specified substring (if non-empty).
|
||||
void ExpectWarnings(std::string_view substring = "");
|
||||
|
||||
// Returns the thread-local active mock warning handler.
|
||||
static MockWarningHandler* GetActive();
|
||||
|
||||
Reference in New Issue
Block a user