vendredi 11 novembre 2016

How to deal with tests having their own main function and application having its main function as well?

I would like to use Googe Test:

http://ift.tt/1DHXe9D

There is a main function that executes tests:

GTEST_API_ int main(int argc, char **argv) {
  testing::InitGoogleTest(&argc, argv);
  [...]
  return RUN_ALL_TESTS();
}

I also need a main function for the actual application. But I can't have two main functions in one project. Or can I?

Should I create a brand new project somewhere else that will link to all the files in my core application?

Aucun commentaire:

Enregistrer un commentaire