0
#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

Chen Li
  • 4,824
  • 3
  • 28
  • 55

1 Answers1

2

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 of main(). If it fits your needs, then just link your test with gtest_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.

Quentin
  • 62,093
  • 7
  • 131
  • 191