MCPcopy Create free account
hub / github.com/apache/qpid-proton / encode_decode_test

Function encode_decode_test

cpp/src/scalar_test.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29// NOTE: proton::coerce<> and bad proton::get() are tested in value_test to avoid redundant test code.
30
31void encode_decode_test() {
32 value v;
33 scalar a("foo");
34 v = a; // Assignment to value does encode, get<> does decode.
35 ASSERT_EQUAL(v, a);
36 ASSERT_EQUAL(std::string("foo"), get<std::string>(v));
37 scalar a2 = get<scalar>(v);
38 ASSERT_EQUAL(std::string("foo"), get<std::string>(a2));
39}
40
41void message_id_test() {
42 ASSERT_EQUAL(23, coerce<int64_t>(message_id(23)));

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected