Skip to content
Snippets Groups Projects
Commit fdab3fbc authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add missing test for Messenger

Also rename test file (getting rid of the 'mpi_' prefix)
parent 8a3b620d
Branches
Tags
1 merge request!63Feature/utils coverage
...@@ -447,7 +447,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Coverage") ...@@ -447,7 +447,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Coverage")
COMMAND ${FASTCOV} -q --gcov "${GCOV_BIN}" COMMAND ${FASTCOV} -q --gcov "${GCOV_BIN}"
--include "${PUGS_SOURCE_DIR}/src" --include "${PUGS_SOURCE_DIR}/src"
--exclude "${PUGS_SOURCE_DIR}/src/main.cpp" "${PUGS_SOURCE_DIR}/src/utils/BacktraceManager.*" "${PUGS_SOURCE_DIR}/src/utils/FPEManager.*" --exclude "${PUGS_SOURCE_DIR}/src/main.cpp" "${PUGS_SOURCE_DIR}/src/utils/BacktraceManager.*" "${PUGS_SOURCE_DIR}/src/utils/FPEManager.*" "${PUGS_SOURCE_DIR}/src/utils/SignalManager.*"
--lcov -o coverage.info -n --lcov -o coverage.info -n
COMMAND ${LCOV} --gcov "${GCOV_BIN}" --list coverage.info COMMAND ${LCOV} --gcov "${GCOV_BIN}" --list coverage.info
......
...@@ -93,7 +93,7 @@ add_executable (unit_tests ...@@ -93,7 +93,7 @@ add_executable (unit_tests
add_executable (mpi_unit_tests add_executable (mpi_unit_tests
mpi_test_main.cpp mpi_test_main.cpp
mpi_test_Messenger.cpp test_Messenger.cpp
) )
add_library(test_Pugs_MeshDataBase add_library(test_Pugs_MeshDataBase
......
...@@ -471,4 +471,11 @@ TEST_CASE("Messenger", "[mpi]") ...@@ -471,4 +471,11 @@ TEST_CASE("Messenger", "[mpi]")
std::remove("barrier_test"); std::remove("barrier_test");
} }
SECTION("errors")
{
int argc = 0;
char** argv = nullptr;
REQUIRE_THROWS_WITH((parallel::Messenger::create(argc, argv)), "unexpected error: Messenger already created");
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment