Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65255955
database_configuration.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jun 2, 07:20
Size
894 B
Mime Type
text/x-c
Expires
Tue, Jun 4, 07:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17998135
Attached To
rSPECMICP SpecMiCP / ReactMiCP
database_configuration.cpp
View Options
#include <catch.hpp>
#include "specmicp_common/io/safe_config.hpp"
#include "specmicp_database/io/configuration.hpp"
#include "specmicp_database/database.hpp"
TEST_CASE("database configuration", "[database],[io],[configuration]")
{
SECTION("Configuration")
{
auto conf = specmicp::io::YAMLConfigFile::load("db_test.yaml");
specmicp::RawDatabasePtr db = specmicp::io::configure_database(
conf.get_section("database"));
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
Log In to Comment