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

Rename test_MeshDataBase to MeshDataBaseForTests for clarity

It looked like `test_MeshDataBase` were tests for a `MeshDataBase`
class which does not exists
parent a24b5701
No related branches found
No related tags found
1 merge request!61Feature/mesh based ci
...@@ -90,7 +90,7 @@ add_executable (mpi_unit_tests ...@@ -90,7 +90,7 @@ add_executable (mpi_unit_tests
) )
add_library(test_Pugs_MeshDataBase add_library(test_Pugs_MeshDataBase
test_MeshDataBase.cpp) MeshDataBaseForTests.cpp)
target_link_libraries (unit_tests target_link_libraries (unit_tests
test_Pugs_MeshDataBase test_Pugs_MeshDataBase
......
#include <test_MeshDataBase.hpp> #include <MeshDataBaseForTests.hpp>
#include <utils/PugsAssert.hpp> #include <utils/PugsAssert.hpp>
#include <mesh/CartesianMeshBuilder.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}, std::make_shared<CartesianMeshBuilder>(TinyVector<3>{0, 1, 0}, TinyVector<3>{2, -1, 3},
TinyVector<3, size_t>{6, 7, 3}); TinyVector<3, size_t>{6, 7, 3});
} }
const test_MeshDataBase& const MeshDataBaseForTests&
test_MeshDataBase::get() MeshDataBaseForTests::get()
{ {
return *m_instance; return *m_instance;
} }
void void
test_MeshDataBase::create() MeshDataBaseForTests::create()
{ {
Assert(m_instance == nullptr); Assert(m_instance == nullptr);
m_instance = new test_MeshDataBase(); m_instance = new MeshDataBaseForTests();
} }
void void
test_MeshDataBase::destroy() MeshDataBaseForTests::destroy()
{ {
Assert(m_instance != nullptr); Assert(m_instance != nullptr);
delete m_instance; delete m_instance;
......
#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
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <utils/Messenger.hpp> #include <utils/Messenger.hpp>
#include <utils/pugs_config.hpp> #include <utils/pugs_config.hpp>
#include <test_MeshDataBase.hpp> #include <MeshDataBaseForTests.hpp>
#include <cstdlib> #include <cstdlib>
#include <filesystem> #include <filesystem>
...@@ -58,7 +58,7 @@ main(int argc, char* argv[]) ...@@ -58,7 +58,7 @@ main(int argc, char* argv[])
DiamondDualConnectivityManager::create(); DiamondDualConnectivityManager::create();
DiamondDualMeshManager::create(); DiamondDualMeshManager::create();
test_MeshDataBase::create(); MeshDataBaseForTests::create();
if (parallel::rank() == 0) { if (parallel::rank() == 0) {
if (parallel::size() > 1) { if (parallel::size() > 1) {
...@@ -77,7 +77,7 @@ main(int argc, char* argv[]) ...@@ -77,7 +77,7 @@ main(int argc, char* argv[])
result = session.run(); result = session.run();
test_MeshDataBase::destroy(); MeshDataBaseForTests::destroy();
DiamondDualMeshManager::destroy(); DiamondDualMeshManager::destroy();
DiamondDualConnectivityManager::destroy(); DiamondDualConnectivityManager::destroy();
......
#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
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <mesh/SynchronizerManager.hpp> #include <mesh/SynchronizerManager.hpp>
#include <utils/Messenger.hpp> #include <utils/Messenger.hpp>
#include <test_MeshDataBase.hpp> #include <MeshDataBaseForTests.hpp>
int int
main(int argc, char* argv[]) main(int argc, char* argv[])
...@@ -33,11 +33,11 @@ main(int argc, char* argv[]) ...@@ -33,11 +33,11 @@ main(int argc, char* argv[])
DiamondDualConnectivityManager::create(); DiamondDualConnectivityManager::create();
DiamondDualMeshManager::create(); DiamondDualMeshManager::create();
test_MeshDataBase::create(); MeshDataBaseForTests::create();
result = session.run(); result = session.run();
test_MeshDataBase::destroy(); MeshDataBaseForTests::destroy();
DiamondDualMeshManager::destroy(); DiamondDualMeshManager::destroy();
DiamondDualConnectivityManager::destroy(); DiamondDualConnectivityManager::destroy();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment