Commit 0b38eff8 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

added TestEnviroment

parent 4ba61c3e
......@@ -121,6 +121,7 @@ add_subdirectory(${PROJECT_MPP_DIR}/src)
# Tests
if (BUILD_TESTS)
include_directories(${PROJECT_MPP_DIR}/tests)
add_subdirectory(${PROJECT_MPP_DIR}/tests/)
endif ()
#---------------------------------------------------------------------------------------#
......
#ifndef TESTENVIROMENT_HPP
#define TESTENVIROMENT_HPP
#include "gtest/gtest.h"
#include "m++.h"
using namespace ::testing;
int MAIN_TEST_WITH_PPM(int argc, char **argv) {
InitGoogleTest(&argc, argv);
PPM = new ParallelProgrammingModel(&argc, argv);
TestEventListeners &listeners = UnitTest::GetInstance()->listeners();
if (!PPM->master())
delete listeners.Release(listeners.default_result_printer());
int rc = RUN_ALL_TESTS();
delete PPM;
return rc;
}
int MAIN_TEST_WITHOUT_PPM(int argc, char **argv) {
InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
#endif //TESTENVIROMENT_HPP
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment