meekrosoft / fff

A testing micro framework for creating function test doubles
Other
777 stars 168 forks source link

Fix issue 26: Use void as parameter when no parameter exists #27

Closed usr42 closed 7 years ago

usr42 commented 7 years ago

This fixes issue 26. For functions without parameter void is used as parameter list. E.g. void func(void) instead of void func().

dmcminniwc commented 7 years ago

The FUNCNAME##_reset() functions should have void in their parameter lists also instead of being empty. For example, in fff.h at line 105 it should be void FUNCNAME##_reset(void){ \ and line 140 should be void FUNCNAME##_reset(void); \. Lines 182, 227, etc all need to be changed as well but I guess that would be the same fix in the Ruby file as for line 140.

Everything else looks good.

usr42 commented 7 years ago

FUNCNAME##_reset now also uses void as parameter list. Thanks for the finding.

dmcminniwc commented 7 years ago

It looks like there is an unused function in the code that I only noticed after your latest commit. Function output_reset_function between lines 350-355 in fakegen.rb does not appear to be called from anywhere. You could probably remove it.

usr42 commented 7 years ago

Right. I also saw the unused function. I already added the removal of this function to the pull request #28