diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codec-json.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/codec-json.cpp b/tests/codec-json.cpp index 5b4700f..926f550 100644 --- a/tests/codec-json.cpp +++ b/tests/codec-json.cpp @@ -285,7 +285,7 @@ SAW_TEST("Three Dim Array write and read"){ } -SAW_TEST("Struct write"){ +SAW_TEST("Struct read and write"){ using namespace saw; data<schema::TestStruct, encode::Native> native; data<schema::TestStruct, encode::Json> json; @@ -302,13 +302,12 @@ SAW_TEST("Struct write"){ std::string enc_val = convert_to_string(json.get_buffer()); SAW_EXPECT(enc_val == str_v, std::string{"Struct not encoded correctly. Encoded: "} + enc_val + std::string{" Expected: "} + std::string{str_v}); -/* + native = {}; eov = json_codec.decode(json, native); SAW_EXPECT(eov.is_value(), "Decoding error"); SAW_EXPECT(native.get<"foo">().get() == 5, "Invalid value for foo"); SAW_EXPECT(native.get<"bar">() == "baz", "Invalid value for bar"); -*/ } SAW_TEST("Int8 read"){ |