Closed superical closed 2 years ago
This is expected behaviour IMO. If you're mocking your Token contract, it has no internal implementation - that's what a mock should be.
Agree with @hickscorp, i believe there's no function call
to walk
because it's called internally.
We should think of a way of getting the internal calls and making expectations on them, i believe is very far reach from what smock actually touches tho.
I'm closing the issue and adding the handling of internal variables to the list of possible features.
Describe the bug When a function is called internally by another function, the call count of that function called internally isn't reflected correctly.
Reproduction steps
Here's an example of a contract:
Now, when I call the
run()
function and test ifwalk
was called:The
expect
will fail because the call count of thewalk
function is0
. smock doesn't count thewalk
function which was called internally inrun
, but why doesn't it?Expected behavior The call count of
walk
should have been1
with the args20
. Shouldn't this be the expected behaviour?Additional context Smock version 2.0.7