diff --git a/tests/eos/eosTest.cpp b/tests/eos/eosTest.cpp index d6e39d0..d98a25c 100644 --- a/tests/eos/eosTest.cpp +++ b/tests/eos/eosTest.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -11,7 +10,7 @@ #include "EOS.h" /** - * @file constTest.cpp + * @file eosTest.cpp * @brief Unit tests for the const class. */ @@ -28,36 +27,35 @@ std::string TEST_CONFIG = std::string(getenv("MESON_SOURCE_ROOT")) + "/tests/tes TEST_F(eosTest, read_helm_table) { serif::config::Config::getInstance().loadConfig(TEST_CONFIG); - serif::resource::ResourceManager& rm = serif::resource::ResourceManager::getInstance(); + const serif::resource::ResourceManager& rm = serif::resource::ResourceManager::getInstance(); auto& eos = std::get>(rm.getResource("eos:helm")); - auto& table = eos->getTable(); - auto& helmTable = *std::get>(table); + const auto& table = eos->getTable(); + const auto& helmTable = *std::get>(table); std::stringstream ss; ss << helmTable; EXPECT_EQ(ss.str(), "HELMTable Data:\n imax: 541, jmax: 201\n Temperature Range: [1000, 1e+13]\n Density Range: [1e-12, 1e+15]\n"); } TEST_F(eosTest, get_helm_EOS) { - - const int nel=3; - double xmass[nel], aion[nel], zion[nel]; + constexpr int nel=3; + double xMass[nel], aIon[nel], zIon[nel]; serif::eos::helmholtz::HELMEOSInput eos1; - xmass[0] = 0.75; aion[0] = 1.0; zion[0] = 1.0; - xmass[1] = 0.23; aion[1] = 4.0; zion[1] = 2.0; - xmass[2] = 0.02; aion[2] = 12.0; zion[2] = 6.0; + xMass[0] = 0.75; aIon[0] = 1.0; zIon[0] = 1.0; + xMass[1] = 0.23; aIon[1] = 4.0; zIon[1] = 2.0; + xMass[2] = 0.02; aIon[2] = 12.0; zIon[2] = 6.0; eos1.T = 1.0e8; eos1.rho = 1.0e6; - double asum = 0.0; - double zsum = 0.0; + double aSum = 0.0; + double zSum = 0.0; for (int i=0; i>(rm.getResource("eos:helm"));