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?
I have simple test like this:
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?