blob: cface485dfc224b2d7a9e8c8345777f151f06788 [file] [log] [blame]
Dean Moldovan22c413b2017-03-30 00:20:42 +02001// The Catch implementation is compiled here. This is a standalone
Dean Moldovan9693a5c2017-03-23 17:27:32 +01002// translation unit to avoid recompiling it for every test change.
3
Dean Moldovan22c413b2017-03-30 00:20:42 +02004#include <pybind11/embed.h>
5
6#define CATCH_CONFIG_RUNNER
Dean Moldovan9693a5c2017-03-23 17:27:32 +01007#include <catch.hpp>
Dean Moldovan22c413b2017-03-30 00:20:42 +02008
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}