1#include <gtest/gtest.h>
21std::string
TEST_CONFIG = std::string(getenv(
"MESON_SOURCE_ROOT")) +
"/tests/testsConfig.yaml";
31 serif::config::Config::getInstance().loadConfig(
TEST_CONFIG);
36 serif::config::Config::getInstance().loadConfig(
TEST_CONFIG);
39 std::set<std::string> expected = {
"eos:helm",
"mesh:polySphere"};
40 std::set<std::string> actual(resources.begin(), resources.end());
41 EXPECT_EQ(expected, actual);
45 serif::config::Config::getInstance().loadConfig(
TEST_CONFIG);
47 std::string name =
"eos:helm";
50 const auto &eos = std::get<std::unique_ptr<serif::eos::EOSio>>(r);
51 EXPECT_EQ(
"Helmholtz", eos->getFormatName());
56 EXPECT_DOUBLE_EQ(helmTable.
f[0][0], -1692098915534.8142);
58 EXPECT_THROW(rm.
getResource(
"opac:GS98:high:doesNotExist"), std::runtime_error);
Test suite for the resourceManager class.
const types::Resource & getResource(const std::string &name) const
Gets a resource by name.
std::vector< std::string > getAvailableResources() const
Gets a list of available resources.
static ResourceManager & getInstance()
Gets the singleton instance of the ResourceManager.
Defines a macro for triggering a breakpoint in different compilers and platforms.
std::variant< std::unique_ptr< serif::eos::helmholtz::HELMTable > > EOSTable
std::variant< std::unique_ptr< opat::OPAT >, std::unique_ptr< serif::mesh::MeshIO >, std::unique_ptr< serif::eos::EOSio > > Resource
A variant type that can hold different types of resources.
TEST_F(resourceManagerTest, constructor)
Test the constructor of the resourceManager class.
Defines types and functions for managing resources.
Structure to hold the Helmholtz EOS table data.