Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77841850
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
Fri, Aug 16, 17:54
Size
801 B
Mime Type
text/x-c
Expires
Sun, Aug 18, 17:54 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19861510
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_yaml_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