Fix issue #2 on GitHub
This commit is contained in:
17
test/issue2.cpp
Normal file
17
test/issue2.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "nbt.hpp"
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
using namespace nbt;
|
||||
|
||||
test {
|
||||
std::stringstream input(R"({ "voidByteArray": [B; ] })");
|
||||
tags::compound_tag root;
|
||||
input >> contexts::mojangson >> root;
|
||||
std::string key("voidByteArray");
|
||||
auto & bytes = root.get<std::vector<std::int8_t>>(key);
|
||||
assert_true(bytes.empty());
|
||||
std::cout << contexts::mojangson << root;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
test_names = [
|
||||
'nbt'
|
||||
'nbt',
|
||||
'issue2'
|
||||
]
|
||||
|
||||
test_files = []
|
||||
|
||||
Reference in New Issue
Block a user