Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93342593
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
Thu, Nov 28, 01:35
Size
803 B
Mime Type
text/x-c
Expires
Sat, Nov 30, 01:35 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22569493
Attached To
rSPECMICP SpecMiCP / ReactMiCP
database_configuration.cpp
View Options
#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
Log In to Comment