diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b4296426782f617a070607c240abb01d28aed54c..11680e00f08cc7aa5ed80d9ed022fd3705bc8078 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -90,7 +90,7 @@ add_executable (mpi_unit_tests ) add_library(test_Pugs_MeshDataBase - test_MeshDataBase.cpp) + MeshDataBaseForTests.cpp) target_link_libraries (unit_tests test_Pugs_MeshDataBase diff --git a/tests/test_MeshDataBase.cpp b/tests/MeshDataBaseForTests.cpp similarity index 56% rename from tests/test_MeshDataBase.cpp rename to tests/MeshDataBaseForTests.cpp index 971f5cd5bfc3cc79731b9fad5fcbf37ab591826d..8a873625a365fd3aed7ff23ecdfb82e91bf72926 100644 --- a/tests/test_MeshDataBase.cpp +++ b/tests/MeshDataBaseForTests.cpp @@ -1,31 +1,31 @@ -#include <test_MeshDataBase.hpp> +#include <MeshDataBaseForTests.hpp> #include <utils/PugsAssert.hpp> #include <mesh/CartesianMeshBuilder.hpp> -const test_MeshDataBase* test_MeshDataBase::m_instance = nullptr; +const MeshDataBaseForTests* MeshDataBaseForTests::m_instance = nullptr; -test_MeshDataBase::test_MeshDataBase() +MeshDataBaseForTests::MeshDataBaseForTests() { std::make_shared<CartesianMeshBuilder>(TinyVector<3>{0, 1, 0}, TinyVector<3>{2, -1, 3}, TinyVector<3, size_t>{6, 7, 3}); } -const test_MeshDataBase& -test_MeshDataBase::get() +const MeshDataBaseForTests& +MeshDataBaseForTests::get() { return *m_instance; } void -test_MeshDataBase::create() +MeshDataBaseForTests::create() { Assert(m_instance == nullptr); - m_instance = new test_MeshDataBase(); + m_instance = new MeshDataBaseForTests(); } void -test_MeshDataBase::destroy() +MeshDataBaseForTests::destroy() { Assert(m_instance != nullptr); delete m_instance; diff --git a/tests/MeshDataBaseForTests.hpp b/tests/MeshDataBaseForTests.hpp new file mode 100644 index 0000000000000000000000000000000000000000..31dad8f384b8c96d2d325940a3a4e3267f6c5793 --- /dev/null +++ b/tests/MeshDataBaseForTests.hpp @@ -0,0 +1,23 @@ +#ifndef MESH_DATA_BASE_FOR_TESTS_HPP +#define MESH_DATA_BASE_FOR_TESTS_HPP + +#include <mesh/IMesh.hpp> + +#include <memory> + +class MeshDataBaseForTests +{ + private: + explicit MeshDataBaseForTests(); + + static const MeshDataBaseForTests* m_instance; + + public: + static const MeshDataBaseForTests& get(); + static void create(); + static void destroy(); + + ~MeshDataBaseForTests() = default; +}; + +#endif // MESH_DATA_BASE_FOR_TESTS_HPP diff --git a/tests/mpi_test_main.cpp b/tests/mpi_test_main.cpp index 33ab8ed160d182209ebae862e5bbdb0946bcc82f..45b733f94d6877a5c6792ed7439965a00e2aa428 100644 --- a/tests/mpi_test_main.cpp +++ b/tests/mpi_test_main.cpp @@ -10,7 +10,7 @@ #include <utils/Messenger.hpp> #include <utils/pugs_config.hpp> -#include <test_MeshDataBase.hpp> +#include <MeshDataBaseForTests.hpp> #include <cstdlib> #include <filesystem> @@ -58,7 +58,7 @@ main(int argc, char* argv[]) DiamondDualConnectivityManager::create(); DiamondDualMeshManager::create(); - test_MeshDataBase::create(); + MeshDataBaseForTests::create(); if (parallel::rank() == 0) { if (parallel::size() > 1) { @@ -77,7 +77,7 @@ main(int argc, char* argv[]) result = session.run(); - test_MeshDataBase::destroy(); + MeshDataBaseForTests::destroy(); DiamondDualMeshManager::destroy(); DiamondDualConnectivityManager::destroy(); diff --git a/tests/test_MeshDataBase.hpp b/tests/test_MeshDataBase.hpp deleted file mode 100644 index d5e84c8e7bdd08f9abf2ca7fb818bb364d463079..0000000000000000000000000000000000000000 --- a/tests/test_MeshDataBase.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef TEST_MESH_DATA_BASE_HPP -#define TEST_MESH_DATA_BASE_HPP - -#include <mesh/IMesh.hpp> - -#include <memory> - -class test_MeshDataBase -{ - private: - explicit test_MeshDataBase(); - - static const test_MeshDataBase* m_instance; - - public: - static const test_MeshDataBase& get(); - static void create(); - static void destroy(); - - ~test_MeshDataBase() = default; -}; - -#endif // TEST_MESH_DATA_BASE_HPP diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 1f7a5aafe259746152faaa8a13f71d8294970713..7ab5a66fb05301c3e9e41e4140a898bda96cac76 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -9,7 +9,7 @@ #include <mesh/SynchronizerManager.hpp> #include <utils/Messenger.hpp> -#include <test_MeshDataBase.hpp> +#include <MeshDataBaseForTests.hpp> int main(int argc, char* argv[]) @@ -33,11 +33,11 @@ main(int argc, char* argv[]) DiamondDualConnectivityManager::create(); DiamondDualMeshManager::create(); - test_MeshDataBase::create(); + MeshDataBaseForTests::create(); result = session.run(); - test_MeshDataBase::destroy(); + MeshDataBaseForTests::destroy(); DiamondDualMeshManager::destroy(); DiamondDualConnectivityManager::destroy();