2017-10-24 07:19:36 -05:00
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
|
|
|
#include "RiuSummaryVectorDescriptionMap.h"
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
TEST(RiuSummaryVectorDescriptionMap, TestInit)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::string s("SRSFC");
|
2018-08-30 04:17:37 -05:00
|
|
|
auto test = RiuSummaryVectorDescriptionMap::instance()->vectorInfo(s);
|
|
|
|
|
|
|
|
EXPECT_TRUE(test.category == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT);
|
|
|
|
EXPECT_TRUE(test.longName == "Reach brine concentration");
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
std::string s("SRSFC");
|
|
|
|
auto test = RiuSummaryVectorDescriptionMap::instance()->vectorLongName(s);
|
2017-10-24 07:19:36 -05:00
|
|
|
|
|
|
|
EXPECT_TRUE(test == "Reach brine concentration");
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
std::string s("does not exist");
|
2018-08-30 04:17:37 -05:00
|
|
|
auto test = RiuSummaryVectorDescriptionMap::instance()->vectorInfo(s);
|
|
|
|
|
|
|
|
EXPECT_TRUE(test.category == RifEclipseSummaryAddress::SUMMARY_INVALID);
|
|
|
|
EXPECT_TRUE(test.longName == "");
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
std::string s("does not exist");
|
|
|
|
auto test = RiuSummaryVectorDescriptionMap::instance()->vectorLongName(s);
|
|
|
|
|
|
|
|
EXPECT_TRUE(test == "");
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
std::string s("does not exist");
|
|
|
|
auto test = RiuSummaryVectorDescriptionMap::instance()->vectorLongName(s, true);
|
2017-10-24 07:19:36 -05:00
|
|
|
|
2017-10-25 07:32:19 -05:00
|
|
|
EXPECT_TRUE(test == s);
|
2017-10-24 07:19:36 -05:00
|
|
|
}
|
|
|
|
}
|
2018-08-30 06:30:54 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
TEST(RiuSummaryVectorDescriptionMap, TestCustomNaming)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::string s("SRSFCABC");
|
|
|
|
auto test = RiuSummaryVectorDescriptionMap::instance()->vectorInfo(s);
|
|
|
|
|
|
|
|
EXPECT_TRUE(test.category == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT);
|
|
|
|
EXPECT_TRUE(test.longName == "Reach brine concentration");
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
std::string s("BHD__ABC");
|
|
|
|
auto test = RiuSummaryVectorDescriptionMap::instance()->vectorLongName(s);
|
|
|
|
|
|
|
|
EXPECT_TRUE(test == "Hydraulic head");
|
|
|
|
}
|
|
|
|
}
|