mirror of
https://github.com/nlohmann/json.git
synced 2026-11-07 21:19:22 +00:00
Fix ci_test_clang_sanitizer: build the CBOR test string from bytes (#6037)
This commit is contained in:
1 parent
18138227dc
commit
7fc8312c64
1 file changed
+1
-1
@@ -351,7 +351,7 @@ TEST_CASE("parsing from a FILE*")
|
||||
{
|
||||
CAPTURE(size)
|
||||
std::vector<char> buffer(static_cast<std::size_t>(size));
|
||||
const file_ptr f = open_with(name, std::string(cbor.begin(), cbor.end()));
|
||||
const file_ptr f = open_with(name, std::string(reinterpret_cast<const char*>(cbor.data()), cbor.size()));
|
||||
REQUIRE(f != nullptr);
|
||||
REQUIRE(std::setvbuf(f.get(), buffer.data(), _IOFBF, buffer.size()) == 0);
|
||||
CHECK(json::from_cbor(f.get()) == value);
|
||||
|
||||
Reference in new issue
Block a user