Commits (1)
......@@ -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