Use value::status to keep track of data status in DeckItem
With this commit the DeckItem::push_backDummyDefault() function will push back a default value T( ). This will give a change in behaviour in downstream code which has used getData<T> to get DeckItem data unchecked.
This commit is contained in:
@@ -1247,7 +1247,7 @@ BOOST_AUTO_TEST_CASE(Parse_RawRecordTooFewItems) {
|
||||
BOOST_CHECK_NO_THROW(parserRecord.parse(parseContext, errors, rawRecord, unit_system, unit_system, "KEWYORD", "filename"));
|
||||
auto record = parserRecord.parse(parseContext, errors , rawRecord, unit_system, unit_system, "KEYWORD", "filename");
|
||||
BOOST_CHECK_NO_THROW(record.getItem(2));
|
||||
BOOST_CHECK_THROW(record.getItem(2).get< int >(0), std::out_of_range);
|
||||
BOOST_CHECK_THROW(record.getItem(2).get< int >(0), std::invalid_argument);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user