| 102 | } |
| 103 | |
| 104 | void 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 | |
| 117 | void test_copy_constructor() { |
| 118 | proton::map<string, scalar> m = std::map<string, scalar>{{"a", 2}, {"b", 3}}; |