User Guide
main.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2023 Blue Brain Project, EPFL.
3  * See the top-level LICENSE file for details.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 #include <catch2/catch_session.hpp>
9 #include <catch2/catch_test_macros.hpp>
10 
11 #include "pybind/pyembed.hpp"
12 #include "utils/logger.hpp"
13 
14 using namespace nmodl;
15 
16 int main(int argc, char* argv[]) {
17  // initialize python interpreter once for entire catch executable
19  // enable verbose logger output
20  logger->set_level(spdlog::level::debug);
21  // run all catch tests
22  int result = Catch::Session().run(argc, argv);
24  return result;
25 }
nmodl::pybind_wrappers::EmbeddedPythonLoader::get_instance
static EmbeddedPythonLoader & get_instance()
Construct (if not already done) and get the only instance of this class.
Definition: pyembed.hpp:29
nmodl
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
nmodl::logger
logger_type logger
Definition: logger.cpp:34
nmodl::pybind_wrappers::pybind_wrap_api::initialize_interpreter
decltype(&initialize_interpreter_func) initialize_interpreter
Definition: wrapper.hpp:61
nmodl::pybind_wrappers::pybind_wrap_api::finalize_interpreter
decltype(&finalize_interpreter_func) finalize_interpreter
Definition: wrapper.hpp:62
nmodl::pybind_wrappers::EmbeddedPythonLoader::api
const pybind_wrap_api & api()
Get a pointer to the pybind_wrap_api struct.
Definition: pyembed.cpp:135
logger.hpp
Implement logger based on spdlog library.
main
int main(int argc, const char *argv[])
Definition: main.cpp:656
pyembed.hpp