mirror of
https://github.com/nlohmann/json.git
synced 2025-08-06 07:02:42 +03:00
✅ add tests for CBOR
This commit is contained in:
@@ -791,7 +791,7 @@ class binary_reader
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
return parse_cbor_internal(true, tag_handler);
|
||||||
}
|
}
|
||||||
get();
|
get();
|
||||||
return get_cbor_binary(b) && sax->binary(b);
|
return get_cbor_binary(b) && sax->binary(b);
|
||||||
|
@@ -2572,6 +2572,9 @@ TEST_CASE("Tagged values")
|
|||||||
// check that parsing succeeds and gets original value in ignore mode
|
// 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);
|
auto j_tagged = json::from_cbor(v_tagged, true, true, json::cbor_tag_handler_t::ignore);
|
||||||
CHECK(j_tagged == j);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user