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

`EXPECT_CALL(...).with_args(null) doesn't fail when function not called at all #13

Open
tudortimi-ifx opened this issue Aug 31, 2018 · 0 comments

Comments

@tudortimi-ifx
Copy link

tudortimi-ifx commented Aug 31, 2018

I have simple test like this:

some_class c;
`EXPECT_CALL(mock, func).with_args(c);
// ... act on UUT, which should trigger a call to 'func()' with 'c' as an argument
`FAIL_UNLESS(mock.check())

If the UUT doesn't call 'func', the test passes, though I would expect it to fail.

Since I forgot to add ' = new()' to 'c', I instructed the mock to expect 'null' as a value for the arg to 'func'. SVMock doesn't interpret this as a specification to have 'func' called at least one time. I think GMock does this, though.

Would we want 'with_args(...)' to play around with the cardinality of function calls like GMock does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant