AUnit icon indicating copy to clipboard operation
AUnit copied to clipboard

Feature Request: AMock

Open ciband opened this issue 6 years ago • 3 comments

Do you have any plans to look into making "AMock", similar to Googletest's GMock?

ciband avatar Dec 03 '18 19:12 ciband

I don't right now. The few times when I could have used a mocking framework, I rolled my own fake objects. It wasn't too bad. Given that the vast majority of Arduino programmers don't write any unit tests, the demand for a mocking framework is probably even lower. But I'm willing incorporate such a framework if someone else was interesting in doing that work. :-)

bxparks avatar Dec 04 '18 17:12 bxparks

For our project at Ark, we will be transitioning to use GMock and would like to keep parity on our IoT builds so a AMock framework with a GMock adapter would be our ideal situation. When this time comes I will see what I can come up with. I haven't done my homework on GMock so I don't know how deep the rabbit hole will go. If I can get something together I will definitely PR it back.

Feel free to close this if you wish or keep it open to nag me, lol. :)

ciband avatar Dec 04 '18 17:12 ciband

I'll leave it open because I am somewhat curious about it (but at a low-level priority). I've not used GMock, but I'm quite familiar with the Java frameworks (JMock, EasyMock, Hamcrest, Mockito, etc) that it's based on.

bxparks avatar Dec 04 '18 18:12 bxparks