#pragma once #include #include #include #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 expected_names = { "ID", "H", "O", "Charge", "H(0)", "O(0)", "C(-4)", "C(4)", "Ca", "Cl", "Mg", "Na", "Calcite_eq", "Calcite_si", "Dolomite_eq", "Dolomite_si"}; const std::vector expected_values = {1, 111.01243522078478, 55.506323405120348, -4.7919630342304069e-13, 0, 2.0180693312370871e-15, 0, 3.500625006800175e-05, 0.12131244646561848, 0.49999844804496646, 0.078722559784449683, 0.099999999999999978, 0.95741011331883141, 0, 0.021277440215550378, 0}; const std::vector expected_errors = { 0, 1e-3, 1e-3, 1e-15, 1e-15, 1e-15, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5, 0, 1e-5, 0}; 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 expected_names = { "ID", "H", "O", "Charge", "H(0)", "O(0)", "Ba", "Cl", "S(-2)", "S(6)", "Sr", "Barite", "Barite_p1", "Celestite", "Celestite_p1", "Celestite_eq", "Celestite_si"}; const std::vector expected_values_line_one = { 1, 111.01243359383071, 55.508698688362124, -1.2153078399577636e-09, 0, 8.6371063688066983e-15, 1.0000001848805677e-12, 1.0000000116187218e-12, 0, 0.00062047270964839664, 0.00062047270964840271, std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), 0.99937952729135193, 0}; const std::vector expected_errors = { 0, 1e-3, 1e-3, 1e-15, 1e-15, 1e-15, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5, std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), 1e-5, 0}; const std::vector expected_names_erased = { "ID", "H", "O", "Charge", "H(0)", "O(0)", "Ba", "Cl", "S(-2)", "S(6)", "Sr", "Barite", "Barite_p1", "Celestite", "Celestite_p1"}; const std::vector expected_names_subset = { "ID", "H", "O", "Charge", "H(0)", "O(0)", "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