Skip to content
Snippets Groups Projects
Commit 9183143a authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

[jw7] resolve last test failures in debug mode ()

Merging branch 'jw7'  into 'r22'.

See merge request !1861
parents 8e76c25b 1e3c8880
No related branches found
No related tags found
1 merge request!1861resolve last test failures in debug mode
Pipeline #108687 canceled
......@@ -149,6 +149,8 @@ bool Scale::isScan() const
Scale Scale::clipped(double lower, double upper) const
{
if (lower > upper)
throw std::runtime_error("Scale::clipped called with invalid bounds (lower > upper)");
std::vector<Bin1D> out_bins;
const bool is_scan = isScan();
for (const Bin1D& b : m_bins)
......
......@@ -140,21 +140,25 @@ bool SimDataPair::containsUncertainties() const
Datafield SimDataPair::simulationResult() const
{
ASSERT(m_sim_data);
if (!m_sim_data)
throw std::runtime_error("SimDataPair::simulationResult() called before sim_data were set");
ASSERT(!m_sim_data->empty());
return *m_sim_data;
}
Datafield SimDataPair::experimentalData() const
{
ASSERT(m_exp_data);
if (!m_exp_data)
throw std::runtime_error("SimDataPair::experimentalData() called before exp_data were set");
ASSERT(!m_exp_data->empty());
return *m_exp_data;
}
Datafield SimDataPair::uncertainties() const
{
ASSERT(m_uncertainties);
if (!m_uncertainties)
throw std::runtime_error(
"SimDataPair::uncertainties() called before uncertainties were set");
ASSERT(!m_uncertainties->empty());
return *m_uncertainties;
}
......@@ -162,7 +166,8 @@ Datafield SimDataPair::uncertainties() const
//! Returns the user uncertainties cut to the ROI area.
Datafield SimDataPair::userWeights() const
{
ASSERT(m_user_weights);
if (!m_user_weights)
throw std::runtime_error("SimDataPair::userWeights() called before user_weights were set");
ASSERT(!m_user_weights->empty());
return *m_user_weights;
}
......
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