Page MenuHomec4science

database_configuration.cpp
No OneTemporary

File Metadata

Created
Thu, Nov 28, 01:35

database_configuration.cpp

#include <catch.hpp>
#include "utils/io/yaml.hpp"
#include "database/io/configuration.hpp"
#include "database.hpp"
TEST_CASE("database configuration", "[database],[io],[configuration]")
{
SECTION("Configuration")
{
auto conf = specmicp::io::parse_config_file("db_test.yaml");
specmicp::RawDatabasePtr db = specmicp::io::configure_database(conf);
REQUIRE(db->get_id_component("H[+]") == specmicp::no_species);
REQUIRE(db->get_id_component("HO[-]") != specmicp::no_species);
REQUIRE(db->get_id_component("Al[3+]") == specmicp::no_species);
REQUIRE(db->nb_gas() == 1);
REQUIRE(db->get_label_gas(0) == "CO2(g)");
REQUIRE(db->nb_mineral() == 7);
REQUIRE(db->get_id_mineral("SiO2_mod") != specmicp::no_species);
}
}

Event Timeline