martinmoene / lest

A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD (includes C++98 variant)
Boost Software License 1.0
390 stars 45 forks source link

New Feature: Can you implement mock based on this framework #31

Open hysci opened 8 years ago

hysci commented 8 years ago

I thinks the advantage of LEST is that there is no need to compile a lib/dll before using it (compared to gtest, boost.test etc). But the google mock gives an elegant way to implement stubs for testers. Can you add mock feature into the next version? Another project that implements UT and mock is http://cpputest.github.com. But this project also need to pre-buid a lib/dll before using it. This would make trouble when a project has to support various compilers/os. (e.g., I have found that a gtest lib compiled from VS2010 was not supported by VS2013)

martinmoene commented 8 years ago

Up to now, I've not been doing mockist testing and I don't think it's likeky I'll add support for mocks to lest itself. However, perhaps someone likes to contribute it as an extension.

martinmoene commented 8 years ago

Thanks for the pointer to cpputest b.t.w.. It's always good to look at others' approaches.