Reputation: 5270
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
I cannot find alternative of gtest after googling
Upvotes: 1
Views: 275
Reputation: 63124
According to their primer:
But maybe you think that writing all those
main()
functions is too much work? We agree with you completely and that's why Google Test provides a basic implementation ofmain()
. If it fits your needs, then just link your test withgtest_main
library and you are good to go.
So rather than asking for the library to generate a definition of main
through a macro, you link in the gtest_main
library which contains one.
Upvotes: 3