Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer plugin rule: when call without stub result #184

Open
srawlins opened this issue Jan 8, 2019 · 0 comments
Open

Analyzer plugin rule: when call without stub result #184

srawlins opened this issue Jan 8, 2019 · 0 comments
Labels
P2 A bug or feature request we're likely to work on S2 type-enhancement A request for a change that isn't a bug

Comments

@srawlins
Copy link
Member

srawlins commented Jan 8, 2019

Mockito cannot throw any errors for this code, even though no stub result has been set:

void main() {
  var a = MockA();
  when(a.m1());
  print('hey');
  print('boo');
  verify(a.m1());
}

(Actually, maybe it could throw on that verify... but the error cannot point to the when which is currently in progress. It would be much better to report a static analysis error on when statement.)

@srawlins srawlins added P2 A bug or feature request we're likely to work on S2 type-enhancement A request for a change that isn't a bug labels Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on S2 type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant