[iOS]Ensures all expectations are followed by a verify #547
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The error message if it is not the case state that the expect can be replaced by stub if we actually don’t care about verifying. Chrome code ended up with dozens and dozens of tests that failed to verify because the author and the reviewer forgot to add this last check. I believe that having a way to require all verify to be called would improve the usability of this class in tests.
I understand that you may not be able to merge it as-is, at upgrading would break the test flow of many of your users. Instead, I suspect that you’ll want a way to enable this feature progressively, at user request. I’m willing to work with you to ensure that we can merge this feature if you accept it.
For our usage in chromium, I expect the simpler way to deal with this feature is to have some #DEFINE macro. If a build-time constant is defined, we enable the feature, other wise it’s disabled.
It would also be possible to have a static boolean that default to false, and that the test should switch to true to enable the safety feature.