28 lines
868 B
C++
28 lines
868 B
C++
/**
|
|
* @file unittest_main.cpp
|
|
* @brief Shared entry point for the TetraIF unit test executables.
|
|
*
|
|
* GTest::gtest_main provides a main() that neither creates a QCoreApplication
|
|
* nor bootstraps the NGL root logger. The classes under test do both: they take
|
|
* a logger reference in their constructor, and NGL::NGLLoggerBootstrap throws
|
|
* NotCreatedError when the root logger has not been created yet.
|
|
*
|
|
* This mirrors tests/gtest_qt_main.cpp, minus the QApplication - none of the
|
|
* TetraIF unit tests touch widgets.
|
|
*/
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
|
#include <QtCore/QCoreApplication>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
QCoreApplication app(argc, argv);
|
|
|
|
NGL::NGLLoggerBootstrap::createNGLRootLogger(QString(), true, QString(), /*quiet=*/true);
|
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
return RUN_ALL_TESTS();
|
|
}
|