updates of ERst api, supports multiple occurrences of array names
This commit is contained in:
+15
-15
@@ -564,7 +564,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
rst.loadReportStepNumber(13);
|
||||
|
||||
{
|
||||
const auto& I = rst.getRst<int>("I", 13);
|
||||
const auto& I = rst.getRst<int>("I", 13, 0);
|
||||
const auto expect_I = std::vector<int>{ 35, 51, 13};
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(I.begin(), I.end(),
|
||||
expect_I.begin(),
|
||||
@@ -572,7 +572,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& L = rst.getRst<bool>("L", 13);
|
||||
const auto& L = rst.getRst<bool>("L", 13, 0);
|
||||
const auto expect_L = std::vector<bool> {
|
||||
true, true, true, false,
|
||||
};
|
||||
@@ -583,7 +583,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& S = rst.getRst<float>("S", 13);
|
||||
const auto& S = rst.getRst<float>("S", 13, 0);
|
||||
const auto expect_S = std::vector<float>{
|
||||
17.29e-02f, 1.4142f,
|
||||
};
|
||||
@@ -592,7 +592,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& D = rst.getRst<double>("D", 13);
|
||||
const auto& D = rst.getRst<double>("D", 13, 0);
|
||||
const auto expect_D = std::vector<double>{
|
||||
0.6931, 1.6180, 123.45e6,
|
||||
};
|
||||
@@ -601,7 +601,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& Z = rst.getRst<std::string>("Z", 13);
|
||||
const auto& Z = rst.getRst<std::string>("Z", 13, 0);
|
||||
const auto expect_Z = std::vector<std::string>{
|
||||
"G1", "FIELD", // ERst trims trailing blanks
|
||||
};
|
||||
@@ -663,7 +663,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
rst.loadReportStepNumber(5);
|
||||
|
||||
{
|
||||
const auto& I = rst.getRst<int>("I", 5);
|
||||
const auto& I = rst.getRst<int>("I", 5, 0);
|
||||
const auto expect_I = std::vector<int>{ 1, 2, 3, 4 };
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(I.begin(), I.end(),
|
||||
expect_I.begin(),
|
||||
@@ -671,7 +671,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& L = rst.getRst<bool>("L", 5);
|
||||
const auto& L = rst.getRst<bool>("L", 5, 0);
|
||||
const auto expect_L = std::vector<bool> {
|
||||
false, false, false, true,
|
||||
};
|
||||
@@ -682,7 +682,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& S = rst.getRst<float>("S", 5);
|
||||
const auto& S = rst.getRst<float>("S", 5, 0);
|
||||
const auto expect_S = std::vector<float>{
|
||||
1.23e-04f, 1.234e5f, -5.4321e-9f,
|
||||
};
|
||||
@@ -691,7 +691,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& D = rst.getRst<double>("D", 5);
|
||||
const auto& D = rst.getRst<double>("D", 5, 0);
|
||||
const auto expect_D = std::vector<double>{
|
||||
0.6931, 1.6180,
|
||||
};
|
||||
@@ -700,7 +700,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& Z = rst.getRst<std::string>("Z", 5);
|
||||
const auto& Z = rst.getRst<std::string>("Z", 5, 0);
|
||||
const auto expect_Z = std::vector<std::string>{
|
||||
"HELLO", ",", "WORLD", // ERst trims trailing blanks
|
||||
};
|
||||
@@ -762,7 +762,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
rst.loadReportStepNumber(13);
|
||||
|
||||
{
|
||||
const auto& I = rst.getRst<int>("I", 13);
|
||||
const auto& I = rst.getRst<int>("I", 13, 0);
|
||||
const auto expect_I = std::vector<int>{ 35, 51, 13};
|
||||
BOOST_CHECK_EQUAL_COLLECTIONS(I.begin(), I.end(),
|
||||
expect_I.begin(),
|
||||
@@ -770,7 +770,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& L = rst.getRst<bool>("L", 13);
|
||||
const auto& L = rst.getRst<bool>("L", 13, 0);
|
||||
const auto expect_L = std::vector<bool> {
|
||||
true, true, true, false,
|
||||
};
|
||||
@@ -781,7 +781,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& S = rst.getRst<float>("S", 13);
|
||||
const auto& S = rst.getRst<float>("S", 13, 0);
|
||||
const auto expect_S = std::vector<float>{
|
||||
17.29e-02f, 1.4142f,
|
||||
};
|
||||
@@ -790,7 +790,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& D = rst.getRst<double>("D", 13);
|
||||
const auto& D = rst.getRst<double>("D", 13, 0);
|
||||
const auto expect_D = std::vector<double>{
|
||||
0.6931, 1.6180, 123.45e6,
|
||||
};
|
||||
@@ -799,7 +799,7 @@ BOOST_AUTO_TEST_CASE(Unformatted_Unified)
|
||||
}
|
||||
|
||||
{
|
||||
const auto& Z = rst.getRst<std::string>("Z", 13);
|
||||
const auto& Z = rst.getRst<std::string>("Z", 13, 0);
|
||||
const auto expect_Z = std::vector<std::string>{
|
||||
"G1", "FIELD", // ERst trims trailing blanks
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user