meekrosoft / fff

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

Add support for the ellipsis operator (...) #1

Closed michahoiting closed 11 years ago

michahoiting commented 12 years ago

Fff is a great and elegant tool to unit test (embedded) c code, but I have some APIs that use the ellipsis operator to pass variable number of arguments. I have made some modifications to fff.h to handle '...' as the last parameter.

I have an initial concept to handle minimal vararg functionality with fakes, see https://gist.github.com/4037531 In a second approach I would design it such that the custom fakes shall use a va_list (but not not saving varargs).

meekrosoft commented 12 years ago

I think this would be an interesting addition. The fff.h file is generated by the fakegen.rb ruby file, so that would be the place to make change. Can you provide your modifications to me?

meekrosoft commented 11 years ago

Hi Micha, I have merged in your varargs branch - thanks for sharing! Cheers, Mike

michahoiting commented 11 years ago

Hi Mike,

Thanks for merging the changes I suggested. FFF is a great framework. For our C code I use it myself every day together with libcheck.

I have been / am very busy with projects so I haven't been able to put as much time into it as I would have liked.

Also, I'm still struggling with the c++ support and how to deal with const variables.

I still have some ideas for fff, I try to free up some time to work on it and send you a proper git-pull request...

Also to you: thanks for sharing!

Kind regards, Micha

Verstuurd vanaf mijn iPhone

Op 23 jun. 2013 om 15:41 heeft Mike Long notifications@github.com het volgende geschreven:

Hi Micha, I have merged in your varargs branch - thanks for sharing! Cheers, Mike

— Reply to this email directly or view it on GitHub.