Commit bba43305 authored by Dominik Charousset's avatar Dominik Charousset

Fix binary_deserializer::begin_object

parent 90e64f0a
...@@ -72,10 +72,10 @@ binary_deserializer::binary_deserializer(execution_unit* ctx, const buffer& buf) ...@@ -72,10 +72,10 @@ binary_deserializer::binary_deserializer(execution_unit* ctx, const buffer& buf)
} }
error binary_deserializer::begin_object(uint16_t& nr, std::string& name) { error binary_deserializer::begin_object(uint16_t& nr, std::string& name) {
if (nr != 0)
return apply(nr);
if (auto err = apply(nr)) if (auto err = apply(nr))
return err; return err;
if (nr != 0)
return none;
return apply(name); return apply(name);
} }
......
...@@ -197,7 +197,8 @@ struct fixture { ...@@ -197,7 +197,8 @@ struct fixture {
message result; message result;
auto tmp = make_message(x); auto tmp = make_message(x);
deserialize(serialize(tmp), result); deserialize(serialize(tmp), result);
CAF_REQUIRE(result.match_elements<T>()); if (!result.match_elements<T>())
CAF_FAIL("expected: " << x << ", got: " << result);
return result.get_as<T>(0); return result.get_as<T>(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment