catch.cpp revision 12391
1// The Catch implementation is compiled here. This is a standalone 2// translation unit to avoid recompiling it for every test change. 3 4#include <pybind11/embed.h> 5 6#define CATCH_CONFIG_RUNNER 7#include <catch.hpp> 8 9namespace py = pybind11; 10 11int main(int argc, const char *argv[]) { 12 py::scoped_interpreter guard{}; 13 auto result = Catch::Session().run(argc, argv); 14 15 return result < 0xff ? result : 0xff; 16} 17