907 B
907 B
gtest-fuser
Google removed support for generating a single-file googletest between versions 1.11 and 1.12. This repository provides unofficial fused versions for releases after 1.11.
Warning
Unofficial single-source single-header for the googletest library.
Warning
You must comply with the googletest LICENSE to use these files.
- Download the version you want from
_generated
- Provide your own main function, something like this:
cat << 'EOF' >> main.cpp
#include <gtest/gtest.h>
int main(int argc, char **argv) {
printf("Running main() from %s\n", __FILE__);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
EOF
- Compile together:
g++ --std=c++14 -I gtest-<version> main.cpp gtest-<version>/gtest-all.cpp