Fixup of alternating records special case

This commit is contained in:
Joakim Hove
2020-01-06 13:38:10 +01:00
parent c2b4d30be5
commit 6f330a7482
9 changed files with 61 additions and 25 deletions

View File

@@ -1748,16 +1748,6 @@ BOOST_AUTO_TEST_CASE(ConstructFromJson_withAlternatingRecordswithItems) {
BOOST_CHECK_THROW( ParserKeyword kw( jsonObject ), std::invalid_argument);
}
BOOST_AUTO_TEST_CASE(ConstructFromJson_withAlternatingRecordsSizeWithoutBrackets) {
const std::string json_string = R"(
{"name" : "STOG", "sections" : ["PROPS"] , "size" : 6, "alternating_records" : [[
{"name" : "ref_oil_pressure", "value_type" : "DOUBLE"}], [
{"name" : "oil_phase_pressure" , "value_type" : "DOUBLE"},
{"name" : "surface_rension", "value_type" : "DOUBLE"}]]}
)";
Json::JsonObject jsonObject( json_string );
BOOST_CHECK_THROW( ParserKeyword kw( jsonObject ), std::invalid_argument);
}
BOOST_AUTO_TEST_CASE(GetAlternatingKeywordFromParser) {
Parser parser;