Merge lp:~michihenning/unity-scopes-api/remove-to_string into lp:unity-scopes-api
- remove-to_string
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Paweł Stołowski |
Approved revision: | 150 |
Merged at revision: | 153 |
Proposed branch: | lp:~michihenning/unity-scopes-api/remove-to_string |
Merge into: | lp:unity-scopes-api |
Diff against target: |
1113 lines (+211/-233) 15 files modified
scoperegistry/scoperegistry.cpp (+4/-8) scoperunner/scoperunner.cpp (+0/-9) test/gtest/scopes/Variant/Variant_test.cpp (+9/-9) test/gtest/scopes/internal/ConfigBase/ConfigBase_test.cpp (+10/-10) test/gtest/scopes/internal/DynamicLoader/DynamicLoader_test.cpp (+4/-4) test/gtest/scopes/internal/MiddlewareFactory/MiddlewareFactory_test.cpp (+1/-1) test/gtest/scopes/internal/Reaper/Reaper_test.cpp (+6/-6) test/gtest/scopes/internal/RegistryConfig/RegistryConfig_test.cpp (+5/-5) test/gtest/scopes/internal/RuntimeConfig/RuntimeConfig_test.cpp (+12/-12) test/gtest/scopes/internal/RuntimeImpl/RuntimeImpl_test.cpp (+8/-8) test/gtest/scopes/internal/ScopeLoader/ScopeLoader_test.cpp (+35/-35) test/gtest/scopes/internal/ScopeMetadataImpl/ScopeMetadataImpl_test.cpp (+28/-28) test/gtest/scopes/internal/ThreadPool/ThreadPool_test.cpp (+2/-2) test/gtest/scopes/internal/zmq_middleware/ObjectAdapter/ObjectAdapter_test.cpp (+50/-50) test/gtest/scopes/internal/zmq_middleware/RegistryI/RegistryI_test.cpp (+37/-46) |
To merge this branch: | bzr merge lp:~michihenning/unity-scopes-api/remove-to_string |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paweł Stołowski (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email:
|
Commit message
Replaced calls to to_string() with calls to what() for all
unity exceptions. The to_string() calls were a hangover
from the time when what() on unity::Exception only printed
the exception name, but not the full string.
Description of the change
Replaced calls to to_string() with calls to what() for all
unity exceptions. The to_string() calls were a hangover
from the time when what() on unity::Exception only printed
the exception name, but not the full string.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:150
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Paweł Stołowski (stolowski) wrote : | # |
Looks good! +1
Preview Diff
1 | === modified file 'scoperegistry/scoperegistry.cpp' | |||
2 | --- scoperegistry/scoperegistry.cpp 2014-01-17 08:06:47 +0000 | |||
3 | +++ scoperegistry/scoperegistry.cpp 2014-01-24 03:21:30 +0000 | |||
4 | @@ -97,7 +97,7 @@ | |||
5 | 97 | } | 97 | } |
6 | 98 | catch (FileException const& e) | 98 | catch (FileException const& e) |
7 | 99 | { | 99 | { |
9 | 100 | error("scope group config file ignored:\n" + e.to_string()); | 100 | error(string("scope group config file ignored:\n") + e.what()); |
10 | 101 | continue; | 101 | continue; |
11 | 102 | } | 102 | } |
12 | 103 | 103 | ||
13 | @@ -108,7 +108,7 @@ | |||
14 | 108 | } | 108 | } |
15 | 109 | catch (LogicException const& e) | 109 | catch (LogicException const& e) |
16 | 110 | { | 110 | { |
18 | 111 | error("group file \"" + file + ": file ignored:\n" + e.to_string()); | 111 | error("group file \"" + file + ": file ignored:\n" + e.what()); |
19 | 112 | continue; | 112 | continue; |
20 | 113 | } | 113 | } |
21 | 114 | 114 | ||
22 | @@ -213,7 +213,7 @@ | |||
23 | 213 | } | 213 | } |
24 | 214 | catch (unity::Exception const& e) | 214 | catch (unity::Exception const& e) |
25 | 215 | { | 215 | { |
27 | 216 | error("ignoring scope \"" + pair.first + "\": cannot create metadata: " + e.to_string()); | 216 | error("ignoring scope \"" + pair.first + "\": cannot create metadata: " + e.what()); |
28 | 217 | } | 217 | } |
29 | 218 | } | 218 | } |
30 | 219 | } | 219 | } |
31 | @@ -323,7 +323,7 @@ | |||
32 | 323 | } | 323 | } |
33 | 324 | catch (unity::Exception const& e) | 324 | catch (unity::Exception const& e) |
34 | 325 | { | 325 | { |
36 | 326 | error("ignoring scope \"" + scope_name + "\": configuration error:\n" + e.to_string()); | 326 | error("ignoring scope \"" + scope_name + "\": configuration error:\n" + e.what()); |
37 | 327 | } | 327 | } |
38 | 328 | } | 328 | } |
39 | 329 | 329 | ||
40 | @@ -379,10 +379,6 @@ | |||
41 | 379 | middleware->wait_for_shutdown(); | 379 | middleware->wait_for_shutdown(); |
42 | 380 | exit_status = 0; | 380 | exit_status = 0; |
43 | 381 | } | 381 | } |
44 | 382 | catch (unity::Exception const& e) | ||
45 | 383 | { | ||
46 | 384 | error(e.to_string()); | ||
47 | 385 | } | ||
48 | 386 | catch (std::exception const& e) | 382 | catch (std::exception const& e) |
49 | 387 | { | 383 | { |
50 | 388 | error(e.what()); | 384 | error(e.what()); |
51 | 389 | 385 | ||
52 | === modified file 'scoperunner/scoperunner.cpp' | |||
53 | --- scoperunner/scoperunner.cpp 2014-01-15 11:32:33 +0000 | |||
54 | +++ scoperunner/scoperunner.cpp 2014-01-24 03:21:30 +0000 | |||
55 | @@ -169,11 +169,6 @@ | |||
56 | 169 | it->second.t.join(); | 169 | it->second.t.join(); |
57 | 170 | it->second.f.get(); // This will throw if the thread terminated due to an exception | 170 | it->second.f.get(); // This will throw if the thread terminated due to an exception |
58 | 171 | } | 171 | } |
59 | 172 | catch (unity::Exception const& e) | ||
60 | 173 | { | ||
61 | 174 | error(e.to_string()); | ||
62 | 175 | ++num_errors; | ||
63 | 176 | } | ||
64 | 177 | catch (std::exception const& e) | 172 | catch (std::exception const& e) |
65 | 178 | { | 173 | { |
66 | 179 | error(e.what()); | 174 | error(e.what()); |
67 | @@ -216,10 +211,6 @@ | |||
68 | 216 | 211 | ||
69 | 217 | exit_status = run_scopes(runtime_config, config_files); | 212 | exit_status = run_scopes(runtime_config, config_files); |
70 | 218 | } | 213 | } |
71 | 219 | catch (unity::Exception const& e) | ||
72 | 220 | { | ||
73 | 221 | error(e.to_string()); | ||
74 | 222 | } | ||
75 | 223 | catch (std::exception const& e) | 214 | catch (std::exception const& e) |
76 | 224 | { | 215 | { |
77 | 225 | error(e.what()); | 216 | error(e.what()); |
78 | 226 | 217 | ||
79 | === modified file 'test/gtest/scopes/Variant/Variant_test.cpp' | |||
80 | --- test/gtest/scopes/Variant/Variant_test.cpp 2014-01-07 12:22:29 +0000 | |||
81 | +++ test/gtest/scopes/Variant/Variant_test.cpp 2014-01-24 03:21:30 +0000 | |||
82 | @@ -191,9 +191,9 @@ | |||
83 | 191 | } | 191 | } |
84 | 192 | catch (LogicException const& e) | 192 | catch (LogicException const& e) |
85 | 193 | { | 193 | { |
89 | 194 | EXPECT_EQ("unity::LogicException: Variant does not contain a bool value:\n" | 194 | EXPECT_STREQ("unity::LogicException: Variant does not contain a bool value:\n" |
90 | 195 | " boost::bad_get: failed value get using boost::get", | 195 | " boost::bad_get: failed value get using boost::get", |
91 | 196 | e.to_string()); | 196 | e.what()); |
92 | 197 | } | 197 | } |
93 | 198 | 198 | ||
94 | 199 | try | 199 | try |
95 | @@ -204,9 +204,9 @@ | |||
96 | 204 | } | 204 | } |
97 | 205 | catch (LogicException const& e) | 205 | catch (LogicException const& e) |
98 | 206 | { | 206 | { |
102 | 207 | EXPECT_EQ("unity::LogicException: Variant does not contain a string value:\n" | 207 | EXPECT_STREQ("unity::LogicException: Variant does not contain a string value:\n" |
103 | 208 | " boost::bad_get: failed value get using boost::get", | 208 | " boost::bad_get: failed value get using boost::get", |
104 | 209 | e.to_string()); | 209 | e.what()); |
105 | 210 | } | 210 | } |
106 | 211 | 211 | ||
107 | 212 | try | 212 | try |
108 | @@ -217,9 +217,9 @@ | |||
109 | 217 | } | 217 | } |
110 | 218 | catch (LogicException const& e) | 218 | catch (LogicException const& e) |
111 | 219 | { | 219 | { |
115 | 220 | EXPECT_EQ("unity::LogicException: Variant does not contain an int value:\n" | 220 | EXPECT_STREQ("unity::LogicException: Variant does not contain an int value:\n" |
116 | 221 | " boost::bad_get: failed value get using boost::get", | 221 | " boost::bad_get: failed value get using boost::get", |
117 | 222 | e.to_string()); | 222 | e.what()); |
118 | 223 | } | 223 | } |
119 | 224 | 224 | ||
120 | 225 | } | 225 | } |
121 | 226 | 226 | ||
122 | === modified file 'test/gtest/scopes/internal/ConfigBase/ConfigBase_test.cpp' | |||
123 | --- test/gtest/scopes/internal/ConfigBase/ConfigBase_test.cpp 2014-01-09 09:47:56 +0000 | |||
124 | +++ test/gtest/scopes/internal/ConfigBase/ConfigBase_test.cpp 2014-01-24 03:21:30 +0000 | |||
125 | @@ -65,7 +65,7 @@ | |||
126 | 65 | } | 65 | } |
127 | 66 | catch (ConfigException const& e) | 66 | catch (ConfigException const& e) |
128 | 67 | { | 67 | { |
130 | 68 | EXPECT_EQ("unity::scopes::ConfigException: \"Test.ini\": Illegal empty value for Empty", e.to_string()); | 68 | EXPECT_STREQ("unity::scopes::ConfigException: \"Test.ini\": Illegal empty value for Empty", e.what()); |
131 | 69 | } | 69 | } |
132 | 70 | } | 70 | } |
133 | 71 | 71 | ||
134 | @@ -81,9 +81,9 @@ | |||
135 | 81 | } | 81 | } |
136 | 82 | catch (ConfigException const& e) | 82 | catch (ConfigException const& e) |
137 | 83 | { | 83 | { |
141 | 84 | EXPECT_EQ("unity::scopes::ConfigException: \"Test.ini\": Illegal value for Zmq.BadMiddleware: \"foo\": " | 84 | EXPECT_STREQ("unity::scopes::ConfigException: \"Test.ini\": Illegal value for Zmq.BadMiddleware: \"foo\": " |
142 | 85 | "legal values are \"Zmq\" and \"REST\"", | 85 | "legal values are \"Zmq\" and \"REST\"", |
143 | 86 | e.to_string()); | 86 | e.what()); |
144 | 87 | } | 87 | } |
145 | 88 | try | 88 | try |
146 | 89 | { | 89 | { |
147 | @@ -92,9 +92,9 @@ | |||
148 | 92 | } | 92 | } |
149 | 93 | catch (ConfigException const& e) | 93 | catch (ConfigException const& e) |
150 | 94 | { | 94 | { |
154 | 95 | EXPECT_EQ("unity::scopes::ConfigException: \"Test.ini\": Illegal value for REST.BadMiddleware: \"bar\": " | 95 | EXPECT_STREQ("unity::scopes::ConfigException: \"Test.ini\": Illegal value for REST.BadMiddleware: \"bar\": " |
155 | 96 | "legal values are \"Zmq\" and \"REST\"", | 96 | "legal values are \"Zmq\" and \"REST\"", |
156 | 97 | e.to_string()); | 97 | e.what()); |
157 | 98 | } | 98 | } |
158 | 99 | } | 99 | } |
159 | 100 | 100 | ||
160 | @@ -109,7 +109,7 @@ | |||
161 | 109 | } | 109 | } |
162 | 110 | catch (ConfigException const& e) | 110 | catch (ConfigException const& e) |
163 | 111 | { | 111 | { |
165 | 112 | EXPECT_EQ("unity::scopes::ConfigException: \"Test.ini\": error", e.to_string()); | 112 | EXPECT_STREQ("unity::scopes::ConfigException: \"Test.ini\": error", e.what()); |
166 | 113 | } | 113 | } |
167 | 114 | } | 114 | } |
168 | 115 | 115 | ||
169 | @@ -121,7 +121,7 @@ | |||
170 | 121 | } | 121 | } |
171 | 122 | catch (FileException const& e) | 122 | catch (FileException const& e) |
172 | 123 | { | 123 | { |
175 | 124 | EXPECT_EQ("unity::FileException: Could not load ini file no_such_file: No such file or directory (errno = 4)", | 124 | EXPECT_STREQ("unity::FileException: Could not load ini file no_such_file: No such file or directory (errno = 4)", |
176 | 125 | e.to_string()); | 125 | e.what()); |
177 | 126 | } | 126 | } |
178 | 127 | } | 127 | } |
179 | 128 | 128 | ||
180 | === modified file 'test/gtest/scopes/internal/DynamicLoader/DynamicLoader_test.cpp' | |||
181 | --- test/gtest/scopes/internal/DynamicLoader/DynamicLoader_test.cpp 2014-01-07 12:22:29 +0000 | |||
182 | +++ test/gtest/scopes/internal/DynamicLoader/DynamicLoader_test.cpp 2014-01-24 03:21:30 +0000 | |||
183 | @@ -74,7 +74,7 @@ | |||
184 | 74 | catch (unity::ResourceException const& e) | 74 | catch (unity::ResourceException const& e) |
185 | 75 | { | 75 | { |
186 | 76 | boost::regex r("unity::ResourceException: .*/libbadtestlib.so: undefined symbol: foo"); | 76 | boost::regex r("unity::ResourceException: .*/libbadtestlib.so: undefined symbol: foo"); |
188 | 77 | EXPECT_TRUE(boost::regex_match(e.to_string(), r)); | 77 | EXPECT_TRUE(boost::regex_match(e.what(), r)); |
189 | 78 | } | 78 | } |
190 | 79 | } | 79 | } |
191 | 80 | 80 | ||
192 | @@ -87,8 +87,8 @@ | |||
193 | 87 | } | 87 | } |
194 | 88 | catch (unity::ResourceException const& e) | 88 | catch (unity::ResourceException const& e) |
195 | 89 | { | 89 | { |
198 | 90 | EXPECT_EQ("unity::ResourceException: no_such_lib: cannot open shared object file: No such file or directory", | 90 | EXPECT_STREQ("unity::ResourceException: no_such_lib: cannot open shared object file: No such file or directory", |
199 | 91 | e.to_string()); | 91 | e.what()); |
200 | 92 | } | 92 | } |
201 | 93 | } | 93 | } |
202 | 94 | 94 | ||
203 | @@ -101,7 +101,7 @@ | |||
204 | 101 | catch (unity::ResourceException const& e) | 101 | catch (unity::ResourceException const& e) |
205 | 102 | { | 102 | { |
206 | 103 | boost::regex r("unity::ResourceException: .*/libtestlib.so: undefined symbol: no_such_symbol"); | 103 | boost::regex r("unity::ResourceException: .*/libtestlib.so: undefined symbol: no_such_symbol"); |
208 | 104 | EXPECT_TRUE(boost::regex_match(e.to_string(), r)); | 104 | EXPECT_TRUE(boost::regex_match(e.what(), r)); |
209 | 105 | } | 105 | } |
210 | 106 | } | 106 | } |
211 | 107 | } | 107 | } |
212 | 108 | 108 | ||
213 | === modified file 'test/gtest/scopes/internal/MiddlewareFactory/MiddlewareFactory_test.cpp' | |||
214 | --- test/gtest/scopes/internal/MiddlewareFactory/MiddlewareFactory_test.cpp 2014-01-09 09:47:56 +0000 | |||
215 | +++ test/gtest/scopes/internal/MiddlewareFactory/MiddlewareFactory_test.cpp 2014-01-24 03:21:30 +0000 | |||
216 | @@ -46,6 +46,6 @@ | |||
217 | 46 | } | 46 | } |
218 | 47 | catch (ConfigException const& e) | 47 | catch (ConfigException const& e) |
219 | 48 | { | 48 | { |
221 | 49 | EXPECT_EQ("unity::scopes::ConfigException: Invalid middleware kind: NoSuchMiddleware", e.to_string()); | 49 | EXPECT_STREQ("unity::scopes::ConfigException: Invalid middleware kind: NoSuchMiddleware", e.what()); |
222 | 50 | } | 50 | } |
223 | 51 | } | 51 | } |
224 | 52 | 52 | ||
225 | === modified file 'test/gtest/scopes/internal/Reaper/Reaper_test.cpp' | |||
226 | --- test/gtest/scopes/internal/Reaper/Reaper_test.cpp 2014-01-07 12:22:29 +0000 | |||
227 | +++ test/gtest/scopes/internal/Reaper/Reaper_test.cpp 2014-01-24 03:21:30 +0000 | |||
228 | @@ -197,8 +197,8 @@ | |||
229 | 197 | } | 197 | } |
230 | 198 | catch (unity::InvalidArgumentException const& e) | 198 | catch (unity::InvalidArgumentException const& e) |
231 | 199 | { | 199 | { |
234 | 200 | EXPECT_EQ("unity::InvalidArgumentException: Reaper: invalid reap_interval (0). Interval must be > 0.", | 200 | EXPECT_STREQ("unity::InvalidArgumentException: Reaper: invalid reap_interval (0). Interval must be > 0.", |
235 | 201 | e.to_string()); | 201 | e.what()); |
236 | 202 | } | 202 | } |
237 | 203 | 203 | ||
238 | 204 | try | 204 | try |
239 | @@ -208,8 +208,8 @@ | |||
240 | 208 | } | 208 | } |
241 | 209 | catch (unity::LogicException const& e) | 209 | catch (unity::LogicException const& e) |
242 | 210 | { | 210 | { |
245 | 211 | EXPECT_EQ("unity::LogicException: Reaper: reap_interval (2) must be <= expiry_interval (1).", | 211 | EXPECT_STREQ("unity::LogicException: Reaper: reap_interval (2) must be <= expiry_interval (1).", |
246 | 212 | e.to_string()); | 212 | e.what()); |
247 | 213 | } | 213 | } |
248 | 214 | 214 | ||
249 | 215 | try | 215 | try |
250 | @@ -220,8 +220,8 @@ | |||
251 | 220 | } | 220 | } |
252 | 221 | catch (unity::InvalidArgumentException const& e) | 221 | catch (unity::InvalidArgumentException const& e) |
253 | 222 | { | 222 | { |
256 | 223 | EXPECT_EQ("unity::InvalidArgumentException: Reaper: invalid null callback passed to add().", | 223 | EXPECT_STREQ("unity::InvalidArgumentException: Reaper: invalid null callback passed to add().", |
257 | 224 | e.to_string()); | 224 | e.what()); |
258 | 225 | } | 225 | } |
259 | 226 | 226 | ||
260 | 227 | // Make sure that if a callback throws an exception, this does no harm. | 227 | // Make sure that if a callback throws an exception, this does no harm. |
261 | 228 | 228 | ||
262 | === modified file 'test/gtest/scopes/internal/RegistryConfig/RegistryConfig_test.cpp' | |||
263 | --- test/gtest/scopes/internal/RegistryConfig/RegistryConfig_test.cpp 2014-01-09 09:47:56 +0000 | |||
264 | +++ test/gtest/scopes/internal/RegistryConfig/RegistryConfig_test.cpp 2014-01-24 03:21:30 +0000 | |||
265 | @@ -45,8 +45,8 @@ | |||
266 | 45 | } | 45 | } |
267 | 46 | catch (InvalidArgumentException const& e) | 46 | catch (InvalidArgumentException const& e) |
268 | 47 | { | 47 | { |
271 | 48 | EXPECT_EQ("unity::InvalidArgumentException: Registry identity cannot be an empty string", | 48 | EXPECT_STREQ("unity::InvalidArgumentException: Registry identity cannot be an empty string", |
272 | 49 | e.to_string()); | 49 | e.what()); |
273 | 50 | } | 50 | } |
274 | 51 | } | 51 | } |
275 | 52 | 52 | ||
276 | @@ -59,8 +59,8 @@ | |||
277 | 59 | } | 59 | } |
278 | 60 | catch (ConfigException const& e) | 60 | catch (ConfigException const& e) |
279 | 61 | { | 61 | { |
283 | 62 | EXPECT_EQ("unity::scopes::ConfigException: ScoperunnerRelativePath.ini: Scoperunner.Path " | 62 | EXPECT_STREQ("unity::scopes::ConfigException: ScoperunnerRelativePath.ini: Scoperunner.Path " |
284 | 63 | "must be an absolute path", | 63 | "must be an absolute path", |
285 | 64 | e.to_string()); | 64 | e.what()); |
286 | 65 | } | 65 | } |
287 | 66 | } | 66 | } |
288 | 67 | 67 | ||
289 | === modified file 'test/gtest/scopes/internal/RuntimeConfig/RuntimeConfig_test.cpp' | |||
290 | --- test/gtest/scopes/internal/RuntimeConfig/RuntimeConfig_test.cpp 2014-01-09 09:47:56 +0000 | |||
291 | +++ test/gtest/scopes/internal/RuntimeConfig/RuntimeConfig_test.cpp 2014-01-24 03:21:30 +0000 | |||
292 | @@ -42,8 +42,8 @@ | |||
293 | 42 | } | 42 | } |
294 | 43 | catch (ConfigException const& e) | 43 | catch (ConfigException const& e) |
295 | 44 | { | 44 | { |
298 | 45 | EXPECT_EQ("unity::scopes::ConfigException: \"RegIDEmpty.ini\": Illegal empty value for Registry.Identity", | 45 | EXPECT_STREQ("unity::scopes::ConfigException: \"RegIDEmpty.ini\": Illegal empty value for Registry.Identity", |
299 | 46 | e.to_string()); | 46 | e.what()); |
300 | 47 | } | 47 | } |
301 | 48 | } | 48 | } |
302 | 49 | 49 | ||
303 | @@ -56,9 +56,9 @@ | |||
304 | 56 | } | 56 | } |
305 | 57 | catch (ConfigException const& e) | 57 | catch (ConfigException const& e) |
306 | 58 | { | 58 | { |
310 | 59 | EXPECT_EQ("unity::scopes::ConfigException: \"BadRegID.ini\": Illegal character in value for " | 59 | EXPECT_STREQ("unity::scopes::ConfigException: \"BadRegID.ini\": Illegal character in value for " |
311 | 60 | "Registry.Identity: \"Regi/stry\": identity cannot contain '/'", | 60 | "Registry.Identity: \"Regi/stry\": identity cannot contain '/'", |
312 | 61 | e.to_string()); | 61 | e.what()); |
313 | 62 | } | 62 | } |
314 | 63 | } | 63 | } |
315 | 64 | 64 | ||
316 | @@ -71,8 +71,8 @@ | |||
317 | 71 | } | 71 | } |
318 | 72 | catch (ConfigException const& e) | 72 | catch (ConfigException const& e) |
319 | 73 | { | 73 | { |
322 | 74 | EXPECT_EQ("unity::scopes::ConfigException: \"RegFileEmpty.ini\": Illegal empty value for Registry.ConfigFile", | 74 | EXPECT_STREQ("unity::scopes::ConfigException: \"RegFileEmpty.ini\": Illegal empty value for Registry.ConfigFile", |
323 | 75 | e.to_string()); | 75 | e.what()); |
324 | 76 | } | 76 | } |
325 | 77 | } | 77 | } |
326 | 78 | 78 | ||
327 | @@ -85,8 +85,8 @@ | |||
328 | 85 | } | 85 | } |
329 | 86 | catch (ConfigException const& e) | 86 | catch (ConfigException const& e) |
330 | 87 | { | 87 | { |
333 | 88 | EXPECT_EQ("unity::scopes::ConfigException: \"MWEmpty.ini\": Illegal empty value for Default.Middleware", | 88 | EXPECT_STREQ("unity::scopes::ConfigException: \"MWEmpty.ini\": Illegal empty value for Default.Middleware", |
334 | 89 | e.to_string()); | 89 | e.what()); |
335 | 90 | } | 90 | } |
336 | 91 | } | 91 | } |
337 | 92 | 92 | ||
338 | @@ -99,8 +99,8 @@ | |||
339 | 99 | } | 99 | } |
340 | 100 | catch (ConfigException const& e) | 100 | catch (ConfigException const& e) |
341 | 101 | { | 101 | { |
345 | 102 | EXPECT_EQ("unity::scopes::ConfigException: \"BadMW.ini\": Illegal value for Default.Middleware: " | 102 | EXPECT_STREQ("unity::scopes::ConfigException: \"BadMW.ini\": Illegal value for Default.Middleware: " |
346 | 103 | "\"Foo\": legal values are \"Zmq\" and \"REST\"", | 103 | "\"Foo\": legal values are \"Zmq\" and \"REST\"", |
347 | 104 | e.to_string()); | 104 | e.what()); |
348 | 105 | } | 105 | } |
349 | 106 | } | 106 | } |
350 | 107 | 107 | ||
351 | === modified file 'test/gtest/scopes/internal/RuntimeImpl/RuntimeImpl_test.cpp' | |||
352 | --- test/gtest/scopes/internal/RuntimeImpl/RuntimeImpl_test.cpp 2014-01-09 09:47:56 +0000 | |||
353 | +++ test/gtest/scopes/internal/RuntimeImpl/RuntimeImpl_test.cpp 2014-01-24 03:21:30 +0000 | |||
354 | @@ -44,8 +44,8 @@ | |||
355 | 44 | } | 44 | } |
356 | 45 | catch (LogicException const& e) | 45 | catch (LogicException const& e) |
357 | 46 | { | 46 | { |
360 | 47 | EXPECT_EQ("unity::LogicException: registry(): Cannot obtain registry for already destroyed run time", | 47 | EXPECT_STREQ("unity::LogicException: registry(): Cannot obtain registry for already destroyed run time", |
361 | 48 | e.to_string()); | 48 | e.what()); |
362 | 49 | } | 49 | } |
363 | 50 | 50 | ||
364 | 51 | rt->destroy(); | 51 | rt->destroy(); |
365 | @@ -56,8 +56,8 @@ | |||
366 | 56 | } | 56 | } |
367 | 57 | catch (LogicException const& e) | 57 | catch (LogicException const& e) |
368 | 58 | { | 58 | { |
371 | 59 | EXPECT_EQ("unity::LogicException: factory(): Cannot obtain factory for already destroyed run time", | 59 | EXPECT_STREQ("unity::LogicException: factory(): Cannot obtain factory for already destroyed run time", |
372 | 60 | e.to_string()); | 60 | e.what()); |
373 | 61 | } | 61 | } |
374 | 62 | } | 62 | } |
375 | 63 | 63 | ||
376 | @@ -69,9 +69,9 @@ | |||
377 | 69 | } | 69 | } |
378 | 70 | catch (ConfigException const& e) | 70 | catch (ConfigException const& e) |
379 | 71 | { | 71 | { |
384 | 72 | EXPECT_EQ("unity::scopes::ConfigException: Cannot instantiate run time for testscope, " | 72 | EXPECT_STREQ("unity::scopes::ConfigException: Cannot instantiate run time for testscope, " |
385 | 73 | "config file: NoSuchFile.ini:\n" | 73 | "config file: NoSuchFile.ini:\n" |
386 | 74 | " unity::FileException: Could not load ini file NoSuchFile.ini: No such file or directory (errno = 4)", | 74 | " unity::FileException: Could not load ini file NoSuchFile.ini: No such file or directory (errno = 4)", |
387 | 75 | e.to_string()); | 75 | e.what()); |
388 | 76 | } | 76 | } |
389 | 77 | } | 77 | } |
390 | 78 | 78 | ||
391 | === modified file 'test/gtest/scopes/internal/ScopeLoader/ScopeLoader_test.cpp' | |||
392 | --- test/gtest/scopes/internal/ScopeLoader/ScopeLoader_test.cpp 2014-01-09 11:59:34 +0000 | |||
393 | +++ test/gtest/scopes/internal/ScopeLoader/ScopeLoader_test.cpp 2014-01-24 03:21:30 +0000 | |||
394 | @@ -92,8 +92,8 @@ | |||
395 | 92 | } | 92 | } |
396 | 93 | catch (unity::Exception const& e) | 93 | catch (unity::Exception const& e) |
397 | 94 | { | 94 | { |
400 | 95 | EXPECT_EQ("unity::InvalidArgumentException: Cannot load scope testScope: null registry proxy", | 95 | EXPECT_STREQ("unity::InvalidArgumentException: Cannot load scope testScope: null registry proxy", |
401 | 96 | e.to_string()); | 96 | e.what()); |
402 | 97 | } | 97 | } |
403 | 98 | } | 98 | } |
404 | 99 | 99 | ||
405 | @@ -114,7 +114,7 @@ | |||
406 | 114 | " unity::ResourceException: Scope testScope was compiled with major version 666 of the " | 114 | " unity::ResourceException: Scope testScope was compiled with major version 666 of the " |
407 | 115 | "Unity scopes run time. This version is incompatible with the current major version " | 115 | "Unity scopes run time. This version is incompatible with the current major version " |
408 | 116 | "\\([0-9]+\\)\\."); | 116 | "\\([0-9]+\\)\\."); |
410 | 117 | EXPECT_TRUE(boost::regex_match(e.to_string(), r)) << e.to_string(); | 117 | EXPECT_TRUE(boost::regex_match(e.what(), r)) << e.what(); |
411 | 118 | } | 118 | } |
412 | 119 | EXPECT_EQ(1, num_create()); | 119 | EXPECT_EQ(1, num_create()); |
413 | 120 | EXPECT_EQ(1, num_destroy()); | 120 | EXPECT_EQ(1, num_destroy()); |
414 | @@ -190,8 +190,8 @@ | |||
415 | 190 | } | 190 | } |
416 | 191 | catch (unity::Exception const& e) | 191 | catch (unity::Exception const& e) |
417 | 192 | { | 192 | { |
420 | 193 | EXPECT_EQ("unity::ResourceException: no_such_lib: cannot open shared object file: No such file or directory", | 193 | EXPECT_STREQ("unity::ResourceException: no_such_lib: cannot open shared object file: No such file or directory", |
421 | 194 | e.to_string()); | 194 | e.what()); |
422 | 195 | EXPECT_EQ(0, num_create()); | 195 | EXPECT_EQ(0, num_create()); |
423 | 196 | EXPECT_EQ(0, num_destroy()); | 196 | EXPECT_EQ(0, num_destroy()); |
424 | 197 | } | 197 | } |
425 | @@ -211,7 +211,7 @@ | |||
426 | 211 | catch (unity::Exception const& e) | 211 | catch (unity::Exception const& e) |
427 | 212 | { | 212 | { |
428 | 213 | boost::regex r("unity::ResourceException: .*/libNoDestroy.so: undefined symbol: unity_scope_destroy"); | 213 | boost::regex r("unity::ResourceException: .*/libNoDestroy.so: undefined symbol: unity_scope_destroy"); |
430 | 214 | EXPECT_TRUE(boost::regex_match(e.to_string(), r)); | 214 | EXPECT_TRUE(boost::regex_match(e.what(), r)); |
431 | 215 | EXPECT_EQ(0, num_create()); | 215 | EXPECT_EQ(0, num_create()); |
432 | 216 | EXPECT_EQ(0, num_destroy()); | 216 | EXPECT_EQ(0, num_destroy()); |
433 | 217 | } | 217 | } |
434 | @@ -230,8 +230,8 @@ | |||
435 | 230 | } | 230 | } |
436 | 231 | catch (unity::Exception const& e) | 231 | catch (unity::Exception const& e) |
437 | 232 | { | 232 | { |
440 | 233 | EXPECT_EQ("unity::ResourceException: Scope testScope returned nullptr from unity_scope_create", | 233 | EXPECT_STREQ("unity::ResourceException: Scope testScope returned nullptr from unity_scope_create", |
441 | 234 | e.to_string()); | 234 | e.what()); |
442 | 235 | EXPECT_EQ(1, num_create()); | 235 | EXPECT_EQ(1, num_create()); |
443 | 236 | EXPECT_EQ(0, num_destroy()); | 236 | EXPECT_EQ(0, num_destroy()); |
444 | 237 | } | 237 | } |
445 | @@ -251,8 +251,8 @@ | |||
446 | 251 | } | 251 | } |
447 | 252 | catch (unity::Exception const& e) | 252 | catch (unity::Exception const& e) |
448 | 253 | { | 253 | { |
451 | 254 | EXPECT_EQ("unity::ResourceException: Scope testScope returned nullptr from unity_scope_create", | 254 | EXPECT_STREQ("unity::ResourceException: Scope testScope returned nullptr from unity_scope_create", |
452 | 255 | e.to_string()); | 255 | e.what()); |
453 | 256 | EXPECT_EQ(1, num_create()); | 256 | EXPECT_EQ(1, num_create()); |
454 | 257 | EXPECT_EQ(0, num_destroy()); | 257 | EXPECT_EQ(0, num_destroy()); |
455 | 258 | } | 258 | } |
456 | @@ -273,9 +273,9 @@ | |||
457 | 273 | } | 273 | } |
458 | 274 | catch (unity::Exception const& e) | 274 | catch (unity::Exception const& e) |
459 | 275 | { | 275 | { |
463 | 276 | EXPECT_EQ("unity::ResourceException: Scope testScope: terminated due to exception in start():\n" | 276 | EXPECT_STREQ("unity::ResourceException: Scope testScope: terminated due to exception in start():\n" |
464 | 277 | " unity::LogicException: start failure", | 277 | " unity::LogicException: start failure", |
465 | 278 | e.to_string()); | 278 | e.what()); |
466 | 279 | } | 279 | } |
467 | 280 | } | 280 | } |
468 | 281 | EXPECT_EQ(0, num_stop()); | 281 | EXPECT_EQ(0, num_stop()); |
469 | @@ -297,9 +297,9 @@ | |||
470 | 297 | } | 297 | } |
471 | 298 | catch (unity::Exception const& e) | 298 | catch (unity::Exception const& e) |
472 | 299 | { | 299 | { |
476 | 300 | EXPECT_EQ("unity::ResourceException: Scope testScope: terminated due to exception in start():\n" | 300 | EXPECT_STREQ("unity::ResourceException: Scope testScope: terminated due to exception in start():\n" |
477 | 301 | " unity::LogicException: start failure", | 301 | " unity::LogicException: start failure", |
478 | 302 | e.to_string()); | 302 | e.what()); |
479 | 303 | } | 303 | } |
480 | 304 | } | 304 | } |
481 | 305 | EXPECT_EQ(0, num_stop()); | 305 | EXPECT_EQ(0, num_stop()); |
482 | @@ -323,9 +323,9 @@ | |||
483 | 323 | } | 323 | } |
484 | 324 | catch (unity::Exception const& e) | 324 | catch (unity::Exception const& e) |
485 | 325 | { | 325 | { |
489 | 326 | EXPECT_EQ("unity::ResourceException: Scope testScope: terminated due to exception in start():\n" | 326 | EXPECT_STREQ("unity::ResourceException: Scope testScope: terminated due to exception in start():\n" |
490 | 327 | " unknown exception", | 327 | " unknown exception", |
491 | 328 | e.to_string()); | 328 | e.what()); |
492 | 329 | } | 329 | } |
493 | 330 | } | 330 | } |
494 | 331 | EXPECT_EQ(0, num_stop()); | 331 | EXPECT_EQ(0, num_stop()); |
495 | @@ -353,9 +353,9 @@ | |||
496 | 353 | } | 353 | } |
497 | 354 | catch (unity::ResourceException const& e) | 354 | catch (unity::ResourceException const& e) |
498 | 355 | { | 355 | { |
502 | 356 | EXPECT_EQ("unity::ResourceException: Scope testScope: terminated due to exception in stop():\n" | 356 | EXPECT_STREQ("unity::ResourceException: Scope testScope: terminated due to exception in stop():\n" |
503 | 357 | " unity::LogicException: stop failure", | 357 | " unity::LogicException: stop failure", |
504 | 358 | e.to_string()); | 358 | e.what()); |
505 | 359 | } | 359 | } |
506 | 360 | } | 360 | } |
507 | 361 | 361 | ||
508 | @@ -379,9 +379,9 @@ | |||
509 | 379 | } | 379 | } |
510 | 380 | catch (unity::ResourceException const& e) | 380 | catch (unity::ResourceException const& e) |
511 | 381 | { | 381 | { |
515 | 382 | EXPECT_EQ("unity::ResourceException: Scope testScope: terminated due to exception in stop():\n" | 382 | EXPECT_STREQ("unity::ResourceException: Scope testScope: terminated due to exception in stop():\n" |
516 | 383 | " stop failure", | 383 | " stop failure", |
517 | 384 | e.to_string()); | 384 | e.what()); |
518 | 385 | } | 385 | } |
519 | 386 | } | 386 | } |
520 | 387 | 387 | ||
521 | @@ -404,9 +404,9 @@ | |||
522 | 404 | } | 404 | } |
523 | 405 | catch (unity::ResourceException const& e) | 405 | catch (unity::ResourceException const& e) |
524 | 406 | { | 406 | { |
528 | 407 | EXPECT_EQ("unity::ResourceException: Scope testScope: terminated due to exception in stop():\n" | 407 | EXPECT_STREQ("unity::ResourceException: Scope testScope: terminated due to exception in stop():\n" |
529 | 408 | " unknown exception", | 408 | " unknown exception", |
530 | 409 | e.to_string()); | 409 | e.what()); |
531 | 410 | } | 410 | } |
532 | 411 | } | 411 | } |
533 | 412 | 412 | ||
534 | @@ -443,9 +443,9 @@ | |||
535 | 443 | } | 443 | } |
536 | 444 | catch (unity::Exception const& e) | 444 | catch (unity::Exception const& e) |
537 | 445 | { | 445 | { |
541 | 446 | EXPECT_EQ("unity::ResourceException: Scope testScope: terminated due to exception in stop():\n" | 446 | EXPECT_STREQ("unity::ResourceException: Scope testScope: terminated due to exception in stop():\n" |
542 | 447 | " unity::LogicException: stop failure", | 447 | " unity::LogicException: stop failure", |
543 | 448 | e.to_string()); | 448 | e.what()); |
544 | 449 | } | 449 | } |
545 | 450 | 450 | ||
546 | 451 | // Call unload again to make sure that the second time, it doesn't throw. | 451 | // Call unload again to make sure that the second time, it doesn't throw. |
547 | @@ -475,7 +475,7 @@ | |||
548 | 475 | } | 475 | } |
549 | 476 | catch (unity::Exception const& e) | 476 | catch (unity::Exception const& e) |
550 | 477 | { | 477 | { |
552 | 478 | EXPECT_EQ("unity::LogicException: Cannot start scope testScope in Finished state", e.to_string()); | 478 | EXPECT_STREQ("unity::LogicException: Cannot start scope testScope in Finished state", e.what()); |
553 | 479 | } | 479 | } |
554 | 480 | } | 480 | } |
555 | 481 | 481 | ||
556 | @@ -495,7 +495,7 @@ | |||
557 | 495 | } | 495 | } |
558 | 496 | catch (unity::Exception const& e) | 496 | catch (unity::Exception const& e) |
559 | 497 | { | 497 | { |
561 | 498 | EXPECT_EQ("unity::LogicException: Cannot stop scope testScope in Finished state", e.to_string()); | 498 | EXPECT_STREQ("unity::LogicException: Cannot stop scope testScope in Finished state", e.what()); |
562 | 499 | } | 499 | } |
563 | 500 | } | 500 | } |
564 | 501 | 501 | ||
565 | @@ -522,7 +522,7 @@ | |||
566 | 522 | } | 522 | } |
567 | 523 | catch (unity::Exception const& e) | 523 | catch (unity::Exception const& e) |
568 | 524 | { | 524 | { |
570 | 525 | EXPECT_EQ("unity::LogicException: Cannot start scope testScope in Failed state", e.to_string()); | 525 | EXPECT_STREQ("unity::LogicException: Cannot start scope testScope in Failed state", e.what()); |
571 | 526 | } | 526 | } |
572 | 527 | 527 | ||
573 | 528 | try | 528 | try |
574 | @@ -531,7 +531,7 @@ | |||
575 | 531 | } | 531 | } |
576 | 532 | catch (unity::Exception const& e) | 532 | catch (unity::Exception const& e) |
577 | 533 | { | 533 | { |
579 | 534 | EXPECT_EQ("unity::LogicException: Cannot stop scope testScope in Failed state", e.to_string()); | 534 | EXPECT_STREQ("unity::LogicException: Cannot stop scope testScope in Failed state", e.what()); |
580 | 535 | } | 535 | } |
581 | 536 | } | 536 | } |
582 | 537 | 537 | ||
583 | 538 | 538 | ||
584 | === modified file 'test/gtest/scopes/internal/ScopeMetadataImpl/ScopeMetadataImpl_test.cpp' | |||
585 | --- test/gtest/scopes/internal/ScopeMetadataImpl/ScopeMetadataImpl_test.cpp 2014-01-15 22:52:19 +0000 | |||
586 | +++ test/gtest/scopes/internal/ScopeMetadataImpl/ScopeMetadataImpl_test.cpp 2014-01-24 03:21:30 +0000 | |||
587 | @@ -64,7 +64,7 @@ | |||
588 | 64 | } | 64 | } |
589 | 65 | catch (NotFoundException const& e) | 65 | catch (NotFoundException const& e) |
590 | 66 | { | 66 | { |
592 | 67 | EXPECT_EQ("unity::scopes::NotFoundException: attribute not set (name = art)", e.to_string()); | 67 | EXPECT_STREQ("unity::scopes::NotFoundException: attribute not set (name = art)", e.what()); |
593 | 68 | } | 68 | } |
594 | 69 | 69 | ||
595 | 70 | try | 70 | try |
596 | @@ -74,7 +74,7 @@ | |||
597 | 74 | } | 74 | } |
598 | 75 | catch (NotFoundException const& e) | 75 | catch (NotFoundException const& e) |
599 | 76 | { | 76 | { |
601 | 77 | EXPECT_EQ("unity::scopes::NotFoundException: attribute not set (name = icon)", e.to_string()); | 77 | EXPECT_STREQ("unity::scopes::NotFoundException: attribute not set (name = icon)", e.what()); |
602 | 78 | } | 78 | } |
603 | 79 | 79 | ||
604 | 80 | try | 80 | try |
605 | @@ -84,7 +84,7 @@ | |||
606 | 84 | } | 84 | } |
607 | 85 | catch (NotFoundException const& e) | 85 | catch (NotFoundException const& e) |
608 | 86 | { | 86 | { |
610 | 87 | EXPECT_EQ("unity::scopes::NotFoundException: attribute not set (name = search_hint)", e.to_string()); | 87 | EXPECT_STREQ("unity::scopes::NotFoundException: attribute not set (name = search_hint)", e.what()); |
611 | 88 | } | 88 | } |
612 | 89 | 89 | ||
613 | 90 | try | 90 | try |
614 | @@ -94,7 +94,7 @@ | |||
615 | 94 | } | 94 | } |
616 | 95 | catch (NotFoundException const& e) | 95 | catch (NotFoundException const& e) |
617 | 96 | { | 96 | { |
619 | 97 | EXPECT_EQ("unity::scopes::NotFoundException: attribute not set (name = hot_key)", e.to_string()); | 97 | EXPECT_STREQ("unity::scopes::NotFoundException: attribute not set (name = hot_key)", e.what()); |
620 | 98 | } | 98 | } |
621 | 99 | 99 | ||
622 | 100 | // Check that the copy has the same values as the original | 100 | // Check that the copy has the same values as the original |
623 | @@ -235,8 +235,8 @@ | |||
624 | 235 | } | 235 | } |
625 | 236 | catch (InvalidArgumentException const&e) | 236 | catch (InvalidArgumentException const&e) |
626 | 237 | { | 237 | { |
629 | 238 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadata: required attribute 'scope_name' is empty", | 238 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadata: required attribute 'scope_name' is empty", |
630 | 239 | e.to_string()); | 239 | e.what()); |
631 | 240 | } | 240 | } |
632 | 241 | 241 | ||
633 | 242 | try | 242 | try |
634 | @@ -247,8 +247,8 @@ | |||
635 | 247 | } | 247 | } |
636 | 248 | catch (InvalidArgumentException const&e) | 248 | catch (InvalidArgumentException const&e) |
637 | 249 | { | 249 | { |
640 | 250 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadataImpl::serialize(): required attribute 'proxy' is null", | 250 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadataImpl::serialize(): required attribute 'proxy' is null", |
641 | 251 | e.to_string()); | 251 | e.what()); |
642 | 252 | } | 252 | } |
643 | 253 | 253 | ||
644 | 254 | try | 254 | try |
645 | @@ -260,8 +260,8 @@ | |||
646 | 260 | } | 260 | } |
647 | 261 | catch (InvalidArgumentException const&e) | 261 | catch (InvalidArgumentException const&e) |
648 | 262 | { | 262 | { |
651 | 263 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadata: required attribute 'display_name' is empty", | 263 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadata: required attribute 'display_name' is empty", |
652 | 264 | e.to_string()); | 264 | e.what()); |
653 | 265 | } | 265 | } |
654 | 266 | 266 | ||
655 | 267 | try | 267 | try |
656 | @@ -272,8 +272,8 @@ | |||
657 | 272 | } | 272 | } |
658 | 273 | catch (InvalidArgumentException const&e) | 273 | catch (InvalidArgumentException const&e) |
659 | 274 | { | 274 | { |
662 | 275 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadata: required attribute 'description' is empty", | 275 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadata: required attribute 'description' is empty", |
663 | 276 | e.to_string()); | 276 | e.what()); |
664 | 277 | } | 277 | } |
665 | 278 | } | 278 | } |
666 | 279 | 279 | ||
667 | @@ -291,9 +291,9 @@ | |||
668 | 291 | } | 291 | } |
669 | 292 | catch (InvalidArgumentException const&e) | 292 | catch (InvalidArgumentException const&e) |
670 | 293 | { | 293 | { |
674 | 294 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadata::deserialize(): required attribute " | 294 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadata::deserialize(): required attribute " |
675 | 295 | "'scope_name' is missing", | 295 | "'scope_name' is missing", |
676 | 296 | e.to_string()); | 296 | e.what()); |
677 | 297 | } | 297 | } |
678 | 298 | 298 | ||
679 | 299 | m["scope_name"] = "scope_name"; | 299 | m["scope_name"] = "scope_name"; |
680 | @@ -305,9 +305,9 @@ | |||
681 | 305 | } | 305 | } |
682 | 306 | catch (InvalidArgumentException const&e) | 306 | catch (InvalidArgumentException const&e) |
683 | 307 | { | 307 | { |
687 | 308 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadata::deserialize(): required attribute " | 308 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadata::deserialize(): required attribute " |
688 | 309 | "'proxy' is missing", | 309 | "'proxy' is missing", |
689 | 310 | e.to_string()); | 310 | e.what()); |
690 | 311 | } | 311 | } |
691 | 312 | 312 | ||
692 | 313 | VariantMap proxy; | 313 | VariantMap proxy; |
693 | @@ -320,8 +320,8 @@ | |||
694 | 320 | } | 320 | } |
695 | 321 | catch (InvalidArgumentException const&e) | 321 | catch (InvalidArgumentException const&e) |
696 | 322 | { | 322 | { |
699 | 323 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadataImpl::deserialize(): missing 'proxy.identity'", | 323 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadataImpl::deserialize(): missing 'proxy.identity'", |
700 | 324 | e.to_string()); | 324 | e.what()); |
701 | 325 | } | 325 | } |
702 | 326 | 326 | ||
703 | 327 | proxy["identity"] = "identity"; | 327 | proxy["identity"] = "identity"; |
704 | @@ -334,8 +334,8 @@ | |||
705 | 334 | } | 334 | } |
706 | 335 | catch (InvalidArgumentException const&e) | 335 | catch (InvalidArgumentException const&e) |
707 | 336 | { | 336 | { |
710 | 337 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadataImpl::deserialize(): missing 'proxy.endpoint'", | 337 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadataImpl::deserialize(): missing 'proxy.endpoint'", |
711 | 338 | e.to_string()); | 338 | e.what()); |
712 | 339 | } | 339 | } |
713 | 340 | 340 | ||
714 | 341 | proxy["endpoint"] = "endpoint"; | 341 | proxy["endpoint"] = "endpoint"; |
715 | @@ -348,9 +348,9 @@ | |||
716 | 348 | } | 348 | } |
717 | 349 | catch (InvalidArgumentException const&e) | 349 | catch (InvalidArgumentException const&e) |
718 | 350 | { | 350 | { |
722 | 351 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadata::deserialize(): required attribute " | 351 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadata::deserialize(): required attribute " |
723 | 352 | "'display_name' is missing", | 352 | "'display_name' is missing", |
724 | 353 | e.to_string()); | 353 | e.what()); |
725 | 354 | } | 354 | } |
726 | 355 | 355 | ||
727 | 356 | m["display_name"] = "display_name"; | 356 | m["display_name"] = "display_name"; |
728 | @@ -362,9 +362,9 @@ | |||
729 | 362 | } | 362 | } |
730 | 363 | catch (InvalidArgumentException const&e) | 363 | catch (InvalidArgumentException const&e) |
731 | 364 | { | 364 | { |
735 | 365 | EXPECT_EQ("unity::InvalidArgumentException: ScopeMetadata::deserialize(): required attribute " | 365 | EXPECT_STREQ("unity::InvalidArgumentException: ScopeMetadata::deserialize(): required attribute " |
736 | 366 | "'description' is missing", | 366 | "'description' is missing", |
737 | 367 | e.to_string()); | 367 | e.what()); |
738 | 368 | } | 368 | } |
739 | 369 | m["description"] = "description"; | 369 | m["description"] = "description"; |
740 | 370 | 370 | ||
741 | 371 | 371 | ||
742 | === modified file 'test/gtest/scopes/internal/ThreadPool/ThreadPool_test.cpp' | |||
743 | --- test/gtest/scopes/internal/ThreadPool/ThreadPool_test.cpp 2014-01-07 12:22:29 +0000 | |||
744 | +++ test/gtest/scopes/internal/ThreadPool/ThreadPool_test.cpp 2014-01-24 03:21:30 +0000 | |||
745 | @@ -92,7 +92,7 @@ | |||
746 | 92 | } | 92 | } |
747 | 93 | catch (unity::InvalidArgumentException const& e) | 93 | catch (unity::InvalidArgumentException const& e) |
748 | 94 | { | 94 | { |
750 | 95 | EXPECT_EQ("unity::InvalidArgumentException: ThreadPool(): invalid pool size: 0", e.to_string()); | 95 | EXPECT_STREQ("unity::InvalidArgumentException: ThreadPool(): invalid pool size: 0", e.what()); |
751 | 96 | } | 96 | } |
752 | 97 | 97 | ||
753 | 98 | try | 98 | try |
754 | @@ -101,6 +101,6 @@ | |||
755 | 101 | } | 101 | } |
756 | 102 | catch (unity::InvalidArgumentException const& e) | 102 | catch (unity::InvalidArgumentException const& e) |
757 | 103 | { | 103 | { |
759 | 104 | EXPECT_EQ("unity::InvalidArgumentException: ThreadPool(): invalid pool size: -1", e.to_string()); | 104 | EXPECT_STREQ("unity::InvalidArgumentException: ThreadPool(): invalid pool size: -1", e.what()); |
760 | 105 | } | 105 | } |
761 | 106 | } | 106 | } |
762 | 107 | 107 | ||
763 | === modified file 'test/gtest/scopes/internal/zmq_middleware/ObjectAdapter/ObjectAdapter_test.cpp' | |||
764 | --- test/gtest/scopes/internal/zmq_middleware/ObjectAdapter/ObjectAdapter_test.cpp 2014-01-16 13:40:51 +0000 | |||
765 | +++ test/gtest/scopes/internal/zmq_middleware/ObjectAdapter/ObjectAdapter_test.cpp 2014-01-24 03:21:30 +0000 | |||
766 | @@ -176,9 +176,9 @@ | |||
767 | 176 | } | 176 | } |
768 | 177 | catch (MiddlewareException const& e) | 177 | catch (MiddlewareException const& e) |
769 | 178 | { | 178 | { |
773 | 179 | EXPECT_EQ("unity::scopes::MiddlewareException: Object adapter in Destroyed " | 179 | EXPECT_STREQ("unity::scopes::MiddlewareException: Object adapter in Destroyed " |
774 | 180 | "state (adapter: testscope)", | 180 | "state (adapter: testscope)", |
775 | 181 | e.to_string()); | 181 | e.what()); |
776 | 182 | } | 182 | } |
777 | 183 | } | 183 | } |
778 | 184 | 184 | ||
779 | @@ -194,12 +194,12 @@ | |||
780 | 194 | } | 194 | } |
781 | 195 | catch (MiddlewareException const& e) | 195 | catch (MiddlewareException const& e) |
782 | 196 | { | 196 | { |
789 | 197 | EXPECT_EQ("unity::scopes::MiddlewareException: ObjectAdapter::run_workers(): broker thread " | 197 | EXPECT_STREQ("unity::scopes::MiddlewareException: ObjectAdapter::run_workers(): broker thread " |
790 | 198 | "failure (adapter: testscope):\n" | 198 | "failure (adapter: testscope):\n" |
791 | 199 | " unity::scopes::MiddlewareException: ObjectAdapter: broker thread failure " | 199 | " unity::scopes::MiddlewareException: ObjectAdapter: broker thread failure " |
792 | 200 | "(adapter: testscope):\n" | 200 | "(adapter: testscope):\n" |
793 | 201 | " Address already in use", | 201 | " Address already in use", |
794 | 202 | e.to_string()); | 202 | e.what()); |
795 | 203 | } | 203 | } |
796 | 204 | try | 204 | try |
797 | 205 | { | 205 | { |
798 | @@ -207,13 +207,13 @@ | |||
799 | 207 | } | 207 | } |
800 | 208 | catch (MiddlewareException const& e) | 208 | catch (MiddlewareException const& e) |
801 | 209 | { | 209 | { |
809 | 210 | EXPECT_EQ("unity::scopes::MiddlewareException: Object adapter in Failed state (adapter: testscope)\n" | 210 | EXPECT_STREQ("unity::scopes::MiddlewareException: Object adapter in Failed state (adapter: testscope)\n" |
810 | 211 | " Exception history:\n" | 211 | " Exception history:\n" |
811 | 212 | " Exception #1:\n" | 212 | " Exception #1:\n" |
812 | 213 | " unity::scopes::MiddlewareException: ObjectAdapter: broker thread failure " | 213 | " unity::scopes::MiddlewareException: ObjectAdapter: broker thread failure " |
813 | 214 | "(adapter: testscope):\n" | 214 | "(adapter: testscope):\n" |
814 | 215 | " Address already in use", | 215 | " Address already in use", |
815 | 216 | e.to_string()); | 216 | e.what()); |
816 | 217 | } | 217 | } |
817 | 218 | try | 218 | try |
818 | 219 | { | 219 | { |
819 | @@ -221,13 +221,13 @@ | |||
820 | 221 | } | 221 | } |
821 | 222 | catch (MiddlewareException const& e) | 222 | catch (MiddlewareException const& e) |
822 | 223 | { | 223 | { |
830 | 224 | EXPECT_EQ("unity::scopes::MiddlewareException: Object adapter in Failed state (adapter: testscope)\n" | 224 | EXPECT_STREQ("unity::scopes::MiddlewareException: Object adapter in Failed state (adapter: testscope)\n" |
831 | 225 | " Exception history:\n" | 225 | " Exception history:\n" |
832 | 226 | " Exception #1:\n" | 226 | " Exception #1:\n" |
833 | 227 | " unity::scopes::MiddlewareException: ObjectAdapter: broker thread failure " | 227 | " unity::scopes::MiddlewareException: ObjectAdapter: broker thread failure " |
834 | 228 | "(adapter: testscope):\n" | 228 | "(adapter: testscope):\n" |
835 | 229 | " Address already in use", | 229 | " Address already in use", |
836 | 230 | e.to_string()); | 230 | e.what()); |
837 | 231 | } | 231 | } |
838 | 232 | } | 232 | } |
839 | 233 | } | 233 | } |
840 | @@ -294,8 +294,8 @@ | |||
841 | 294 | } | 294 | } |
842 | 295 | catch (InvalidArgumentException const& e) | 295 | catch (InvalidArgumentException const& e) |
843 | 296 | { | 296 | { |
846 | 297 | EXPECT_EQ("unity::InvalidArgumentException: ObjectAdapter::add(): invalid empty id (adapter: testscope)", | 297 | EXPECT_STREQ("unity::InvalidArgumentException: ObjectAdapter::add(): invalid empty id (adapter: testscope)", |
847 | 298 | e.to_string()); | 298 | e.what()); |
848 | 299 | } | 299 | } |
849 | 300 | 300 | ||
850 | 301 | try | 301 | try |
851 | @@ -305,8 +305,8 @@ | |||
852 | 305 | } | 305 | } |
853 | 306 | catch (InvalidArgumentException const& e) | 306 | catch (InvalidArgumentException const& e) |
854 | 307 | { | 307 | { |
857 | 308 | EXPECT_EQ("unity::InvalidArgumentException: ObjectAdapter::add(): invalid nullptr object (adapter: testscope)", | 308 | EXPECT_STREQ("unity::InvalidArgumentException: ObjectAdapter::add(): invalid nullptr object (adapter: testscope)", |
858 | 309 | e.to_string()); | 309 | e.what()); |
859 | 310 | } | 310 | } |
860 | 311 | 311 | ||
861 | 312 | shared_ptr<MyServant> o(new MyServant); | 312 | shared_ptr<MyServant> o(new MyServant); |
862 | @@ -321,9 +321,9 @@ | |||
863 | 321 | } | 321 | } |
864 | 322 | catch (MiddlewareException const& e) | 322 | catch (MiddlewareException const& e) |
865 | 323 | { | 323 | { |
869 | 324 | EXPECT_EQ("unity::scopes::MiddlewareException: ObjectAdapter::add(): cannot add id \"fred\":" | 324 | EXPECT_STREQ("unity::scopes::MiddlewareException: ObjectAdapter::add(): cannot add id \"fred\":" |
870 | 325 | " id already in use (adapter: testscope)", | 325 | " id already in use (adapter: testscope)", |
871 | 326 | e.to_string()); | 326 | e.what()); |
872 | 327 | } | 327 | } |
873 | 328 | 328 | ||
874 | 329 | a.remove("fred"); | 329 | a.remove("fred"); |
875 | @@ -333,9 +333,9 @@ | |||
876 | 333 | } | 333 | } |
877 | 334 | catch (MiddlewareException const& e) | 334 | catch (MiddlewareException const& e) |
878 | 335 | { | 335 | { |
882 | 336 | EXPECT_EQ("unity::scopes::MiddlewareException: ObjectAdapter::remove(): cannot remove id \"fred\":" | 336 | EXPECT_STREQ("unity::scopes::MiddlewareException: ObjectAdapter::remove(): cannot remove id \"fred\":" |
883 | 337 | " id not present (adapter: testscope)", | 337 | " id not present (adapter: testscope)", |
884 | 338 | e.to_string()); | 338 | e.what()); |
885 | 339 | } | 339 | } |
886 | 340 | 340 | ||
887 | 341 | EXPECT_EQ(nullptr, a.find("fred").get()); | 341 | EXPECT_EQ(nullptr, a.find("fred").get()); |
888 | @@ -907,8 +907,8 @@ | |||
889 | 907 | } | 907 | } |
890 | 908 | catch (MiddlewareException const& e) | 908 | catch (MiddlewareException const& e) |
891 | 909 | { | 909 | { |
894 | 910 | EXPECT_EQ("unity::scopes::MiddlewareException: Object adapter in Destroyed state (adapter: testscope)", | 910 | EXPECT_STREQ("unity::scopes::MiddlewareException: Object adapter in Destroyed state (adapter: testscope)", |
895 | 911 | e.to_string()); | 911 | e.what()); |
896 | 912 | } | 912 | } |
897 | 913 | }; | 913 | }; |
898 | 914 | a.add("fred", make_shared<UpdaterServant>(test_func)); | 914 | a.add("fred", make_shared<UpdaterServant>(test_func)); |
899 | @@ -928,9 +928,9 @@ | |||
900 | 928 | } | 928 | } |
901 | 929 | catch (MiddlewareException const& e) | 929 | catch (MiddlewareException const& e) |
902 | 930 | { | 930 | { |
906 | 931 | EXPECT_EQ("unity::scopes::MiddlewareException: ObjectAdapter::remove(): " | 931 | EXPECT_STREQ("unity::scopes::MiddlewareException: ObjectAdapter::remove(): " |
907 | 932 | "cannot remove id \"fred\": id not present (adapter: testscope)", | 932 | "cannot remove id \"fred\": id not present (adapter: testscope)", |
908 | 933 | e.to_string()); | 933 | e.what()); |
909 | 934 | } | 934 | } |
910 | 935 | }; | 935 | }; |
911 | 936 | auto servant = make_shared<UpdaterServant>(test_func); | 936 | auto servant = make_shared<UpdaterServant>(test_func); |
912 | @@ -952,9 +952,9 @@ | |||
913 | 952 | } | 952 | } |
914 | 953 | catch (MiddlewareException const& e) | 953 | catch (MiddlewareException const& e) |
915 | 954 | { | 954 | { |
919 | 955 | EXPECT_EQ("unity::scopes::MiddlewareException: ObjectAdapter::remove(): " | 955 | EXPECT_STREQ("unity::scopes::MiddlewareException: ObjectAdapter::remove(): " |
920 | 956 | "cannot remove id \"fred\": id not present (adapter: testscope)", | 956 | "cannot remove id \"fred\": id not present (adapter: testscope)", |
921 | 957 | e.to_string()); | 957 | e.what()); |
922 | 958 | } | 958 | } |
923 | 959 | }; | 959 | }; |
924 | 960 | auto servant = make_shared<UpdaterServant>(test_func); | 960 | auto servant = make_shared<UpdaterServant>(test_func); |
925 | @@ -1005,9 +1005,9 @@ | |||
926 | 1005 | } | 1005 | } |
927 | 1006 | catch (MiddlewareException const& e) | 1006 | catch (MiddlewareException const& e) |
928 | 1007 | { | 1007 | { |
932 | 1008 | EXPECT_EQ("unity::scopes::MiddlewareException: Object adapter in Destroyed " | 1008 | EXPECT_STREQ("unity::scopes::MiddlewareException: Object adapter in Destroyed " |
933 | 1009 | "state (adapter: testscope)", | 1009 | "state (adapter: testscope)", |
934 | 1010 | e.to_string()); | 1010 | e.what()); |
935 | 1011 | } | 1011 | } |
936 | 1012 | try | 1012 | try |
937 | 1013 | { | 1013 | { |
938 | @@ -1016,9 +1016,9 @@ | |||
939 | 1016 | } | 1016 | } |
940 | 1017 | catch (MiddlewareException const& e) | 1017 | catch (MiddlewareException const& e) |
941 | 1018 | { | 1018 | { |
945 | 1019 | EXPECT_EQ("unity::scopes::MiddlewareException: Object adapter in Destroyed " | 1019 | EXPECT_STREQ("unity::scopes::MiddlewareException: Object adapter in Destroyed " |
946 | 1020 | "state (adapter: testscope)", | 1020 | "state (adapter: testscope)", |
947 | 1021 | e.to_string()); | 1021 | e.what()); |
948 | 1022 | } | 1022 | } |
949 | 1023 | } | 1023 | } |
950 | 1024 | } | 1024 | } |
951 | @@ -1196,9 +1196,9 @@ | |||
952 | 1196 | } | 1196 | } |
953 | 1197 | catch (InvalidArgumentException const& e) | 1197 | catch (InvalidArgumentException const& e) |
954 | 1198 | { | 1198 | { |
958 | 1199 | EXPECT_EQ("unity::InvalidArgumentException: ObjectAdapter::add_dflt_servant(): " | 1199 | EXPECT_STREQ("unity::InvalidArgumentException: ObjectAdapter::add_dflt_servant(): " |
959 | 1200 | "invalid nullptr object (adapter: testscope)", | 1200 | "invalid nullptr object (adapter: testscope)", |
960 | 1201 | e.to_string()); | 1201 | e.what()); |
961 | 1202 | } | 1202 | } |
962 | 1203 | 1203 | ||
963 | 1204 | ObjectAdapter b(mw, "testscope2", "ipc://testscope", RequestType::Oneway, 2); | 1204 | ObjectAdapter b(mw, "testscope2", "ipc://testscope", RequestType::Oneway, 2); |
964 | 1205 | 1205 | ||
965 | === modified file 'test/gtest/scopes/internal/zmq_middleware/RegistryI/RegistryI_test.cpp' | |||
966 | --- test/gtest/scopes/internal/zmq_middleware/RegistryI/RegistryI_test.cpp 2014-01-21 04:38:37 +0000 | |||
967 | +++ test/gtest/scopes/internal/zmq_middleware/RegistryI/RegistryI_test.cpp 2014-01-24 03:21:30 +0000 | |||
968 | @@ -58,34 +58,26 @@ | |||
969 | 58 | 58 | ||
970 | 59 | TEST(RegistryI, get_metadata) | 59 | TEST(RegistryI, get_metadata) |
971 | 60 | { | 60 | { |
1000 | 61 | try | 61 | vector<string> dummy_spawn_command; |
1001 | 62 | { | 62 | RuntimeImpl::UPtr runtime = RuntimeImpl::create( |
1002 | 63 | vector<string> dummy_spawn_command; | 63 | "TestRegistry", TEST_BUILD_ROOT "/gtest/scopes/internal/zmq_middleware/RegistryI/Runtime.ini"); |
1003 | 64 | RuntimeImpl::UPtr runtime = RuntimeImpl::create( | 64 | |
1004 | 65 | "TestRegistry", TEST_BUILD_ROOT "/gtest/scopes/internal/zmq_middleware/RegistryI/Runtime.ini"); | 65 | string identity = runtime->registry_identity(); |
1005 | 66 | 66 | RegistryConfig c(identity, runtime->registry_configfile()); | |
1006 | 67 | string identity = runtime->registry_identity(); | 67 | string mw_kind = c.mw_kind(); |
1007 | 68 | RegistryConfig c(identity, runtime->registry_configfile()); | 68 | string mw_endpoint = c.endpoint(); |
1008 | 69 | string mw_kind = c.mw_kind(); | 69 | string mw_configfile = c.mw_configfile(); |
1009 | 70 | string mw_endpoint = c.endpoint(); | 70 | |
1010 | 71 | string mw_configfile = c.mw_configfile(); | 71 | MiddlewareBase::SPtr middleware = runtime->factory()->create(identity, mw_kind, mw_configfile); |
1011 | 72 | 72 | RegistryObject::SPtr ro(make_shared<RegistryObject>()); | |
1012 | 73 | MiddlewareBase::SPtr middleware = runtime->factory()->create(identity, mw_kind, mw_configfile); | 73 | auto registry = middleware->add_registry_object(identity, ro); |
1013 | 74 | RegistryObject::SPtr ro(make_shared<RegistryObject>()); | 74 | auto p = middleware->create_scope_proxy("scope1", "ipc:///tmp/scope1"); |
1014 | 75 | auto registry = middleware->add_registry_object(identity, ro); | 75 | EXPECT_TRUE(ro->add("scope1", move(make_meta("scope1", p, middleware)), |
1015 | 76 | auto p = middleware->create_scope_proxy("scope1", "ipc:///tmp/scope1"); | 76 | dummy_spawn_command)); |
1016 | 77 | EXPECT_TRUE(ro->add("scope1", move(make_meta("scope1", p, middleware)), | 77 | |
1017 | 78 | dummy_spawn_command)); | 78 | auto r = runtime->registry(); |
1018 | 79 | 79 | auto scope = r->get_metadata("scope1"); | |
1019 | 80 | auto r = runtime->registry(); | 80 | EXPECT_EQ("scope1", scope.scope_name()); |
992 | 81 | auto scope = r->get_metadata("scope1"); | ||
993 | 82 | EXPECT_EQ("scope1", scope.scope_name()); | ||
994 | 83 | } | ||
995 | 84 | catch (unity::Exception const& e) | ||
996 | 85 | { | ||
997 | 86 | cerr << e.to_string() << endl; | ||
998 | 87 | FAIL(); | ||
999 | 88 | } | ||
1020 | 89 | } | 81 | } |
1021 | 90 | 82 | ||
1022 | 91 | TEST(RegistryI, list) | 83 | TEST(RegistryI, list) |
1023 | @@ -216,8 +208,8 @@ | |||
1024 | 216 | } | 208 | } |
1025 | 217 | catch (NotFoundException const& e) | 209 | catch (NotFoundException const& e) |
1026 | 218 | { | 210 | { |
1029 | 219 | EXPECT_EQ("unity::scopes::NotFoundException: Registry::get_metadata(): no such scope (name = fred)", | 211 | EXPECT_STREQ("unity::scopes::NotFoundException: Registry::get_metadata(): no such scope (name = fred)", |
1030 | 220 | e.to_string()); | 212 | e.what()); |
1031 | 221 | } | 213 | } |
1032 | 222 | 214 | ||
1033 | 223 | try | 215 | try |
1034 | @@ -227,9 +219,9 @@ | |||
1035 | 227 | } | 219 | } |
1036 | 228 | catch (MiddlewareException const& e) | 220 | catch (MiddlewareException const& e) |
1037 | 229 | { | 221 | { |
1041 | 230 | EXPECT_EQ("unity::scopes::MiddlewareException: unity::InvalidArgumentException: " | 222 | EXPECT_STREQ("unity::scopes::MiddlewareException: unity::InvalidArgumentException: " |
1042 | 231 | "Registry: Cannot search for scope with empty name", | 223 | "Registry: Cannot search for scope with empty name", |
1043 | 232 | e.to_string()); | 224 | e.what()); |
1044 | 233 | } | 225 | } |
1045 | 234 | 226 | ||
1046 | 235 | try | 227 | try |
1047 | @@ -240,8 +232,8 @@ | |||
1048 | 240 | } | 232 | } |
1049 | 241 | catch (InvalidArgumentException const& e) | 233 | catch (InvalidArgumentException const& e) |
1050 | 242 | { | 234 | { |
1053 | 243 | EXPECT_EQ("unity::InvalidArgumentException: Registry: Cannot add scope with empty name", | 235 | EXPECT_STREQ("unity::InvalidArgumentException: Registry: Cannot add scope with empty name", |
1054 | 244 | e.to_string()); | 236 | e.what()); |
1055 | 245 | } | 237 | } |
1056 | 246 | 238 | ||
1057 | 247 | try | 239 | try |
1058 | @@ -251,8 +243,8 @@ | |||
1059 | 251 | } | 243 | } |
1060 | 252 | catch (InvalidArgumentException const& e) | 244 | catch (InvalidArgumentException const& e) |
1061 | 253 | { | 245 | { |
1064 | 254 | EXPECT_EQ("unity::InvalidArgumentException: Registry: Cannot remove scope with empty name", | 246 | EXPECT_STREQ("unity::InvalidArgumentException: Registry: Cannot remove scope with empty name", |
1065 | 255 | e.to_string()); | 247 | e.what()); |
1066 | 256 | } | 248 | } |
1067 | 257 | } | 249 | } |
1068 | 258 | 250 | ||
1069 | @@ -298,7 +290,7 @@ | |||
1070 | 298 | auto r_proxy = dynamic_pointer_cast<ZmqRegistry>(r); | 290 | auto r_proxy = dynamic_pointer_cast<ZmqRegistry>(r); |
1071 | 299 | auto proxy = middleware->create_scope_proxy("scope1", "ipc:///tmp/scope1"); | 291 | auto proxy = middleware->create_scope_proxy("scope1", "ipc:///tmp/scope1"); |
1072 | 300 | mro->add("scope1", move(make_meta("scope1", proxy, middleware)), | 292 | mro->add("scope1", move(make_meta("scope1", proxy, middleware)), |
1074 | 301 | dummy_spawn_command); | 293 | dummy_spawn_command); |
1075 | 302 | 294 | ||
1076 | 303 | auto p = r_proxy->locate("scope1"); | 295 | auto p = r_proxy->locate("scope1"); |
1077 | 304 | EXPECT_EQ("scope1", p->identity()); | 296 | EXPECT_EQ("scope1", p->identity()); |
1078 | @@ -325,28 +317,27 @@ | |||
1079 | 325 | EXPECT_STREQ("unity::scopes::RegistryException: Couldn't start error_scope", e.what()); | 317 | EXPECT_STREQ("unity::scopes::RegistryException: Couldn't start error_scope", e.what()); |
1080 | 326 | } | 318 | } |
1081 | 327 | 319 | ||
1082 | 328 | #if 0 | ||
1083 | 329 | try | 320 | try |
1084 | 330 | { | 321 | { |
1085 | 331 | auto proxy = middleware->create_scope_proxy("scope1", "ipc:///tmp/scope1"); | 322 | auto proxy = middleware->create_scope_proxy("scope1", "ipc:///tmp/scope1"); |
1087 | 332 | ro->add("", move(make_meta("blah", proxy, middleware))); | 323 | mro->add("", move(make_meta("blah", proxy, middleware)), |
1088 | 324 | dummy_spawn_command); | ||
1089 | 333 | FAIL(); | 325 | FAIL(); |
1090 | 334 | } | 326 | } |
1091 | 335 | catch (InvalidArgumentException const& e) | 327 | catch (InvalidArgumentException const& e) |
1092 | 336 | { | 328 | { |
1095 | 337 | EXPECT_EQ("unity::InvalidArgumentException: Registry: Cannot add scope with empty name", | 329 | EXPECT_STREQ("unity::InvalidArgumentException: Registry: Cannot add scope with empty name", |
1096 | 338 | e.to_string()); | 330 | e.what()); |
1097 | 339 | } | 331 | } |
1098 | 340 | 332 | ||
1099 | 341 | try | 333 | try |
1100 | 342 | { | 334 | { |
1102 | 343 | ro->remove(""); | 335 | mro->remove(""); |
1103 | 344 | FAIL(); | 336 | FAIL(); |
1104 | 345 | } | 337 | } |
1105 | 346 | catch (InvalidArgumentException const& e) | 338 | catch (InvalidArgumentException const& e) |
1106 | 347 | { | 339 | { |
1109 | 348 | EXPECT_EQ("unity::InvalidArgumentException: Registry: Cannot remove scope with empty name", | 340 | EXPECT_STREQ("unity::InvalidArgumentException: Registry: Cannot remove scope with empty name", |
1110 | 349 | e.to_string()); | 341 | e.what()); |
1111 | 350 | } | 342 | } |
1112 | 351 | #endif | ||
1113 | 352 | } | 343 | } |
FAILED: Continuous integration, rev:150 jenkins. qa.ubuntu. com/job/ unity-scopes- api-ci/ 287/ jenkins. qa.ubuntu. com/job/ unity-scopes- api-trusty- amd64-ci/ 287 jenkins. qa.ubuntu. com/job/ unity-scopes- api-trusty- armhf-ci/ 287 jenkins. qa.ubuntu. com/job/ unity-scopes- api-trusty- armhf-ci/ 287/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity-scopes- api-trusty- i386-ci/ 287/console
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity- scopes- api-ci/ 287/rebuild
http://