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

Function message_id_test

cpp/src/scalar_test.cpp:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void message_id_test() {
42 ASSERT_EQUAL(23, coerce<int64_t>(message_id(23)));
43 ASSERT_EQUAL(23u, get<uint64_t>(message_id(23)));
44 ASSERT(message_id("foo") != message_id(binary("foo")));
45 ASSERT_EQUAL(scalar("foo"), message_id("foo"));
46 ASSERT_EQUAL("foo", coerce<std::string>(message_id("foo")));
47 ASSERT(message_id("a") < message_id("z"));
48 uuid r = uuid::random();
49 ASSERT_EQUAL(r, get<uuid>(message_id(r)));
50}
51
52void annotation_key_test() {
53 ASSERT_EQUAL(23, coerce<int64_t>(annotation_key(23)));

Callers 1

mainFunction · 0.85

Calls 4

binaryClass · 0.70
message_idClass · 0.50
scalarClass · 0.50
randomFunction · 0.50

Tested by

no test coverage detected