mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
102 lines
3.7 KiB
C++
102 lines
3.7 KiB
C++
#pragma once
|
|
|
|
#include <limits>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#define POET_TEST(name) TEST(TestPOET, name)
|
|
|
|
namespace base_test {
|
|
const std::string script = R"(SOLUTION 1
|
|
units mol/kgw
|
|
temp 25
|
|
Ca 0.1
|
|
Mg 0.1
|
|
Cl 0.5 charge
|
|
Na 0.1
|
|
PURE 1
|
|
Calcite 0.0 1
|
|
Dolomite 0.0 0
|
|
RUN_CELLS
|
|
-cells 1
|
|
END)";
|
|
|
|
const std::vector<std::string> expected_names = {
|
|
"ID", "H", "O", "Charge", "tc",
|
|
"patm", "SolVol", "pH", "pe", "C(-4)",
|
|
"C(4)", "Ca", "Cl", "Mg", "Na",
|
|
"Calcite_eq", "Calcite_si", "Dolomite_eq", "Dolomite_si"};
|
|
|
|
const std::string phreeqc_database = R"database(@POET_PHREEQCDAT_DB@)database";
|
|
} // namespace base_test
|
|
|
|
namespace barite_test {
|
|
const std::string script = R"barite(@POET_BARITE_PQI@)barite";
|
|
const std::string database = R"barite(@POET_BARITE_DB@)barite";
|
|
|
|
const std::vector<std::string> expected_names = {"ID",
|
|
"H",
|
|
"O",
|
|
"Charge",
|
|
"tc",
|
|
"patm",
|
|
"SolVol",
|
|
"pH",
|
|
"pe",
|
|
"Ba",
|
|
"Cl",
|
|
"S(-2)",
|
|
"S(6)",
|
|
"Sr",
|
|
"Barite_kin",
|
|
"Barite_p1",
|
|
"Celestite_kin",
|
|
"Celestite_p1",
|
|
"Celestite_eq",
|
|
"Celestite_si"};
|
|
|
|
const std::vector<std::string> expected_names_erased = {"ID",
|
|
"H",
|
|
"O",
|
|
"Charge",
|
|
"tc",
|
|
"patm",
|
|
"SolVol",
|
|
"pH",
|
|
"pe",
|
|
"Ba",
|
|
"Cl",
|
|
"S(-2)",
|
|
"S(6)",
|
|
"Sr",
|
|
"Barite_kin",
|
|
"Barite_p1",
|
|
"Celestite_kin",
|
|
"Celestite_p1"};
|
|
|
|
const std::vector<std::string> expected_names_subset = {
|
|
"ID", "H", "O", "Charge", "tc", "patm", "SolVol", "pH",
|
|
"pe", "Ba", "Cl", "S(-2)", "S(6)", "Sr", "Celestite_eq", "Celestite_si"};
|
|
} // namespace barite_test
|
|
|
|
namespace test_engine {
|
|
const std::string script = R"(SOLUTION 1
|
|
units mol/kgw
|
|
temp 25
|
|
Ca 0.1
|
|
Mg 0.1
|
|
Cl 0.5 charge
|
|
Na 0.1
|
|
PURE 1
|
|
Calcite 0.0 1
|
|
Dolomite 0.0 0
|
|
## RUN_CELLS
|
|
## -cells 1
|
|
END)";
|
|
|
|
const std::string phreeqc_database = R"database(@POET_PHREEQCDAT_DB@)database";
|
|
|
|
} // namespace test_engine
|