add tests for CBOR

pull/2908/head
Niels Lohmann 2021-08-07 13:14:08 +02:00
parent b74474e3fd
commit 176e9bf0ab
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 4 additions and 1 deletions

View File

@ -791,7 +791,7 @@ class binary_reader
break;
}
default:
break;
return parse_cbor_internal(true, tag_handler);
}
get();
return get_cbor_binary(b) && sax->binary(b);

View File

@ -2572,6 +2572,9 @@ TEST_CASE("Tagged values")
// check that parsing succeeds and gets original value in ignore mode
auto j_tagged = json::from_cbor(v_tagged, true, true, json::cbor_tag_handler_t::ignore);
CHECK(j_tagged == j);
auto j_tagged_stored = json::from_cbor(v_tagged, true, true, json::cbor_tag_handler_t::store);
CHECK(j_tagged_stored == j);
}
}