Skip to content

Commit

Permalink
Re #11663 Update baseline modelling unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelalvarezbanos committed Apr 30, 2015
1 parent 34f0c30 commit 29b419b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ namespace CustomInterfaces

MatrixWorkspace_const_sptr correctedData() const { return m_correctedData; }

ITableWorkspace_sptr parameterTable() const { return m_parameterTable; }

const std::vector<Section>& sections() const { return m_sections; }

// -- End of IALCBaselineModellingModel interface ----------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,24 @@ class ALCBaselineModellingModelTest : public CxxTest::TestSuite
TS_ASSERT_DELTA(corrected->readY(0)[8], 97, 1E-8);
}

ITableWorkspace_sptr parameters = m_model->parameterTable();
TS_ASSERT(parameters);

if (parameters)
{
// Check table dimensions
TS_ASSERT_EQUALS(parameters->rowCount(), 2);
TS_ASSERT_EQUALS(parameters->columnCount(), 3);

// Check table entries
TS_ASSERT_EQUALS(parameters->String(0,0), "A0");
TS_ASSERT_EQUALS(parameters->Double(0,1), 3);
TS_ASSERT_DELTA (parameters->Double(0,2), 0.447214,1E-6);
TS_ASSERT_EQUALS(parameters->String(1,0), "Cost function value");
TS_ASSERT_DELTA (parameters->Double(1,1), 1.250000,1E-6);
TS_ASSERT_EQUALS(parameters->Double(1,2), 0);
}

TS_ASSERT_EQUALS(m_model->sections(), sections);
}

Expand Down

0 comments on commit 29b419b

Please sign in to comment.