Automated g4 rollback of changelist 367238585.
*** Reason for rollback ***
Broke https://test.corp.google.com/ui#cl=365134781&flags=CAMQBQ==&id=OCL:365134781:BASE:367271161:1617822936639:6a37b0ed&t=//chrome/cloudcast/client/gamerx/audio/test:active_controller_audio_service_test_ddc_headless-chrome-linux
*** Original change description ***
Import https://github.com/dart-lang/mockito/pull/376
***
PiperOrigin-RevId: 367295097
diff --git a/lib/src/mock.dart b/lib/src/mock.dart
index 44bec84..4142f1f 100644
--- a/lib/src/mock.dart
+++ b/lib/src/mock.dart
@@ -997,10 +997,7 @@
throw StateError(_verifyCalls.join());
}
_verificationInProgress = true;
- return <T>(List<T> responses) {
- if (responses.length != _verifyCalls.length) {
- fail('Used on a non-mockito object');
- }
+ return <T>(List<T> _) {
_verificationInProgress = false;
var verificationResults = <VerificationResult>[];
var time = DateTime.fromMillisecondsSinceEpoch(0);
diff --git a/test/verify_test.dart b/test/verify_test.dart
index 659fe07..59c2575 100644
--- a/test/verify_test.dart
+++ b/test/verify_test.dart
@@ -206,12 +206,6 @@
'2 verify calls have been stored.')));
}
});
-
- test('should fail when called with non-mock-call parameter', () {
- expectFail('Used on a non-mockito object', () {
- verifyInOrder(['a string is not a mock call']);
- });
- });
});
group('verify should fail when no matching call is found', () {
@@ -463,12 +457,6 @@
});
});
- test('should fail when given non-mock-call parameters', () {
- expectFail('Used on a non-mockito object', () {
- verifyInOrder(['a string is not a mock call']);
- });
- });
-
test('verify been used as an argument fails', () {
mock.methodWithoutArgs();
mock.getter;