GTest/GMock usage inside CppUTest

241 views
Skip to first unread message

Bas Vodde

unread,
Sep 29, 2011, 7:56:11 AM9/29/11
to cppu...@googlegroups.com

Hiya,

I've added some features to CppUTest and put it in the trunk. It is mainly for GTest/GMock users who want to actually use CppUTest instead, but have a lot of existing GTest/GMock tests. Or, if, for some reason, you want to use GTest but *also* want to use the CppUTest more sane output and the memory leak detection.

You can now run GTest tests inside CppUTest. You do this by compiling with CPPUTEST_USE_REAL_GTEST and then, in the main, create a GTestConvertor and call the convet tests method on it. It will try to find all the GTests that you linked to the CppUTest binary and dynamically wrap a CppUTest around it and execute it. So, this way, you can have GTest tests and CppUTest tests in the same binary. (and you can also use GMock inside CppUTest tests :)

All of this is in the trunk. I didn't make a new release yet. And it was interesting to make it as GTest was obviously not made for this :P

Thanks,

Bas

ps. Default all this is off to not create dependencies to GTest, which would be very uncomfortable for most users...

Reply all
Reply to author
Forward
0 new messages