Simply include this pod in your Podfile
for any OSX target:
pod 'GTestCpp', '~> 1.10.0'
Then, in any C++ or Objective C++ executable where you want to run tests,
structure your main()
like this:
#include <gtest/gtest.h>
#include "path/to/your/Module1Test.cpp"
#include "path/to/your/Module2Test.cpp"
int main(int argc, char * argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
This repo contains a CocoaPod wrapper for the c++
Google Test project, which provides a
testing framework. The Google Test project itself includes a main()
to
make integration with traditonal C++ projects easy. This Pod excludes that
main()
for easier integration with OSX and XCode-based projects.
Note that the license used in this repo is independent of that used in Google Test, which currently has a BSD-like license.
See also the GoogleTest pod in Firebase.
This repo contains a single Podspec file. To modify, just edit the
Podspect and use pod repo push MyRepo GTestCpp.podspec.json --use-libraries
.