summaryrefslogtreecommitdiff
path: root/ext/pybind11/tests/test_embed/catch.cpp
blob: cface485dfc224b2d7a9e8c8345777f151f06788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// The Catch implementation is compiled here. This is a standalone
// translation unit to avoid recompiling it for every test change.

#include <pybind11/embed.h>

#define CATCH_CONFIG_RUNNER
#include <catch.hpp>

namespace py = pybind11;

int main(int argc, const char *argv[]) {
    py::scoped_interpreter guard{};
    auto result = Catch::Session().run(argc, argv);

    return result < 0xff ? result : 0xff;
}