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

Function test_value

cpp/src/map_test.cpp:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void test_value() {
105 proton::map<string, scalar> m;
106 value v;
107 v = "foo";
108 ASSERT_THROWS(conversion_error, m.value(v));
109 std::map<int, float> bad;
110 // Wrong type of map.
111 // Note we can't detect an empty map of bad type because AMQP maps allow
112 // mixed types, so there must be data to object to.
113 bad[1]=1.0;
114 ASSERT_THROWS(conversion_error, m.value(bad));
115}
116
117void test_copy_constructor() {
118 proton::map<string, scalar> m = std::map<string, scalar>{{"a", 2}, {"b", 3}};

Callers 1

mainFunction · 0.85

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected