Commit a73f335b authored by Mathieu Tillet's avatar Mathieu Tillet
Browse files

Add more tests to validate IPF validity range

parent 62e08998
......@@ -259,11 +259,20 @@ public:
const auto &paramMap = output->constInstrumentParameters();
const auto &detectorInfo = output->detectorInfo();
const auto &det = detectorInfo.detector(detectorInfo.indexOf(1008));
Parameter_sptr param = paramMap.get(&det, "date-most-recent");
Parameter_sptr param;
param = paramMap.get(&det, "date-most-recent");
TS_ASSERT_EQUALS(param->value<double>(), 1);
param = paramMap.get(&det, "date-within-bound");
TS_ASSERT_EQUALS(param->value<double>(), 1);
param = paramMap.get(&det, "date-no-bounds");
param = paramMap.get(&det, "date-no-bounds-vs-end");
TS_ASSERT_EQUALS(param->value<double>(), 1);
param = paramMap.get(&det, "date-same-start-no-end");
TS_ASSERT_EQUALS(param->value<double>(), 1);
param = paramMap.get(&det, "date-no-bounds-vs-start");
TS_ASSERT_EQUALS(param->value<double>(), 1);
param = paramMap.get(&det, "date-same-start");
TS_ASSERT_EQUALS(param->value<double>(), 1);
param = paramMap.get(&det, "date-no-bounds-vs-invalid");
TS_ASSERT_EQUALS(param->value<double>(), 1);
}
......
......@@ -10,9 +10,25 @@
<value val="0" valid-from="1875-01-01T00:00:00" valid-to="1890-01-01T00:00:00"/>
<value val="1" valid-from="1850-01-01T00:00:00" valid-to="1950-01-01T00:00:00"/>
</parameter>
<parameter name="date-no-bounds">
<parameter name="date-no-bounds-vs-end">
<value val="0"/>
<value val="1" valid-to="2000-01-01T00:00:00"/>
</parameter>
<parameter name="date-same-start-no-end">
<value val="0" valid-from="1875-01-01T00:00:00"/>
<value val="1" valid-from="1875-01-01T00:00:00" valid-to="2000-01-01T00:00:00"/>
</parameter>
<parameter name="date-no-bounds-vs-start">
<value val="0"/>
<value val="1" valid-from="1850-01-01T00:00:00"/>
</parameter>
<parameter name="date-same-start">
<value val="0" valid-from="1875-01-01T00:00:00" valid-to="2050-01-01T00:00:00"/>
<value val="1" valid-from="1875-01-01T00:00:00" valid-to="2000-01-01T00:00:00"/>
</parameter>
<parameter name="date-no-bounds-vs-invalid">
<value val="0" valid-from="1950-01-01T00:00:00" valid-to="2000-01-01T00:00:00"/>
<value val="1"/>
</parameter>
</component-link>
</parameter-file>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment