I’m new in google test C++ framework. It’s quite easy to use but I’m wondering how to separate the cases into multiple test files. What is the best way?
Include the .cpp files directly is an option. Using a header seems that does nothing…
Any help is welcome
Create one file that contains just the main to run the tests.
Then put the tests into other files. You can put as many tests as you like in a file. Creating one file per class or per source file can work well.
This does require that all tests can share the same main. If you have to do something special there, you will have to have multiple build targets.