Skip to content
Snippets Groups Projects
Commit 3bb0a33d authored by wenqing's avatar wenqing Committed by Dmitri Naumov
Browse files

[Tests] Assigned a namespace to createTestMaterial

parent 91da563f
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,8 @@
#include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h"
#include "ParameterLib/Parameter.h"
namespace Tests
{
std::unique_ptr<MPL::Medium> createTestMaterial(std::string const& xml)
{
auto const ptree = readXml(xml.c_str());
......@@ -33,8 +35,6 @@ std::unique_ptr<MPL::Medium> createTestMaterial(std::string const& xml)
return MPL::createMedium(config, parameters, nullptr, curves);
}
namespace Tests
{
std::unique_ptr<MaterialPropertyLib::Property> createTestProperty(
const char xml[],
std::function<std::unique_ptr<MaterialPropertyLib::Property>(
......
......@@ -30,10 +30,10 @@ namespace MaterialPropertyLib
class Property;
}
std::unique_ptr<MPL::Medium> createTestMaterial(std::string const& xml);
namespace Tests
{
std::unique_ptr<MPL::Medium> createTestMaterial(std::string const& xml);
std::unique_ptr<MaterialPropertyLib::Property> createTestProperty(
const char xml[],
std::function<std::unique_ptr<MaterialPropertyLib::Property>(
......
......@@ -56,7 +56,7 @@ TEST(MaterialPropertyLib, IdealGasLawOfPurePhase)
m << "<properties></properties>\n";
m << "</medium>\n";
auto const& medium = createTestMaterial(m.str());
auto const& medium = Tests::createTestMaterial(m.str());
auto const& gas_phase = medium->phase("Gas");
MaterialPropertyLib::VariableArray variable_array;
......
......@@ -243,7 +243,7 @@ TEST(Material, parseMaterials)
medium.property[MPL::permeability] = "1.0e-12";
// create an actual MaterialProperty-Medium out of the specifier object
auto const m = createTestMaterial(makeMedium(medium));
auto const m = Tests::createTestMaterial(makeMedium(medium));
// those two vectors will actually be compared
std::vector<std::string> expected;
......
......@@ -90,7 +90,7 @@ TEST(MaterialPropertyLib, RelPermBrooksCorey)
std::stringstream m;
m << m_beg.str() << m_sat.str() << m_end.str();
auto const& medium = createTestMaterial(m.str());
auto const& medium = Tests::createTestMaterial(m.str());
MaterialPropertyLib::VariableArray variable_array;
ParameterLib::SpatialPosition const pos;
double const time = std::numeric_limits<double>::quiet_NaN();
......
......@@ -77,7 +77,7 @@ TEST(MaterialPropertyLib, RelPermLiakopoulos)
std::stringstream m;
m << m_beg.str() << m_sat.str() << m_end.str();
auto const& medium = createTestMaterial(m.str());
auto const& medium = Tests::createTestMaterial(m.str());
MaterialPropertyLib::VariableArray variable_array;
ParameterLib::SpatialPosition const pos;
double const time = std::numeric_limits<double>::quiet_NaN();
......
......@@ -43,7 +43,7 @@ TEST(MaterialPropertyLib, SaturationBrooksCorey)
m << "</properties>\n";
m << "</medium>\n";
auto const& medium = createTestMaterial(m.str());
auto const& medium = Tests::createTestMaterial(m.str());
MaterialPropertyLib::VariableArray variable_array;
ParameterLib::SpatialPosition const pos;
......
......@@ -30,7 +30,7 @@ TEST(MaterialPropertyLib, SaturationLiakopoulos)
m << "</properties>\n";
m << "</medium>\n";
auto const& medium = createTestMaterial(m.str());
auto const& medium = Tests::createTestMaterial(m.str());
MaterialPropertyLib::VariableArray variable_array;
ParameterLib::SpatialPosition const pos;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment