|
@ -107,9 +107,12 @@ struct cbor_test : public test_scaffold { |
|
|
gp_config::assertion(serialized == serialized_manual, "data did not serialize correctly"); |
|
|
gp_config::assertion(serialized == serialized_manual, "data did not serialize correctly"); |
|
|
} |
|
|
} |
|
|
{ |
|
|
{ |
|
|
gp::array<char, 5> str{'h', 'e', 'l', 'l', 'o'}; |
|
|
|
|
|
|
|
|
gp::vector<std::byte> str{alloc}; |
|
|
|
|
|
str.reserve(5); |
|
|
|
|
|
for(auto a : {'h', 'e', 'l', 'l', 'o'}) |
|
|
|
|
|
str.push_back((std::byte)a); |
|
|
gp::cbor_value data{alloc}; |
|
|
gp::cbor_value data{alloc}; |
|
|
data = str.as_buffer().cast<std::byte>(); |
|
|
|
|
|
|
|
|
data = str; |
|
|
|
|
|
|
|
|
gp::array<std::byte, 6> serialized; |
|
|
gp::array<std::byte, 6> serialized; |
|
|
gp::array<std::byte, 6> serialized_manual{ |
|
|
gp::array<std::byte, 6> serialized_manual{ |
|
|