Skip to content

Commit 8710a46

Browse files
committed
Add unit test for RBParameters::get_extra_step_value()
1 parent 2e28835 commit 8710a46

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/utils/rb_parameters_test.C

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ public:
105105
// (must have same number of steps)
106106
RBParameters params2;
107107
for (int i=0; i<3; ++i)
108-
params2.push_back_value("b", Real(i+3));
108+
{
109+
params2.push_back_value("b", Real(i+3));
110+
params2.push_back_extra_value("c", Real(i*i));
111+
}
109112

110113
// Append second onto first
111114
params1 += params2;
@@ -115,8 +118,12 @@ public:
115118

116119
// Check that the desired appending happened
117120
CPPUNIT_ASSERT(params1.has_value("b"));
121+
CPPUNIT_ASSERT(params1.has_extra_value("c"));
118122
for (int i=0; i<3; ++i)
119-
CPPUNIT_ASSERT_EQUAL(params1.get_step_value("b", i), Real(i+3));
123+
{
124+
CPPUNIT_ASSERT_EQUAL(params1.get_step_value("b", i), static_cast<Real>(i+3));
125+
CPPUNIT_ASSERT_EQUAL(params1.get_extra_step_value("c", i), static_cast<Real>(i*i));
126+
}
120127
}
121128

122129
void testNSteps()

0 commit comments

Comments
 (0)