Merge lp:~michihenning/unity-scopes-api/merge-devel into lp:unity-scopes-api
- merge-devel
- Merge into trunk
Proposed by
Michi Henning
Status: | Merged |
---|---|
Approved by: | Marcus Tomlinson |
Approved revision: | 374 |
Merged at revision: | 373 |
Proposed branch: | lp:~michihenning/unity-scopes-api/merge-devel |
Merge into: | lp:unity-scopes-api |
Diff against target: |
3526 lines (+653/-371) 115 files modified
HACKING (+4/-4) debian/changelog (+8/-0) debian/control (+4/-117) debian/control.in (+2/-0) include/unity/scopes/internal/RegistryObject.h (+2/-1) include/unity/scopes/testing/MockObject.h (+3/-0) include/unity/scopes/testing/MockPreviewReply.h (+3/-0) include/unity/scopes/testing/MockQueryCtrl.h (+3/-0) include/unity/scopes/testing/MockRegistry.h (+3/-0) include/unity/scopes/testing/MockScope.h (+3/-0) include/unity/scopes/testing/MockSearchReply.h (+3/-0) include/unity/scopes/testing/TypedScopeFixture.h (+3/-0) scoperegistry/scoperegistry.cpp (+7/-0) src/scopes/internal/RegistryObject.cpp (+3/-3) test/gtest/CMakeLists.txt (+1/-18) test/gtest/scopes/Activation/Activation_test.cpp (+5/-1) test/gtest/scopes/ActivationResponse/ActivationResponse_test.cpp (+6/-2) test/gtest/scopes/Aggregation/ChildScopes_test.cpp (+13/-9) test/gtest/scopes/Aggregation/Keywords_test.cpp (+10/-6) test/gtest/scopes/Aggregation/LoopDetection_test.cpp (+21/-18) test/gtest/scopes/Annotation/Annotation_test.cpp (+4/-0) test/gtest/scopes/CannedQuery/CannedQuery_test.cpp (+5/-1) test/gtest/scopes/CategorisedResult/CategorisedResult_test.cpp (+4/-0) test/gtest/scopes/Category/Category_test.cpp (+3/-0) test/gtest/scopes/CategoryRenderer/CategoryRenderer_test.cpp (+4/-0) test/gtest/scopes/ColumnLayout/ColumnLayout_test.cpp (+4/-0) test/gtest/scopes/DateTimePickerFilter/DateTimePickerFilter_test.cpp (+4/-0) test/gtest/scopes/Department/Department_test.cpp (+4/-0) test/gtest/scopes/Filters/Filters_test.cpp (+5/-1) test/gtest/scopes/IdleShutdown/IdleShutdown_test.cpp (+4/-0) test/gtest/scopes/Invocation/Invocation_test.cpp (+3/-0) test/gtest/scopes/Location/Location_test.cpp (+5/-1) test/gtest/scopes/OnlineAccountClient/OnlineAccountClient_test.cpp (+8/-4) test/gtest/scopes/OptionSelectorFilter/OptionSelectorFilter_test.cpp (+5/-0) test/gtest/scopes/PreviewWidget/PreviewWidget_test.cpp (+4/-0) test/gtest/scopes/QueryMetadata/QueryMetadata_test.cpp (+5/-1) test/gtest/scopes/RadioButtonsFilter/RadioButtonsFilter_test.cpp (+4/-0) test/gtest/scopes/RangeInputFilter/RangeInputFilter_test.cpp (+4/-0) test/gtest/scopes/RatingFilter/RatingFilter_test.cpp (+5/-0) test/gtest/scopes/Registry/Registry_test.cpp (+33/-16) test/gtest/scopes/ReplyReaper/NoReplyScope.cpp (+3/-0) test/gtest/scopes/ReplyReaper/ReplyReaper_test.cpp (+4/-0) test/gtest/scopes/ResultCache/ResultCache_test.cpp (+39/-34) test/gtest/scopes/Runtime/PusherScope.cpp (+3/-0) test/gtest/scopes/Runtime/Runtime_test.cpp (+5/-2) test/gtest/scopes/Runtime/SlowCreateScope.cpp (+3/-0) test/gtest/scopes/Runtime/TestScope.cpp (+4/-0) test/gtest/scopes/ScopeBase/ScopeBase_test.cpp (+3/-0) test/gtest/scopes/ScopeExceptions/ScopeExceptions_test.cpp (+3/-0) test/gtest/scopes/StandAloneScope/StandAloneScope_test.cpp (+3/-0) test/gtest/scopes/StripLocation/StripLocation_test.cpp (+3/-0) test/gtest/scopes/SwitchFilter/SwitchFilter_test.cpp (+4/-0) test/gtest/scopes/ThrowingClient/ThrowingClient_test.cpp (+12/-9) test/gtest/scopes/ThrowingScope/ThrowingScope_test.cpp (+14/-11) test/gtest/scopes/ValueSliderFilter/ValueSliderFilter_test.cpp (+6/-2) test/gtest/scopes/Variant/Variant_test.cpp (+5/-2) test/gtest/scopes/VariantBuilder/VariantBuilder_test.cpp (+5/-1) test/gtest/scopes/Version/Version_test.cpp (+3/-0) test/gtest/scopes/internal/CategoryRegistry/CategoryRegistry_test.cpp (+3/-0) test/gtest/scopes/internal/ConfigBase/ConfigBase_test.cpp (+3/-0) test/gtest/scopes/internal/DynamicLoader/DynamicLoader_test.cpp (+3/-0) test/gtest/scopes/internal/IniSettingsSchema/IniSettingsSchema_test.cpp (+9/-6) test/gtest/scopes/internal/JsonNode/JsonNode_test.cpp (+4/-0) test/gtest/scopes/internal/JsonSettingsSchema/JsonSettingsSchema_test.cpp (+7/-4) test/gtest/scopes/internal/Logger/Logger_test.cpp (+5/-0) test/gtest/scopes/internal/MiddlewareFactory/MiddlewareFactory_test.cpp (+3/-0) test/gtest/scopes/internal/Reaper/Reaper_test.cpp (+17/-14) test/gtest/scopes/internal/RegistryConfig/RegistryConfig_test.cpp (+3/-0) test/gtest/scopes/internal/RegistryObject/RegistryObject_test.cpp (+3/-1) test/gtest/scopes/internal/ResultReplyObject/ResultReplyObject_test.cpp (+4/-0) test/gtest/scopes/internal/RuntimeConfig/RuntimeConfig_test.cpp (+3/-0) test/gtest/scopes/internal/RuntimeImpl/RuntimeImpl_test.cpp (+4/-0) test/gtest/scopes/internal/ScopeConfig/ScopeConfig_test.cpp (+9/-6) test/gtest/scopes/internal/ScopeLoader/ScopeLoader_test.cpp (+3/-0) test/gtest/scopes/internal/ScopeMetadataImpl/ScopeMetadataImpl_test.cpp (+5/-2) test/gtest/scopes/internal/SettingsDB/SettingsDB_test.cpp (+25/-21) test/gtest/scopes/internal/ThreadPool/ThreadPool_test.cpp (+4/-0) test/gtest/scopes/internal/ThreadSafeQueue/ThreadSafeQueue_test.cpp (+3/-0) test/gtest/scopes/internal/UniqueID/UniqueID_test.cpp (+3/-0) test/gtest/scopes/internal/Utils/Utils_test.cpp (+21/-5) test/gtest/scopes/internal/gobj_ptr/gobj_ptr_test.cpp (+12/-8) test/gtest/scopes/internal/safe_strerror/safe_strerror_test.cpp (+4/-0) test/gtest/scopes/internal/smartscopes/HttpClient/HttpClient_test.cpp (+4/-0) test/gtest/scopes/internal/smartscopes/SSConfig/SSConfig_test.cpp (+3/-0) test/gtest/scopes/internal/smartscopes/SmartScopesClient/SmartScopesClient_test.cpp (+24/-20) test/gtest/scopes/internal/smartscopes/smartscopesproxy/smartscopesproxy_test.cpp (+11/-7) test/gtest/scopes/internal/zmq_middleware/ConnectionPool/ConnectionPool_test.cpp (+3/-0) test/gtest/scopes/internal/zmq_middleware/ObjectAdapter/ObjectAdapter_test.cpp (+4/-0) test/gtest/scopes/internal/zmq_middleware/PubSub/PubSub_test.cpp (+4/-0) test/gtest/scopes/internal/zmq_middleware/RegistryI/RegistryI_test.cpp (+4/-1) test/gtest/scopes/internal/zmq_middleware/ServantBase/ServantBase_test.cpp (+3/-0) test/gtest/scopes/internal/zmq_middleware/StopPublisher/StopPublisher_test.cpp (+3/-0) test/gtest/scopes/internal/zmq_middleware/Util/Util_test.cpp (+4/-0) test/gtest/scopes/internal/zmq_middleware/VariantConverter/VariantConverter_test.cpp (+5/-1) test/gtest/scopes/internal/zmq_middleware/ZmqMiddleware/ZmqMiddleware_test.cpp (+3/-0) test/gtest/scopes/qt/JsonAsyncReader/JsonAsyncReader_test.cpp (+5/-1) test/gtest/scopes/qt/XmlAsyncReader/XmlAsyncReader_test.cpp (+3/-0) test/gtest/scopes/qt/qt-bindings/QActionMetadata_test.cpp (+3/-0) test/gtest/scopes/qt/qt-bindings/QCannedQuery_test.cpp (+4/-1) test/gtest/scopes/qt/qt-bindings/QCategorisedResult_test.cpp (+3/-0) test/gtest/scopes/qt/qt-bindings/QColumnLayout_test.cpp (+5/-2) test/gtest/scopes/qt/qt-bindings/QDepartment_test.cpp (+4/-1) test/gtest/scopes/qt/qt-bindings/QPreviewQueryBaseAPI_test.cpp (+3/-1) test/gtest/scopes/qt/qt-bindings/QPreviewWidget_test.cpp (+3/-0) test/gtest/scopes/qt/qt-bindings/QScopeBaseAPIImpl_test.cpp (+3/-1) test/gtest/scopes/qt/qt-bindings/QScopeCreation_test.cpp (+4/-0) test/gtest/scopes/qt/qt-bindings/QSearchMetadata_test.cpp (+3/-0) test/gtest/scopes/qt/qt-bindings/QSearchQueryBaseAPI_test.cpp (+3/-1) test/gtest/scopes/qt/qt-bindings/QUtils_test.cpp (+4/-1) test/gtest/scopes/qt/qt-bindings/QVariantBuilder_test.cpp (+3/-0) test/gtest/scopes/stress/scopes-stress.cpp (+6/-2) test/gtest/scopes/testing/IsolatedScope/IsolatedScope_test.cpp (+3/-0) test/gtest/scopes/testing/IsolatedScopeBenchmark/IsolatedScopeBenchmark_test.cpp (+3/-0) test/gtest/scopes/testing/Statistics/Statistics_test.cpp (+3/-0) test/gtest/scopes/utility/BufferedResultForwarder/BufferedResultForwarder_test.cpp (+4/-0) |
To merge this branch: | bzr merge lp:~michihenning/unity-scopes-api/merge-devel |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marcus Tomlinson (community) | Approve | ||
Review via email: mp+314791@code.launchpad.net |
Commit message
Fixed lots of compiler warnings.
Fix for bug #1656042 (cmake changes for new gtest).
Description of the change
Fixed lots of compiler warnings.
Fix for bug #1656042 (cmake changes for new gtest).
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'HACKING' |
2 | --- HACKING 2016-09-09 06:57:47 +0000 |
3 | +++ HACKING 2017-01-16 02:36:15 +0000 |
4 | @@ -205,13 +205,13 @@ |
5 | |
6 | - QT-VERSION |
7 | |
8 | - The full version number parts for libunity-scopes-qt. |
9 | + The full version number for libunity-scopes-qt. |
10 | |
11 | - *If* the soname changes, you need to add the outdated |
12 | versions to the "Replaces:" and "Conflicts:" entries |
13 | - in control and control.in. (You need an extra |
14 | - entry for each Vivid and Wily/Xenial andlater. See |
15 | - bileto_pre_release_hook for the sed scripts that append a |
16 | + in control.in. (You need an extra entry for each Vivid and |
17 | + Wily/Xenial and later.) |
18 | + See bileto_pre_release_hook for the sed scripts that append a |
19 | line to the stanza if the soname is changed. This also may apply |
20 | if the soname of the Qt library changes, in which case |
21 | bileto_pre_release_hook needs a corresponding update. |
22 | |
23 | === modified file 'debian/changelog' |
24 | --- debian/changelog 2016-11-15 06:09:04 +0000 |
25 | +++ debian/changelog 2017-01-16 02:36:15 +0000 |
26 | @@ -1,3 +1,11 @@ |
27 | +unity-scopes-api (1.0.8ubuntu1) UNRELEASED; urgency=medium |
28 | + |
29 | + * Create $HOME/.local/share/applications if it does not exist. lp:1645798 |
30 | + * Fixed lots of compiler warnings. |
31 | + * Changed cmake files to work with new gtest. |
32 | + |
33 | + -- Michi Henning <michi.henning@canonical.com> Mon, 16 Jan 2017 12:30:39 +1000 |
34 | + |
35 | unity-scopes-api (1.0.7+17.04.20161115-0ubuntu1) zesty; urgency=medium |
36 | |
37 | * Be stricter on user-configurable idle timeout (1s to 5min). |
38 | |
39 | === modified file 'debian/control' |
40 | --- debian/control 2016-11-15 06:09:04 +0000 |
41 | +++ debian/control 2017-01-16 02:36:15 +0000 |
42 | @@ -4,123 +4,10 @@ |
43 | # This file is regenerated automatically by bileto. |
44 | # |
45 | Source: unity-scopes-api |
46 | -Priority: optional |
47 | -Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
48 | -Build-Depends: abigail-tools <!nocheck> | libabigail-tools <!nocheck>, |
49 | - binutils:native, |
50 | - capnproto, |
51 | - click-dev (>= 0.2.2), |
52 | - cmake, |
53 | - dbus-test-runner, |
54 | - debhelper (>= 9), |
55 | - devscripts, |
56 | - doxygen, |
57 | - exuberant-ctags, |
58 | - google-mock, |
59 | - graphviz, |
60 | - libaccounts-glib-dev, |
61 | - libapparmor-dev, |
62 | - libboost-filesystem-dev, |
63 | - libboost-regex-dev, |
64 | - libboost-serialization-dev, |
65 | - libboost-thread-dev, |
66 | - libcapnp-dev (>= 0.4.0), |
67 | - libdbustest1-dev, |
68 | - libjson-glib-dev, |
69 | - liblttng-ust-dev, |
70 | - libnet-cpp-dev (>= 1.2.0), |
71 | - libprocess-cpp-dev (>= 1.0.1), |
72 | - libsignon-glib-dev, |
73 | - libunity-api-dev (>= 7.80.7~), |
74 | - libzmq3-dev, |
75 | - libzmqpp-dev, |
76 | - lsb-release, |
77 | - lttng-tools, |
78 | - pkg-config, |
79 | - python3 <!nocheck>, |
80 | - python3-dbusmock <!nocheck>, |
81 | - python-tornado <!nocheck>, |
82 | - valgrind, |
83 | -Standards-Version: 3.9.6 |
84 | -XS-Testsuite: autopkgtest |
85 | -Section: libs |
86 | -Homepage: https://launchpad.net/unity-scopes-api |
87 | -# if you don't have have commit access to this branch but would like to upload |
88 | -# directly to Ubuntu, don't worry: your changes will be merged back into the |
89 | -# upstream branch |
90 | -Vcs-Bzr: lp:unity-scopes-api |
91 | -Vcs-Browser: https://code.launchpad.net/unity-scopes-api |
92 | + |
93 | +# DO NOT EDIT THIS FILE. WE REALLY MEAN IT! |
94 | |
95 | Package: libunity-scopes1.0 |
96 | Architecture: any |
97 | -Multi-Arch: same |
98 | -Pre-Depends: ${misc:Pre-Depends}, |
99 | -Depends: ${misc:Depends}, |
100 | - ${shlibs:Depends}, |
101 | -Replaces: libunity-scopes0, |
102 | - libunity-scopes3, |
103 | - libunity-scopes1, |
104 | - libunity-scopes2, |
105 | -Conflicts: libunity-scopes0, |
106 | - libunity-scopes3, |
107 | - libunity-scopes1, |
108 | - libunity-scopes2, |
109 | -Description: API for Unity scopes integration |
110 | - Library to integrate scopes with the Unity shell |
111 | - |
112 | -Package: libunity-scopes-dev |
113 | -Section: libdevel |
114 | -Architecture: any |
115 | -Multi-Arch: same |
116 | -Depends: libproperties-cpp-dev, |
117 | - libunity-api-dev, |
118 | - libunity-scopes1.0 (= ${binary:Version}), |
119 | - ${misc:Depends}, |
120 | -Description: Header files for Unity scopes API |
121 | - Library to integrate scopes with the Unity shell (dev files) |
122 | - |
123 | -Package: libunity-scopes-cli |
124 | -Section: devel |
125 | -Architecture: any |
126 | -Multi-Arch: foreign |
127 | -Depends: libunity-scopes1.0 (= ${binary:Version}), |
128 | - ${misc:Depends}, |
129 | - ${shlibs:Depends}, |
130 | -Description: Client utility for Unity scopes API |
131 | - Commandline client utility for querying Unity scopes, useful for testing. |
132 | - |
133 | -Package: libunity-scopes-doc |
134 | -Section: doc |
135 | -Architecture: all |
136 | -Multi-Arch: foreign |
137 | -Depends: ${misc:Depends}, |
138 | -Description: Documentation for Unity scopes API |
139 | - Library to integrate scopes with the Unity shell (documentation) |
140 | - |
141 | -Package: libunity-scopes-qt0.2 |
142 | -Architecture: any |
143 | -Multi-Arch: same |
144 | -Pre-Depends: ${misc:Pre-Depends}, |
145 | -Depends: ${misc:Depends}, |
146 | - ${shlibs:Depends}, |
147 | -Description: Qt library for Unity scopes API |
148 | - Library that integrates classes based on Qt for convenience |
149 | - |
150 | -Package: libunity-scopes-qt-dev |
151 | -Section: libdevel |
152 | -Architecture: any |
153 | -Multi-Arch: same |
154 | -Depends: libunity-scopes-dev (= ${binary:Version}), |
155 | - libunity-scopes-qt0.2 (= ${binary:Version}), |
156 | - libnet-cpp-dev (>=1.2.0), |
157 | - ${misc:Depends}, |
158 | -Description: Header files for Qt library for Unity scopes API |
159 | - Library that integrates classes based on Qt for convenience (dev files) |
160 | - |
161 | -Package: libunity-scopes-qt-doc |
162 | -Section: doc |
163 | -Architecture: all |
164 | -Multi-Arch: foreign |
165 | -Depends: ${misc:Depends}, |
166 | -Description: Documentation for Unity Qt library |
167 | - Library that integrates classes based on Qt for convenience (documentation) |
168 | +Description: DO NOT EDIT THIS FILE, IT IS GENERATED FROM control.in |
169 | + DO NOT EDIT THIS FILE |
170 | |
171 | === modified file 'debian/control.in' |
172 | --- debian/control.in 2016-07-25 05:35:44 +0000 |
173 | +++ debian/control.in 2017-01-16 02:36:15 +0000 |
174 | @@ -6,6 +6,7 @@ |
175 | capnproto, |
176 | click-dev (>= 0.2.2), |
177 | cmake, |
178 | + cmake-extras (>= 0.4), |
179 | dbus-test-runner, |
180 | debhelper (>= 9), |
181 | devscripts, |
182 | @@ -13,6 +14,7 @@ |
183 | exuberant-ctags, |
184 | google-mock, |
185 | graphviz, |
186 | + language-pack-tr, |
187 | libaccounts-glib-dev, |
188 | libapparmor-dev, |
189 | libboost-filesystem-dev, |
190 | |
191 | === modified file 'include/unity/scopes/internal/RegistryObject.h' |
192 | --- include/unity/scopes/internal/RegistryObject.h 2016-02-22 00:19:46 +0000 |
193 | +++ include/unity/scopes/internal/RegistryObject.h 2017-01-16 02:36:15 +0000 |
194 | @@ -78,11 +78,12 @@ |
195 | |
196 | StateReceiverObject::SPtr state_receiver(); |
197 | |
198 | + static std::string desktop_files_dir(); |
199 | + |
200 | private: |
201 | void on_process_death(core::posix::ChildProcess const& process); |
202 | void on_state_received(std::string const& scope_id, StateReceiverObject::State const& state); |
203 | |
204 | - static std::string desktop_files_dir(); |
205 | void create_desktop_file(ScopeMetadata const& metadata); |
206 | void remove_desktop_file(std::string const& scope_id); |
207 | |
208 | |
209 | === modified file 'include/unity/scopes/testing/MockObject.h' |
210 | --- include/unity/scopes/testing/MockObject.h 2015-04-01 11:28:32 +0000 |
211 | +++ include/unity/scopes/testing/MockObject.h 2017-01-16 02:36:15 +0000 |
212 | @@ -20,7 +20,10 @@ |
213 | |
214 | #include <unity/scopes/Object.h> |
215 | |
216 | +#pragma GCC diagnostic push |
217 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
218 | #include <gmock/gmock.h> |
219 | +#pragma GCC diagnostic pop |
220 | |
221 | namespace unity |
222 | { |
223 | |
224 | === modified file 'include/unity/scopes/testing/MockPreviewReply.h' |
225 | --- include/unity/scopes/testing/MockPreviewReply.h 2015-04-10 10:10:06 +0000 |
226 | +++ include/unity/scopes/testing/MockPreviewReply.h 2017-01-16 02:36:15 +0000 |
227 | @@ -22,7 +22,10 @@ |
228 | |
229 | #include <unity/scopes/testing/MockObject.h> |
230 | |
231 | +#pragma GCC diagnostic push |
232 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
233 | #include <gmock/gmock.h> |
234 | +#pragma GCC diagnostic pop |
235 | |
236 | namespace unity |
237 | { |
238 | |
239 | === modified file 'include/unity/scopes/testing/MockQueryCtrl.h' |
240 | --- include/unity/scopes/testing/MockQueryCtrl.h 2014-11-03 05:31:30 +0000 |
241 | +++ include/unity/scopes/testing/MockQueryCtrl.h 2017-01-16 02:36:15 +0000 |
242 | @@ -22,7 +22,10 @@ |
243 | |
244 | #include <unity/scopes/testing/MockObject.h> |
245 | |
246 | +#pragma GCC diagnostic push |
247 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
248 | #include <gmock/gmock.h> |
249 | +#pragma GCC diagnostic pop |
250 | |
251 | namespace unity |
252 | { |
253 | |
254 | === modified file 'include/unity/scopes/testing/MockRegistry.h' |
255 | --- include/unity/scopes/testing/MockRegistry.h 2015-02-06 00:25:05 +0000 |
256 | +++ include/unity/scopes/testing/MockRegistry.h 2017-01-16 02:36:15 +0000 |
257 | @@ -21,7 +21,10 @@ |
258 | #include <unity/scopes/Registry.h> |
259 | #include <unity/scopes/testing/MockObject.h> |
260 | |
261 | +#pragma GCC diagnostic push |
262 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
263 | #include <gmock/gmock.h> |
264 | +#pragma GCC diagnostic pop |
265 | |
266 | namespace unity |
267 | { |
268 | |
269 | === modified file 'include/unity/scopes/testing/MockScope.h' |
270 | --- include/unity/scopes/testing/MockScope.h 2016-09-08 08:22:37 +0000 |
271 | +++ include/unity/scopes/testing/MockScope.h 2017-01-16 02:36:15 +0000 |
272 | @@ -24,7 +24,10 @@ |
273 | |
274 | #include <unity/scopes/testing/MockObject.h> |
275 | |
276 | +#pragma GCC diagnostic push |
277 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
278 | #include <gmock/gmock.h> |
279 | +#pragma GCC diagnostic pop |
280 | |
281 | namespace unity |
282 | { |
283 | |
284 | === modified file 'include/unity/scopes/testing/MockSearchReply.h' |
285 | --- include/unity/scopes/testing/MockSearchReply.h 2016-06-14 14:19:25 +0000 |
286 | +++ include/unity/scopes/testing/MockSearchReply.h 2017-01-16 02:36:15 +0000 |
287 | @@ -24,7 +24,10 @@ |
288 | |
289 | #include <unity/scopes/testing/MockObject.h> |
290 | |
291 | +#pragma GCC diagnostic push |
292 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
293 | #include <gmock/gmock.h> |
294 | +#pragma GCC diagnostic pop |
295 | |
296 | namespace unity |
297 | { |
298 | |
299 | === modified file 'include/unity/scopes/testing/TypedScopeFixture.h' |
300 | --- include/unity/scopes/testing/TypedScopeFixture.h 2016-03-09 04:01:35 +0000 |
301 | +++ include/unity/scopes/testing/TypedScopeFixture.h 2017-01-16 02:36:15 +0000 |
302 | @@ -22,7 +22,10 @@ |
303 | |
304 | #include <unity/scopes/testing/MockRegistry.h> |
305 | |
306 | +#pragma GCC diagnostic push |
307 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
308 | #include <gtest/gtest.h> |
309 | +#pragma GCC diagnostic pop |
310 | |
311 | #include <memory> |
312 | |
313 | |
314 | === modified file 'scoperegistry/scoperegistry.cpp' |
315 | --- scoperegistry/scoperegistry.cpp 2016-04-01 06:05:09 +0000 |
316 | +++ scoperegistry/scoperegistry.cpp 2017-01-16 02:36:15 +0000 |
317 | @@ -496,6 +496,13 @@ |
318 | string tmp_dir = string("/run/user/") + std::to_string(geteuid()) + "/scopes/leaf-net"; |
319 | make_directories(tmp_dir, 0700); |
320 | |
321 | + // Make sure that the directory for .desktop files exists. |
322 | + string desktop_files_dir = RegistryObject::desktop_files_dir(); |
323 | + if (!desktop_files_dir.empty()) |
324 | + { |
325 | + make_directories(desktop_files_dir, 0700); |
326 | + } |
327 | + |
328 | // Collect the registry config data. |
329 | |
330 | string mw_kind; |
331 | |
332 | === modified file 'src/scopes/internal/RegistryObject.cpp' |
333 | --- src/scopes/internal/RegistryObject.cpp 2016-02-22 01:29:01 +0000 |
334 | +++ src/scopes/internal/RegistryObject.cpp 2017-01-16 02:36:15 +0000 |
335 | @@ -404,13 +404,13 @@ |
336 | |
337 | void RegistryObject::create_desktop_file(ScopeMetadata const& metadata) |
338 | { |
339 | - std::string desktop_file_path = desktop_files_dir(); |
340 | - if (!generate_desktop_files_ || desktop_file_path.empty()) |
341 | + static std::string const desktop_files_dir = RegistryObject::desktop_files_dir(); |
342 | + if (!generate_desktop_files_ || desktop_files_dir.empty()) |
343 | { |
344 | return; |
345 | } |
346 | |
347 | - desktop_file_path += "/" + metadata.scope_id() + ".desktop"; |
348 | + std::string const desktop_file_path = desktop_files_dir + "/" + metadata.scope_id() + ".desktop"; |
349 | |
350 | std::ofstream desktop_file(desktop_file_path.c_str()); |
351 | if (!desktop_file) |
352 | |
353 | === modified file 'test/gtest/CMakeLists.txt' |
354 | --- test/gtest/CMakeLists.txt 2014-12-02 02:00:57 +0000 |
355 | +++ test/gtest/CMakeLists.txt 2017-01-16 02:36:15 +0000 |
356 | @@ -1,21 +1,4 @@ |
357 | -if (NOT DEFINED GMOCK_ROOT) |
358 | - set(GMOCK_ROOT /usr/src/gmock) |
359 | -endif() |
360 | - |
361 | -add_subdirectory(${GMOCK_ROOT} gmock) |
362 | - |
363 | -# Selectively switch off warnings about missing field initializers when building gmock and gtest |
364 | -set_property(TARGET gmock APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-missing-field-initializers -Wno-old-style-cast") |
365 | -set_property(TARGET gmock_main APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-missing-field-initializers -Wno-old-style-cast") |
366 | -set_property(TARGET gtest APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-missing-field-initializers -Wno-old-style-cast") |
367 | - |
368 | -# Make sure we always build gtest/gmock with debug info, otherwise we don't |
369 | -# get line numbers for the code that is dragged in by the test macros. |
370 | -set_property(TARGET gmock APPEND_STRING PROPERTY COMPILE_FLAGS " -g") |
371 | -set_property(TARGET gmock_main APPEND_STRING PROPERTY COMPILE_FLAGS " -g") |
372 | -set_property(TARGET gtest APPEND_STRING PROPERTY COMPILE_FLAGS " -g") |
373 | - |
374 | -include_directories(${GMOCK_ROOT}/gtest/include) |
375 | +find_package(GMock) |
376 | |
377 | set(LIBGTEST gtest gmock gmock_main) |
378 | set(TESTLIBS ${TESTLIBS} ${LIBGTEST} boost_regex) |
379 | |
380 | === modified file 'test/gtest/scopes/Activation/Activation_test.cpp' |
381 | --- test/gtest/scopes/Activation/Activation_test.cpp 2015-06-08 14:05:12 +0000 |
382 | +++ test/gtest/scopes/Activation/Activation_test.cpp 2017-01-16 02:36:15 +0000 |
383 | @@ -28,10 +28,14 @@ |
384 | #include <unity/scopes/ActionMetadata.h> |
385 | #include <unity/UnityExceptions.h> |
386 | #include <functional> |
387 | -#include <gtest/gtest.h> |
388 | #include <unity/scopes/testing/Result.h> |
389 | #include <TestScope.h> |
390 | |
391 | +#pragma GCC diagnostic push |
392 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
393 | +#include <gtest/gtest.h> |
394 | +#pragma GCC diagnostic pop |
395 | + |
396 | using namespace unity::scopes; |
397 | using namespace unity::scopes::internal; |
398 | |
399 | |
400 | === modified file 'test/gtest/scopes/ActivationResponse/ActivationResponse_test.cpp' |
401 | --- test/gtest/scopes/ActivationResponse/ActivationResponse_test.cpp 2015-07-14 15:11:48 +0000 |
402 | +++ test/gtest/scopes/ActivationResponse/ActivationResponse_test.cpp 2017-01-16 02:36:15 +0000 |
403 | @@ -22,7 +22,11 @@ |
404 | #include <unity/scopes/internal/ResultImpl.h> |
405 | #include <unity/scopes/internal/RuntimeImpl.h> |
406 | #include <unity/UnityExceptions.h> |
407 | + |
408 | +#pragma GCC diagnostic push |
409 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
410 | #include <gtest/gtest.h> |
411 | +#pragma GCC diagnostic pop |
412 | |
413 | using namespace unity::scopes; |
414 | using namespace unity::scopes::internal; |
415 | @@ -107,7 +111,7 @@ |
416 | |
417 | ActivationResponse resp(widgets); |
418 | EXPECT_EQ(ActivationResponse::Status::UpdatePreview, resp.status()); |
419 | - EXPECT_EQ(1, resp.updated_widgets().size()); |
420 | + EXPECT_EQ(1u, resp.updated_widgets().size()); |
421 | EXPECT_EQ("w1", resp.updated_widgets().begin()->id()); |
422 | } |
423 | |
424 | @@ -170,7 +174,7 @@ |
425 | |
426 | ActivationResponse resp2 = internal::ActivationResponseImpl::create(var, runtime.get()); |
427 | EXPECT_EQ(ActivationResponse::Status::UpdatePreview, resp2.status()); |
428 | - EXPECT_EQ(1, resp2.updated_widgets().size()); |
429 | + EXPECT_EQ(1u, resp2.updated_widgets().size()); |
430 | EXPECT_EQ("w1", resp2.updated_widgets().begin()->id()); |
431 | } |
432 | } |
433 | |
434 | === modified file 'test/gtest/scopes/Aggregation/ChildScopes_test.cpp' |
435 | --- test/gtest/scopes/Aggregation/ChildScopes_test.cpp 2015-12-18 09:21:53 +0000 |
436 | +++ test/gtest/scopes/Aggregation/ChildScopes_test.cpp 2017-01-16 02:36:15 +0000 |
437 | @@ -26,7 +26,11 @@ |
438 | |
439 | #include <boost/filesystem/operations.hpp> |
440 | #include <fstream> |
441 | + |
442 | +#pragma GCC diagnostic push |
443 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
444 | #include <gtest/gtest.h> |
445 | +#pragma GCC diagnostic pop |
446 | |
447 | using namespace boost; |
448 | using namespace testing; |
449 | @@ -152,7 +156,7 @@ |
450 | |
451 | // 1st TestScope::find_child_scopes() returns: "A,B,C" |
452 | ChildScopeList return_list = test_scope->child_scopes(); |
453 | - ASSERT_EQ(3, return_list.size()); |
454 | + ASSERT_EQ(3u, return_list.size()); |
455 | EXPECT_EQ("ScopeA", return_list[0].id); |
456 | EXPECT_TRUE(return_list[0].enabled); |
457 | EXPECT_EQ("ScopeB", return_list[1].id); |
458 | @@ -168,7 +172,7 @@ |
459 | |
460 | // 2nd TestScope::find_child_scopes() returns: "D,A,B,C,E" |
461 | return_list = test_scope->child_scopes(); |
462 | - ASSERT_EQ(5, return_list.size()); |
463 | + ASSERT_EQ(5u, return_list.size()); |
464 | EXPECT_EQ("ScopeD", return_list[0].id); |
465 | EXPECT_FALSE(return_list[0].enabled); |
466 | EXPECT_EQ("ScopeA", return_list[1].id); |
467 | @@ -182,7 +186,7 @@ |
468 | |
469 | // 3rd+ TestScope::find_child_scopes() returns: "D,A,B" |
470 | return_list = test_scope->child_scopes(); |
471 | - ASSERT_EQ(3, return_list.size()); |
472 | + ASSERT_EQ(3u, return_list.size()); |
473 | EXPECT_EQ("ScopeD", return_list[0].id); |
474 | EXPECT_FALSE(return_list[0].enabled); |
475 | EXPECT_EQ("ScopeA", return_list[1].id); |
476 | @@ -199,7 +203,7 @@ |
477 | |
478 | // 3rd+ TestScope::find_child_scopes() returns: "D,A,B" |
479 | return_list = test_scope->child_scopes(); |
480 | - ASSERT_EQ(3, return_list.size()); |
481 | + ASSERT_EQ(3u, return_list.size()); |
482 | EXPECT_EQ("ScopeD", return_list[0].id); |
483 | EXPECT_TRUE(return_list[0].enabled); |
484 | EXPECT_EQ("ScopeA", return_list[1].id); |
485 | @@ -216,7 +220,7 @@ |
486 | |
487 | // 1st TestScope::find_child_scopes() returns: "A,B,C" |
488 | ChildScopeList return_list = test_scope->child_scopes(); |
489 | - ASSERT_EQ(3, return_list.size()); |
490 | + ASSERT_EQ(3u, return_list.size()); |
491 | EXPECT_EQ("ScopeA", return_list[0].id); |
492 | EXPECT_FALSE(return_list[0].enabled); |
493 | EXPECT_EQ("ScopeB", return_list[1].id); |
494 | @@ -242,7 +246,7 @@ |
495 | |
496 | // 1st TestScope::find_child_scopes() returns: "A,B,C" |
497 | ChildScopeList return_list = test_scope->child_scopes(); |
498 | - ASSERT_EQ(3, return_list.size()); |
499 | + ASSERT_EQ(3u, return_list.size()); |
500 | EXPECT_EQ("ScopeA", return_list[0].id); |
501 | EXPECT_TRUE(return_list[0].enabled); |
502 | EXPECT_EQ("ScopeB", return_list[1].id); |
503 | @@ -263,7 +267,7 @@ |
504 | |
505 | // 1st TestScope::find_child_scopes() returns: "A,B,C" |
506 | ChildScopeList return_list = test_scope->child_scopes(); |
507 | - ASSERT_EQ(3, return_list.size()); |
508 | + ASSERT_EQ(3u, return_list.size()); |
509 | EXPECT_EQ("ScopeA", return_list[0].id); |
510 | EXPECT_TRUE(return_list[0].enabled); |
511 | EXPECT_EQ("ScopeB", return_list[1].id); |
512 | @@ -278,7 +282,7 @@ |
513 | |
514 | // Check that nothing crashes and we simply get the list from the scope as is |
515 | return_list = test_scope->child_scopes(); |
516 | - ASSERT_EQ(3, return_list.size()); |
517 | + ASSERT_EQ(3u, return_list.size()); |
518 | EXPECT_EQ("ScopeA", return_list[0].id); |
519 | EXPECT_TRUE(return_list[0].enabled); |
520 | EXPECT_EQ("ScopeB", return_list[1].id); |
521 | @@ -293,7 +297,7 @@ |
522 | |
523 | // Check that nothing crashes and we simply get the list from the scope as is |
524 | return_list = test_scope->child_scopes(); |
525 | - ASSERT_EQ(3, return_list.size()); |
526 | + ASSERT_EQ(3u, return_list.size()); |
527 | EXPECT_EQ("ScopeA", return_list[0].id); |
528 | EXPECT_TRUE(return_list[0].enabled); |
529 | EXPECT_EQ("ScopeB", return_list[1].id); |
530 | |
531 | === modified file 'test/gtest/scopes/Aggregation/Keywords_test.cpp' |
532 | --- test/gtest/scopes/Aggregation/Keywords_test.cpp 2015-12-18 09:21:53 +0000 |
533 | +++ test/gtest/scopes/Aggregation/Keywords_test.cpp 2017-01-16 02:36:15 +0000 |
534 | @@ -21,7 +21,11 @@ |
535 | #include <unity/scopes/testing/ScopeMetadataBuilder.h> |
536 | |
537 | #include <boost/filesystem/operations.hpp> |
538 | + |
539 | +#pragma GCC diagnostic push |
540 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
541 | #include <gtest/gtest.h> |
542 | +#pragma GCC diagnostic pop |
543 | |
544 | #include "AggTestScope.h" |
545 | |
546 | @@ -157,7 +161,7 @@ |
547 | |
548 | // Should see all scopes' results here as all children are enabled by default |
549 | auto r = receiver->results(); |
550 | - EXPECT_EQ(4, r.size()); |
551 | + EXPECT_EQ(4u, r.size()); |
552 | EXPECT_TRUE(r.find("A") != r.end()); |
553 | EXPECT_TRUE(r.find("B") != r.end()); |
554 | EXPECT_TRUE(r.find("C") != r.end()); |
555 | @@ -178,7 +182,7 @@ |
556 | |
557 | // Should not see scope C's results here as it has been disabled |
558 | r = receiver->results(); |
559 | - EXPECT_EQ(3, r.size()); |
560 | + EXPECT_EQ(3u, r.size()); |
561 | EXPECT_TRUE(r.find("A") != r.end()); |
562 | EXPECT_TRUE(r.find("B") != r.end()); |
563 | EXPECT_TRUE(r.find("D") != r.end()); |
564 | @@ -198,7 +202,7 @@ |
565 | |
566 | // Should not see scope C and D's results here as they are disabled |
567 | r = receiver->results(); |
568 | - EXPECT_EQ(2, r.size()); |
569 | + EXPECT_EQ(2u, r.size()); |
570 | EXPECT_TRUE(r.find("A") != r.end()); |
571 | EXPECT_TRUE(r.find("B") != r.end()); |
572 | |
573 | @@ -217,7 +221,7 @@ |
574 | |
575 | // Should not see scope D's results here as it is still disabled |
576 | r = receiver->results(); |
577 | - EXPECT_EQ(3, r.size()); |
578 | + EXPECT_EQ(3u, r.size()); |
579 | EXPECT_TRUE(r.find("A") != r.end()); |
580 | EXPECT_TRUE(r.find("B") != r.end()); |
581 | EXPECT_TRUE(r.find("C") != r.end()); |
582 | @@ -237,7 +241,7 @@ |
583 | |
584 | // Should see all scopes' results here as all children are enabled again |
585 | r = receiver->results(); |
586 | - EXPECT_EQ(4, r.size()); |
587 | + EXPECT_EQ(4u, r.size()); |
588 | EXPECT_TRUE(r.find("A") != r.end()); |
589 | EXPECT_TRUE(r.find("B") != r.end()); |
590 | EXPECT_TRUE(r.find("C") != r.end()); |
591 | @@ -267,7 +271,7 @@ |
592 | |
593 | // Should see all scopes' results here as all children are enabled by default |
594 | auto r = receiver->results(); |
595 | - EXPECT_EQ(4, r.size()); |
596 | + EXPECT_EQ(4u, r.size()); |
597 | EXPECT_TRUE(r.find("A") != r.end()); |
598 | EXPECT_TRUE(r.find("B") != r.end()); |
599 | EXPECT_TRUE(r.find("C") != r.end()); |
600 | |
601 | === modified file 'test/gtest/scopes/Aggregation/LoopDetection_test.cpp' |
602 | --- test/gtest/scopes/Aggregation/LoopDetection_test.cpp 2015-11-23 10:09:11 +0000 |
603 | +++ test/gtest/scopes/Aggregation/LoopDetection_test.cpp 2017-01-16 02:36:15 +0000 |
604 | @@ -20,7 +20,10 @@ |
605 | #include <unity/scopes/internal/RuntimeImpl.h> |
606 | #include <unity/scopes/SearchMetadata.h> |
607 | |
608 | +#pragma GCC diagnostic push |
609 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
610 | #include <gtest/gtest.h> |
611 | +#pragma GCC diagnostic pop |
612 | |
613 | #include "AggTestScope.h" |
614 | |
615 | @@ -124,7 +127,7 @@ |
616 | receiver->wait_until_finished(); |
617 | |
618 | auto r = receiver->results(); |
619 | - EXPECT_EQ(3, r.size()); |
620 | + EXPECT_EQ(3u, r.size()); |
621 | EXPECT_TRUE(r.find("A") != r.end()); |
622 | EXPECT_TRUE(r.find("B") != r.end()); |
623 | EXPECT_TRUE(r.find("C") != r.end()); |
624 | @@ -141,12 +144,12 @@ |
625 | receiver->wait_until_finished(); |
626 | |
627 | auto r = receiver->results(); |
628 | - EXPECT_EQ(4, r.size()); |
629 | + EXPECT_EQ(4u, r.size()); |
630 | EXPECT_TRUE(r.find("A") != r.end()); |
631 | EXPECT_TRUE(r.find("B") != r.end()); |
632 | EXPECT_TRUE(r.find("C") != r.end()); |
633 | EXPECT_TRUE(r.find("D") != r.end()); |
634 | - EXPECT_EQ(2, r.find("D")->second.size()); // B, and C each forwarded to D, so there must be 2 results. |
635 | + EXPECT_EQ(2u, r.find("D")->second.size()); // B, and C each forwarded to D, so there must be 2 results. |
636 | } |
637 | |
638 | TEST_F(LoopDetectionTest, immediate_loop) |
639 | @@ -157,8 +160,8 @@ |
640 | receiver->wait_until_finished(); |
641 | |
642 | auto r = receiver->results(); |
643 | - EXPECT_EQ(1, r.size()); |
644 | - EXPECT_EQ(3, r.find("A")->second.size()); // "A" has sent the query twice to itself, second attempt stops loop |
645 | + EXPECT_EQ(1u, r.size()); |
646 | + EXPECT_EQ(3u, r.find("A")->second.size()); // "A" has sent the query twice to itself, second attempt stops loop |
647 | } |
648 | |
649 | TEST_F(LoopDetectionTest, intermediate_loop) |
650 | @@ -171,10 +174,10 @@ |
651 | receiver->wait_until_finished(); |
652 | |
653 | auto r = receiver->results(); |
654 | - EXPECT_EQ(3, r.size()); |
655 | - EXPECT_EQ(2, r.find("A")->second.size()); // "A" got results from B and C |
656 | - EXPECT_EQ(2, r.find("B")->second.size()); // "B" got results from C and A |
657 | - EXPECT_EQ(1, r.find("C")->second.size()); // "C" got result from A |
658 | + EXPECT_EQ(3u, r.size()); |
659 | + EXPECT_EQ(2u, r.find("A")->second.size()); // "A" got results from B and C |
660 | + EXPECT_EQ(2u, r.find("B")->second.size()); // "B" got results from C and A |
661 | + EXPECT_EQ(1u, r.find("C")->second.size()); // "C" got result from A |
662 | } |
663 | |
664 | TEST_F(LoopDetectionTest, repeated_search_on_leaf) |
665 | @@ -188,11 +191,11 @@ |
666 | receiver->wait_until_finished(); |
667 | |
668 | auto r = receiver->results(); |
669 | - EXPECT_EQ(4, r.size()); |
670 | - EXPECT_EQ(1, r.find("A")->second.size()); |
671 | - EXPECT_EQ(1, r.find("B")->second.size()); |
672 | - EXPECT_EQ(1, r.find("C")->second.size()); |
673 | - EXPECT_EQ(3, r.find("D")->second.size()); |
674 | + EXPECT_EQ(4u, r.size()); |
675 | + EXPECT_EQ(1u, r.find("A")->second.size()); |
676 | + EXPECT_EQ(1u, r.find("B")->second.size()); |
677 | + EXPECT_EQ(1u, r.find("C")->second.size()); |
678 | + EXPECT_EQ(3u, r.find("D")->second.size()); |
679 | } |
680 | |
681 | TEST_F(LoopDetectionTest, repeated_search_on_aggregator) |
682 | @@ -206,10 +209,10 @@ |
683 | receiver->wait_until_finished(); |
684 | |
685 | auto r = receiver->results(); |
686 | - EXPECT_EQ(3, r.size()); |
687 | - EXPECT_EQ(1, r.find("A")->second.size()); |
688 | - EXPECT_EQ(1, r.find("B")->second.size()); |
689 | - EXPECT_EQ(1, r.find("C")->second.size()); |
690 | + EXPECT_EQ(3u, r.size()); |
691 | + EXPECT_EQ(1u, r.find("A")->second.size()); |
692 | + EXPECT_EQ(1u, r.find("B")->second.size()); |
693 | + EXPECT_EQ(1u, r.find("C")->second.size()); |
694 | } |
695 | |
696 | #pragma GCC diagnostic pop |
697 | |
698 | === modified file 'test/gtest/scopes/Annotation/Annotation_test.cpp' |
699 | --- test/gtest/scopes/Annotation/Annotation_test.cpp 2014-11-18 07:04:04 +0000 |
700 | +++ test/gtest/scopes/Annotation/Annotation_test.cpp 2017-01-16 02:36:15 +0000 |
701 | @@ -16,7 +16,11 @@ |
702 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
703 | */ |
704 | |
705 | +#pragma GCC diagnostic push |
706 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
707 | #include <gtest/gtest.h> |
708 | +#pragma GCC diagnostic pop |
709 | + |
710 | #include <unity/scopes/Annotation.h> |
711 | #include <unity/scopes/CannedQuery.h> |
712 | #include <unity/scopes/internal/CannedQueryImpl.h> |
713 | |
714 | === modified file 'test/gtest/scopes/CannedQuery/CannedQuery_test.cpp' |
715 | --- test/gtest/scopes/CannedQuery/CannedQuery_test.cpp 2015-02-27 09:43:40 +0000 |
716 | +++ test/gtest/scopes/CannedQuery/CannedQuery_test.cpp 2017-01-16 02:36:15 +0000 |
717 | @@ -16,7 +16,11 @@ |
718 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
719 | */ |
720 | |
721 | +#pragma GCC diagnostic push |
722 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
723 | #include <gtest/gtest.h> |
724 | +#pragma GCC diagnostic pop |
725 | + |
726 | #include <unity/scopes/CannedQuery.h> |
727 | #include <unity/scopes/internal/CannedQueryImpl.h> |
728 | #include <unity/scopes/OptionSelectorFilter.h> |
729 | @@ -278,7 +282,7 @@ |
730 | filter->add_option("o1", "Option 1"); |
731 | filter->add_option("o2", "Option 2"); |
732 | auto actopts = filter->active_options(fstate); |
733 | - EXPECT_EQ(1, actopts.size()); |
734 | + EXPECT_EQ(1u, actopts.size()); |
735 | EXPECT_EQ("o1", (*(actopts.begin()))->id()); |
736 | } |
737 | { |
738 | |
739 | === modified file 'test/gtest/scopes/CategorisedResult/CategorisedResult_test.cpp' |
740 | --- test/gtest/scopes/CategorisedResult/CategorisedResult_test.cpp 2015-07-15 15:49:05 +0000 |
741 | +++ test/gtest/scopes/CategorisedResult/CategorisedResult_test.cpp 2017-01-16 02:36:15 +0000 |
742 | @@ -23,7 +23,11 @@ |
743 | #include <unity/scopes/internal/ReplyObject.h> |
744 | #include <unity/scopes/internal/CategorisedResultImpl.h> |
745 | #include <unity/UnityExceptions.h> |
746 | + |
747 | +#pragma GCC diagnostic push |
748 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
749 | #include <gtest/gtest.h> |
750 | +#pragma GCC diagnostic pop |
751 | |
752 | using namespace unity::scopes; |
753 | using namespace unity::scopes::internal; |
754 | |
755 | === modified file 'test/gtest/scopes/Category/Category_test.cpp' |
756 | --- test/gtest/scopes/Category/Category_test.cpp 2014-07-02 09:36:34 +0000 |
757 | +++ test/gtest/scopes/Category/Category_test.cpp 2017-01-16 02:36:15 +0000 |
758 | @@ -21,7 +21,10 @@ |
759 | #include <unity/UnityExceptions.h> |
760 | #include <unity/scopes/Variant.h> |
761 | |
762 | +#pragma GCC diagnostic push |
763 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
764 | #include <gtest/gtest.h> |
765 | +#pragma GCC diagnostic pop |
766 | |
767 | using namespace std; |
768 | using namespace unity; |
769 | |
770 | === modified file 'test/gtest/scopes/CategoryRenderer/CategoryRenderer_test.cpp' |
771 | --- test/gtest/scopes/CategoryRenderer/CategoryRenderer_test.cpp 2014-07-07 23:53:36 +0000 |
772 | +++ test/gtest/scopes/CategoryRenderer/CategoryRenderer_test.cpp 2017-01-16 02:36:15 +0000 |
773 | @@ -19,7 +19,11 @@ |
774 | #include <unity/scopes/CategoryRenderer.h> |
775 | #include <unity/UnityExceptions.h> |
776 | #include <fstream> |
777 | + |
778 | +#pragma GCC diagnostic push |
779 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
780 | #include <gtest/gtest.h> |
781 | +#pragma GCC diagnostic pop |
782 | |
783 | using namespace unity::scopes; |
784 | using namespace unity::scopes::internal; |
785 | |
786 | === modified file 'test/gtest/scopes/ColumnLayout/ColumnLayout_test.cpp' |
787 | --- test/gtest/scopes/ColumnLayout/ColumnLayout_test.cpp 2014-02-25 12:08:41 +0000 |
788 | +++ test/gtest/scopes/ColumnLayout/ColumnLayout_test.cpp 2017-01-16 02:36:15 +0000 |
789 | @@ -19,7 +19,11 @@ |
790 | #include <unity/scopes/ColumnLayout.h> |
791 | #include <unity/scopes/internal/ColumnLayoutImpl.h> |
792 | #include <unity/UnityExceptions.h> |
793 | + |
794 | +#pragma GCC diagnostic push |
795 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
796 | #include <gtest/gtest.h> |
797 | +#pragma GCC diagnostic pop |
798 | |
799 | using namespace unity::scopes; |
800 | using namespace unity::scopes::internal; |
801 | |
802 | === modified file 'test/gtest/scopes/DateTimePickerFilter/DateTimePickerFilter_test.cpp' |
803 | --- test/gtest/scopes/DateTimePickerFilter/DateTimePickerFilter_test.cpp 2015-11-12 12:45:41 +0000 |
804 | +++ test/gtest/scopes/DateTimePickerFilter/DateTimePickerFilter_test.cpp 2017-01-16 02:36:15 +0000 |
805 | @@ -16,7 +16,11 @@ |
806 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
807 | */ |
808 | |
809 | +#pragma GCC diagnostic push |
810 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
811 | #include <gtest/gtest.h> |
812 | +#pragma GCC diagnostic pop |
813 | + |
814 | #include <unity/scopes/FilterState.h> |
815 | #include <unity/scopes/DateTimePickerFilter.h> |
816 | #include <unity/scopes/internal/DateTimePickerFilterImpl.h> |
817 | |
818 | === modified file 'test/gtest/scopes/Department/Department_test.cpp' |
819 | --- test/gtest/scopes/Department/Department_test.cpp 2014-05-28 13:52:22 +0000 |
820 | +++ test/gtest/scopes/Department/Department_test.cpp 2017-01-16 02:36:15 +0000 |
821 | @@ -20,7 +20,11 @@ |
822 | #include <unity/scopes/internal/DepartmentImpl.h> |
823 | #include <unity/scopes/CannedQuery.h> |
824 | #include <unity/UnityExceptions.h> |
825 | + |
826 | +#pragma GCC diagnostic push |
827 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
828 | #include <gtest/gtest.h> |
829 | +#pragma GCC diagnostic pop |
830 | |
831 | using namespace unity::scopes; |
832 | using namespace unity::scopes::internal; |
833 | |
834 | === modified file 'test/gtest/scopes/Filters/Filters_test.cpp' |
835 | --- test/gtest/scopes/Filters/Filters_test.cpp 2016-06-14 14:54:15 +0000 |
836 | +++ test/gtest/scopes/Filters/Filters_test.cpp 2017-01-16 02:36:15 +0000 |
837 | @@ -31,8 +31,12 @@ |
838 | #include <unity/scopes/ValueSliderLabels.h> |
839 | #include <unity/scopes/SearchMetadata.h> |
840 | #include <unity/UnityExceptions.h> |
841 | +#include <TestScope.h> |
842 | + |
843 | +#pragma GCC diagnostic push |
844 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
845 | #include <gtest/gtest.h> |
846 | -#include <TestScope.h> |
847 | +#pragma GCC diagnostic pop |
848 | |
849 | using namespace unity::scopes; |
850 | using namespace unity::scopes::experimental; |
851 | |
852 | === modified file 'test/gtest/scopes/IdleShutdown/IdleShutdown_test.cpp' |
853 | --- test/gtest/scopes/IdleShutdown/IdleShutdown_test.cpp 2015-01-09 03:16:51 +0000 |
854 | +++ test/gtest/scopes/IdleShutdown/IdleShutdown_test.cpp 2017-01-16 02:36:15 +0000 |
855 | @@ -21,7 +21,11 @@ |
856 | #include <unity/scopes/internal/RuntimeImpl.h> |
857 | #include <unity/scopes/internal/ScopeImpl.h> |
858 | |
859 | + |
860 | +#pragma GCC diagnostic push |
861 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
862 | #include <gtest/gtest.h> |
863 | +#pragma GCC diagnostic pop |
864 | |
865 | #include "SlowSearchScope.h" |
866 | |
867 | |
868 | === modified file 'test/gtest/scopes/Invocation/Invocation_test.cpp' |
869 | --- test/gtest/scopes/Invocation/Invocation_test.cpp 2015-01-09 03:16:51 +0000 |
870 | +++ test/gtest/scopes/Invocation/Invocation_test.cpp 2017-01-16 02:36:15 +0000 |
871 | @@ -30,7 +30,10 @@ |
872 | |
873 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
874 | |
875 | +#pragma GCC diagnostic push |
876 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
877 | #include <gtest/gtest.h> |
878 | +#pragma GCC diagnostic pop |
879 | |
880 | #include "EmptyScope.h" |
881 | #include "TestScope.h" |
882 | |
883 | === modified file 'test/gtest/scopes/Location/Location_test.cpp' |
884 | --- test/gtest/scopes/Location/Location_test.cpp 2015-03-06 07:56:37 +0000 |
885 | +++ test/gtest/scopes/Location/Location_test.cpp 2017-01-16 02:36:15 +0000 |
886 | @@ -18,8 +18,12 @@ |
887 | |
888 | #include <unity/scopes/ScopeExceptions.h> |
889 | #include <unity/scopes/Location.h> |
890 | +#include <unity/UnityExceptions.h> |
891 | + |
892 | +#pragma GCC diagnostic push |
893 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
894 | #include <gtest/gtest.h> |
895 | -#include <unity/UnityExceptions.h> |
896 | +#pragma GCC diagnostic pop |
897 | |
898 | using namespace unity; |
899 | using namespace unity::scopes; |
900 | |
901 | === modified file 'test/gtest/scopes/OnlineAccountClient/OnlineAccountClient_test.cpp' |
902 | --- test/gtest/scopes/OnlineAccountClient/OnlineAccountClient_test.cpp 2016-03-16 09:52:22 +0000 |
903 | +++ test/gtest/scopes/OnlineAccountClient/OnlineAccountClient_test.cpp 2017-01-16 02:36:15 +0000 |
904 | @@ -28,11 +28,15 @@ |
905 | #include <boost/filesystem/operations.hpp> |
906 | #include <condition_variable> |
907 | #include <functional> |
908 | -#include <gtest/gtest.h> |
909 | #include <libaccounts-glib/accounts-glib.h> |
910 | #include <libdbustest/dbus-test.h> |
911 | #include <thread> |
912 | |
913 | +#pragma GCC diagnostic push |
914 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
915 | +#include <gtest/gtest.h> |
916 | +#pragma GCC diagnostic pop |
917 | + |
918 | using namespace unity; |
919 | using namespace unity::scopes; |
920 | using namespace unity::scopes::testing; |
921 | @@ -421,13 +425,13 @@ |
922 | TEST_F(OnlineAccountClientTest, refresh_services_main_loop) |
923 | { |
924 | auto statuses = oa_client()->get_service_statuses(); |
925 | - EXPECT_EQ(0, statuses.size()); |
926 | + EXPECT_EQ(0u, statuses.size()); |
927 | |
928 | create_account(); |
929 | oa_client()->refresh_service_statuses(); |
930 | |
931 | statuses = oa_client()->get_service_statuses(); |
932 | - EXPECT_EQ(1, statuses.size()); |
933 | + EXPECT_EQ(1u, statuses.size()); |
934 | EXPECT_FALSE(statuses[0].service_enabled); |
935 | |
936 | enable_service(); |
937 | @@ -464,7 +468,7 @@ |
938 | oa_client()->refresh_service_statuses(); |
939 | |
940 | statuses = oa_client()->get_service_statuses(); |
941 | - EXPECT_EQ(0, statuses.size()); |
942 | + EXPECT_EQ(0u, statuses.size()); |
943 | } |
944 | |
945 | TEST_F(OnlineAccountClientTest, service_update_callback) |
946 | |
947 | === modified file 'test/gtest/scopes/OptionSelectorFilter/OptionSelectorFilter_test.cpp' |
948 | --- test/gtest/scopes/OptionSelectorFilter/OptionSelectorFilter_test.cpp 2016-03-09 12:06:02 +0000 |
949 | +++ test/gtest/scopes/OptionSelectorFilter/OptionSelectorFilter_test.cpp 2017-01-16 02:36:15 +0000 |
950 | @@ -16,7 +16,12 @@ |
951 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
952 | */ |
953 | |
954 | + |
955 | +#pragma GCC diagnostic push |
956 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
957 | #include <gtest/gtest.h> |
958 | +#pragma GCC diagnostic pop |
959 | + |
960 | #include <unity/scopes/FilterState.h> |
961 | #include <unity/scopes/OptionSelectorFilter.h> |
962 | #include <unity/scopes/internal/OptionSelectorFilterImpl.h> |
963 | |
964 | === modified file 'test/gtest/scopes/PreviewWidget/PreviewWidget_test.cpp' |
965 | --- test/gtest/scopes/PreviewWidget/PreviewWidget_test.cpp 2014-08-29 14:11:24 +0000 |
966 | +++ test/gtest/scopes/PreviewWidget/PreviewWidget_test.cpp 2017-01-16 02:36:15 +0000 |
967 | @@ -21,7 +21,11 @@ |
968 | #include <unity/UnityExceptions.h> |
969 | #include <unity/scopes/Variant.h> |
970 | #include <unity/scopes/internal/JsonCppNode.h> |
971 | + |
972 | +#pragma GCC diagnostic push |
973 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
974 | #include <gtest/gtest.h> |
975 | +#pragma GCC diagnostic pop |
976 | |
977 | using namespace unity::scopes; |
978 | using namespace unity::scopes::internal; |
979 | |
980 | === modified file 'test/gtest/scopes/QueryMetadata/QueryMetadata_test.cpp' |
981 | --- test/gtest/scopes/QueryMetadata/QueryMetadata_test.cpp 2015-10-29 06:24:06 +0000 |
982 | +++ test/gtest/scopes/QueryMetadata/QueryMetadata_test.cpp 2017-01-16 02:36:15 +0000 |
983 | @@ -21,8 +21,12 @@ |
984 | #include <unity/scopes/ActionMetadata.h> |
985 | #include <unity/scopes/internal/ActionMetadataImpl.h> |
986 | #include <unity/scopes/internal/SearchMetadataImpl.h> |
987 | +#include <unity/UnityExceptions.h> |
988 | + |
989 | +#pragma GCC diagnostic push |
990 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
991 | #include <gtest/gtest.h> |
992 | -#include <unity/UnityExceptions.h> |
993 | +#pragma GCC diagnostic pop |
994 | |
995 | using namespace unity; |
996 | using namespace unity::scopes; |
997 | |
998 | === modified file 'test/gtest/scopes/RadioButtonsFilter/RadioButtonsFilter_test.cpp' |
999 | --- test/gtest/scopes/RadioButtonsFilter/RadioButtonsFilter_test.cpp 2015-11-12 12:45:41 +0000 |
1000 | +++ test/gtest/scopes/RadioButtonsFilter/RadioButtonsFilter_test.cpp 2017-01-16 02:36:15 +0000 |
1001 | @@ -16,7 +16,11 @@ |
1002 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
1003 | */ |
1004 | |
1005 | +#pragma GCC diagnostic push |
1006 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1007 | #include <gtest/gtest.h> |
1008 | +#pragma GCC diagnostic pop |
1009 | + |
1010 | #include <unity/scopes/FilterState.h> |
1011 | #include <unity/scopes/RadioButtonsFilter.h> |
1012 | #include <unity/UnityExceptions.h> |
1013 | |
1014 | === modified file 'test/gtest/scopes/RangeInputFilter/RangeInputFilter_test.cpp' |
1015 | --- test/gtest/scopes/RangeInputFilter/RangeInputFilter_test.cpp 2016-03-09 11:33:52 +0000 |
1016 | +++ test/gtest/scopes/RangeInputFilter/RangeInputFilter_test.cpp 2017-01-16 02:36:15 +0000 |
1017 | @@ -16,7 +16,11 @@ |
1018 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
1019 | */ |
1020 | |
1021 | +#pragma GCC diagnostic push |
1022 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1023 | #include <gtest/gtest.h> |
1024 | +#pragma GCC diagnostic pop |
1025 | + |
1026 | #include <cmath> |
1027 | #include <unity/scopes/FilterState.h> |
1028 | #include <unity/scopes/RangeInputFilter.h> |
1029 | |
1030 | === modified file 'test/gtest/scopes/RatingFilter/RatingFilter_test.cpp' |
1031 | --- test/gtest/scopes/RatingFilter/RatingFilter_test.cpp 2014-06-17 10:30:03 +0000 |
1032 | +++ test/gtest/scopes/RatingFilter/RatingFilter_test.cpp 2017-01-16 02:36:15 +0000 |
1033 | @@ -16,7 +16,12 @@ |
1034 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
1035 | */ |
1036 | |
1037 | + |
1038 | +#pragma GCC diagnostic push |
1039 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1040 | #include <gtest/gtest.h> |
1041 | +#pragma GCC diagnostic pop |
1042 | + |
1043 | #include <unity/scopes/FilterState.h> |
1044 | #include <unity/scopes/RatingFilter.h> |
1045 | #include <unity/UnityExceptions.h> |
1046 | |
1047 | === modified file 'test/gtest/scopes/Registry/Registry_test.cpp' |
1048 | --- test/gtest/scopes/Registry/Registry_test.cpp 2016-03-31 09:27:33 +0000 |
1049 | +++ test/gtest/scopes/Registry/Registry_test.cpp 2017-01-16 02:36:15 +0000 |
1050 | @@ -24,7 +24,11 @@ |
1051 | #include <unity/scopes/SearchMetadata.h> |
1052 | |
1053 | #include <boost/filesystem/operations.hpp> |
1054 | + |
1055 | +#pragma GCC diagnostic push |
1056 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1057 | #include <gtest/gtest.h> |
1058 | +#pragma GCC diagnostic pop |
1059 | |
1060 | #include <chrono> |
1061 | #include <condition_variable> |
1062 | @@ -79,6 +83,12 @@ |
1063 | std::condition_variable cond_; |
1064 | }; |
1065 | |
1066 | +TEST(Registry, desktop_dir_does_not_exist) |
1067 | +{ |
1068 | + // Directory does not exist to start with. |
1069 | + EXPECT_FALSE(filesystem::is_directory(TEST_RUNTIME_PATH "/applications")); |
1070 | +} |
1071 | + |
1072 | TEST(Registry, metadata) |
1073 | { |
1074 | Runtime::UPtr rt = Runtime::create(TEST_RUNTIME_FILE); |
1075 | @@ -96,7 +106,7 @@ |
1076 | EXPECT_EQ("scope-A.SearchHint", meta.search_hint()); |
1077 | EXPECT_EQ(TEST_RUNTIME_PATH "/scopes/testscopeA", meta.scope_directory()); |
1078 | auto defs = meta.settings_definitions(); |
1079 | - ASSERT_EQ(2, defs.size()); |
1080 | + ASSERT_EQ(2u, defs.size()); |
1081 | EXPECT_EQ("locationSetting", defs[0].get_dict()["id"].get_string()); |
1082 | EXPECT_EQ("Location", defs[0].get_dict()["displayName"].get_string()); |
1083 | EXPECT_EQ("string", defs[0].get_dict()["type"].get_string()); |
1084 | @@ -144,14 +154,20 @@ |
1085 | EXPECT_EQ("scope-B.SearchHint", meta.search_hint()); |
1086 | EXPECT_EQ(TEST_RUNTIME_PATH "/scopes/testscopeB", meta.scope_directory()); |
1087 | defs = meta.settings_definitions(); |
1088 | - EXPECT_EQ(0, defs.size()); |
1089 | + EXPECT_EQ(0u, defs.size()); |
1090 | EXPECT_FALSE(meta.location_data_needed()); |
1091 | - EXPECT_EQ(0, meta.child_scope_ids().size()); |
1092 | - EXPECT_EQ(0, meta.keywords().size()); |
1093 | + EXPECT_EQ(0u, meta.child_scope_ids().size()); |
1094 | + EXPECT_EQ(0u, meta.keywords().size()); |
1095 | EXPECT_EQ(0, meta.version()); |
1096 | EXPECT_FALSE(meta.is_aggregator()); |
1097 | } |
1098 | |
1099 | +TEST(Registry, desktop_dir_exists) |
1100 | +{ |
1101 | + // Directory must have been created. |
1102 | + EXPECT_TRUE(filesystem::is_directory(TEST_RUNTIME_PATH "/applications")); |
1103 | +} |
1104 | + |
1105 | auto const wait_for_update_time = std::chrono::milliseconds(5000); |
1106 | |
1107 | TEST(Registry, scope_state_notify) |
1108 | @@ -211,7 +227,7 @@ |
1109 | |
1110 | auto meta = r->get_metadata("testscopeA"); |
1111 | auto defs = meta.settings_definitions(); |
1112 | - EXPECT_EQ(2, defs.size()); |
1113 | + EXPECT_EQ(2u, defs.size()); |
1114 | auto sp = meta.proxy(); |
1115 | |
1116 | // testscopeA should not be running at this point |
1117 | @@ -228,7 +244,7 @@ |
1118 | |
1119 | meta = r->get_metadata("testscopeB"); |
1120 | defs = meta.settings_definitions(); |
1121 | - EXPECT_EQ(0, defs.size()); |
1122 | + EXPECT_EQ(0u, defs.size()); |
1123 | sp = meta.proxy(); |
1124 | |
1125 | // testscopeB should not be running at this point |
1126 | @@ -478,7 +494,7 @@ |
1127 | |
1128 | // First check that we have 2 scopes registered |
1129 | MetadataMap list = r->list(); |
1130 | - EXPECT_EQ(2, list.size()); |
1131 | + EXPECT_EQ(2u, list.size()); |
1132 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1133 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1134 | EXPECT_EQ(list.end(), list.find("testscopeC")); |
1135 | @@ -496,7 +512,7 @@ |
1136 | |
1137 | // Now check that we have 3 scopes registered |
1138 | list = r->list(); |
1139 | - EXPECT_EQ(3, list.size()); |
1140 | + EXPECT_EQ(3u, list.size()); |
1141 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1142 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1143 | EXPECT_NE(list.end(), list.find("testscopeC")); |
1144 | @@ -540,7 +556,7 @@ |
1145 | |
1146 | // First check that we have 2 scopes registered |
1147 | MetadataMap list = r->list(); |
1148 | - EXPECT_EQ(2, list.size()); |
1149 | + EXPECT_EQ(2u, list.size()); |
1150 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1151 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1152 | EXPECT_EQ(list.end(), list.find("testscopeC")); |
1153 | @@ -559,7 +575,7 @@ |
1154 | |
1155 | // Now check that we have 3 scopes registered |
1156 | list = r->list(); |
1157 | - EXPECT_EQ(3, list.size()); |
1158 | + EXPECT_EQ(3u, list.size()); |
1159 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1160 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1161 | EXPECT_NE(list.end(), list.find("testscopeC")); |
1162 | @@ -617,7 +633,7 @@ |
1163 | |
1164 | // Now check that we have 3 scopes registered again |
1165 | list = r->list(); |
1166 | - EXPECT_EQ(3, list.size()); |
1167 | + EXPECT_EQ(3u, list.size()); |
1168 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1169 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1170 | EXPECT_EQ(list.end(), list.find("testscopeC")); |
1171 | @@ -632,7 +648,7 @@ |
1172 | |
1173 | // Now check that we are back to having 2 scopes registered |
1174 | list = r->list(); |
1175 | - EXPECT_EQ(2, list.size()); |
1176 | + EXPECT_EQ(2u, list.size()); |
1177 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1178 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1179 | EXPECT_EQ(list.end(), list.find("testscopeC")); |
1180 | @@ -645,7 +661,7 @@ |
1181 | |
1182 | // Check that no scopes were registered |
1183 | list = r->list(); |
1184 | - EXPECT_EQ(2, list.size()); |
1185 | + EXPECT_EQ(2u, list.size()); |
1186 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1187 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1188 | EXPECT_EQ(list.end(), list.find("testscopeC")); |
1189 | @@ -660,7 +676,7 @@ |
1190 | |
1191 | // Now check that we have 3 scopes registered |
1192 | list = r->list(); |
1193 | - EXPECT_EQ(3, list.size()); |
1194 | + EXPECT_EQ(3u, list.size()); |
1195 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1196 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1197 | EXPECT_NE(list.end(), list.find("testscopeC")); |
1198 | @@ -675,7 +691,7 @@ |
1199 | |
1200 | // Now check that we are back to having 2 scopes registered |
1201 | list = r->list(); |
1202 | - EXPECT_EQ(2, list.size()); |
1203 | + EXPECT_EQ(2u, list.size()); |
1204 | EXPECT_NE(list.end(), list.find("testscopeA")); |
1205 | EXPECT_NE(list.end(), list.find("testscopeB")); |
1206 | EXPECT_EQ(list.end(), list.find("testscopeC")); |
1207 | @@ -690,6 +706,7 @@ |
1208 | |
1209 | // Unlink in case we left the link behind from an earlier interrupted run. |
1210 | system::error_code ec; |
1211 | + filesystem::remove_all(TEST_RUNTIME_PATH "/applications", ec); |
1212 | filesystem::remove_all(TEST_RUNTIME_PATH "/scopes/testscopeC", ec); |
1213 | filesystem::remove_all(TEST_RUNTIME_PATH "/click",ec); |
1214 | filesystem::remove(TEST_RUNTIME_PATH "/scopes/testscopeD", ec); |
1215 | @@ -697,7 +714,7 @@ |
1216 | filesystem::remove(TEST_RUNTIME_PATH "/scopes/testscopeB/testscopeB-settings.ini", ec); |
1217 | |
1218 | // Set the "TEST_DESKTOP_FILES_DIR" env var before forking as not to create desktop files in ~/.local |
1219 | - putenv(const_cast<char*>("TEST_DESKTOP_FILES_DIR=" TEST_RUNTIME_PATH)); |
1220 | + putenv(const_cast<char*>("TEST_DESKTOP_FILES_DIR=" TEST_RUNTIME_PATH "/applications")); |
1221 | |
1222 | auto rpid = fork(); |
1223 | if (rpid == 0) |
1224 | |
1225 | === modified file 'test/gtest/scopes/ReplyReaper/NoReplyScope.cpp' |
1226 | --- test/gtest/scopes/ReplyReaper/NoReplyScope.cpp 2014-07-29 05:50:14 +0000 |
1227 | +++ test/gtest/scopes/ReplyReaper/NoReplyScope.cpp 2017-01-16 02:36:15 +0000 |
1228 | @@ -22,7 +22,10 @@ |
1229 | |
1230 | #include <thread> |
1231 | |
1232 | +#pragma GCC diagnostic push |
1233 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1234 | #include <gtest/gtest.h> |
1235 | +#pragma GCC diagnostic pop |
1236 | |
1237 | using namespace std; |
1238 | using namespace unity::scopes; |
1239 | |
1240 | === modified file 'test/gtest/scopes/ReplyReaper/ReplyReaper_test.cpp' |
1241 | --- test/gtest/scopes/ReplyReaper/ReplyReaper_test.cpp 2015-01-09 03:16:51 +0000 |
1242 | +++ test/gtest/scopes/ReplyReaper/ReplyReaper_test.cpp 2017-01-16 02:36:15 +0000 |
1243 | @@ -21,7 +21,11 @@ |
1244 | #include <unity/scopes/internal/ScopeImpl.h> |
1245 | |
1246 | #include <boost/algorithm/string.hpp> |
1247 | + |
1248 | +#pragma GCC diagnostic push |
1249 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1250 | #include <gtest/gtest.h> |
1251 | +#pragma GCC diagnostic pop |
1252 | |
1253 | #include "NoReplyScope.h" |
1254 | #include <stdexcept> |
1255 | |
1256 | === modified file 'test/gtest/scopes/ResultCache/ResultCache_test.cpp' |
1257 | --- test/gtest/scopes/ResultCache/ResultCache_test.cpp 2016-06-14 14:54:15 +0000 |
1258 | +++ test/gtest/scopes/ResultCache/ResultCache_test.cpp 2017-01-16 02:36:15 +0000 |
1259 | @@ -23,7 +23,12 @@ |
1260 | #include <unity/scopes/OptionSelectorFilter.h> |
1261 | |
1262 | #include <boost/filesystem.hpp> |
1263 | + |
1264 | +#pragma GCC diagnostic push |
1265 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1266 | #include <gtest/gtest.h> |
1267 | +#pragma GCC diagnostic pop |
1268 | + |
1269 | #include <cstdint> |
1270 | |
1271 | #include "CacheScope.h" |
1272 | @@ -145,7 +150,7 @@ |
1273 | receiver->wait_until_finished(); |
1274 | |
1275 | auto r = receiver->result(); |
1276 | - EXPECT_EQ(r, nullptr); |
1277 | + EXPECT_EQ(nullptr, r); |
1278 | } |
1279 | |
1280 | TEST_F(CacheScopeTest, non_surfacing_query) |
1281 | @@ -157,11 +162,11 @@ |
1282 | receiver->wait_until_finished(); |
1283 | |
1284 | auto r = receiver->result(); |
1285 | - EXPECT_EQ(r->title(), "some query"); |
1286 | + EXPECT_EQ("some query", r->title()); |
1287 | auto d = receiver->dept(); |
1288 | - EXPECT_EQ(d->id(), ""); |
1289 | + EXPECT_EQ("", d->id()); |
1290 | auto sd = *d->subdepartments().begin(); |
1291 | - EXPECT_EQ(sd->id(), "subsome query"); |
1292 | + EXPECT_EQ("subsome query", sd->id()); |
1293 | |
1294 | // Non-empty query, so there must be no cache file. |
1295 | boost::system::error_code ec; |
1296 | @@ -181,13 +186,13 @@ |
1297 | receiver->wait_until_finished(); |
1298 | |
1299 | auto r = receiver->result(); |
1300 | - EXPECT_EQ(r->title(), ""); |
1301 | - EXPECT_EQ(r->value("int64value").get_int64_t(), 1); |
1302 | - EXPECT_EQ(r->value("int64value2").get_int64_t(), INT64_MAX); |
1303 | + EXPECT_EQ("", r->title()); |
1304 | + EXPECT_EQ(1, r->value("int64value").get_int64_t()); |
1305 | + EXPECT_EQ(INT64_MAX, r->value("int64value2").get_int64_t()); |
1306 | auto d = receiver->dept(); |
1307 | - EXPECT_EQ(d->id(), ""); |
1308 | + EXPECT_EQ("", d->id()); |
1309 | auto sd = *d->subdepartments().begin(); |
1310 | - EXPECT_EQ(sd->id(), "sub"); |
1311 | + EXPECT_EQ("sub", sd->id()); |
1312 | |
1313 | // Empty query, so there must be a cache file. |
1314 | boost::system::error_code ec; |
1315 | @@ -207,11 +212,11 @@ |
1316 | receiver->wait_until_finished(); |
1317 | |
1318 | auto r = receiver->result(); |
1319 | - EXPECT_EQ(r->title(), "some other query"); |
1320 | + EXPECT_EQ("some other query", r->title()); |
1321 | auto d = receiver->dept(); |
1322 | - EXPECT_EQ(d->id(), ""); |
1323 | + EXPECT_EQ("", d->id()); |
1324 | auto sd = *d->subdepartments().begin(); |
1325 | - EXPECT_EQ(sd->id(), "subsome other query"); |
1326 | + EXPECT_EQ("subsome other query", sd->id()); |
1327 | |
1328 | // Cache file must still be there. |
1329 | boost::system::error_code ec; |
1330 | @@ -225,15 +230,15 @@ |
1331 | receiver->wait_until_finished(); |
1332 | |
1333 | auto r = receiver->result(); |
1334 | - EXPECT_EQ(r->title(), ""); |
1335 | - EXPECT_EQ(r->value("int64value").get_int(), 1); |
1336 | - EXPECT_EQ(r->value("int64value2").get_int64_t(), INT64_MAX); |
1337 | + EXPECT_EQ("", r->title()); |
1338 | + EXPECT_EQ(1, r->value("int64value").get_int()); |
1339 | + EXPECT_EQ(INT64_MAX, r->value("int64value2").get_int64_t()); |
1340 | auto d = receiver->dept(); |
1341 | - EXPECT_EQ(d->id(), ""); |
1342 | + EXPECT_EQ("", d->id()); |
1343 | auto sd = *d->subdepartments().begin(); |
1344 | - EXPECT_EQ(sd->id(), "sub"); |
1345 | + EXPECT_EQ("sub", sd->id()); |
1346 | auto filters = receiver->filters(); |
1347 | - ASSERT_EQ(1, filters.size()); |
1348 | + ASSERT_EQ(1u, filters.size()); |
1349 | auto f = *filters.begin(); |
1350 | EXPECT_EQ("option_selector", f->filter_type()); |
1351 | EXPECT_EQ(nullptr, f->filter_group()); |
1352 | @@ -262,15 +267,15 @@ |
1353 | |
1354 | auto r = receiver->result(); |
1355 | ASSERT_TRUE(r != nullptr); |
1356 | - EXPECT_EQ(r->title(), ""); |
1357 | - EXPECT_EQ(r->value("int64value").get_int(), 1); |
1358 | - EXPECT_EQ(r->value("int64value2").get_int64_t(), INT64_MAX); |
1359 | + EXPECT_EQ("", r->title()); |
1360 | + EXPECT_EQ(1, r->value("int64value").get_int()); |
1361 | + EXPECT_EQ(INT64_MAX, r->value("int64value2").get_int64_t()); |
1362 | auto d = receiver->dept(); |
1363 | - EXPECT_EQ(d->id(), ""); |
1364 | + EXPECT_EQ("", d->id()); |
1365 | auto sd = *d->subdepartments().begin(); |
1366 | - EXPECT_EQ(sd->id(), "sub"); |
1367 | + EXPECT_EQ("sub", sd->id()); |
1368 | auto filters = receiver->filters(); |
1369 | - ASSERT_EQ(1, filters.size()); |
1370 | + ASSERT_EQ(1u, filters.size()); |
1371 | auto f = *filters.begin(); |
1372 | EXPECT_EQ("option_selector", f->filter_type()); |
1373 | ASSERT_TRUE(f->filter_group() != nullptr); |
1374 | @@ -317,14 +322,14 @@ |
1375 | receiver->wait_until_finished(); |
1376 | |
1377 | auto r = receiver->result(); |
1378 | - EXPECT_EQ(r->title(), ""); |
1379 | - EXPECT_EQ(r->value("int64value").get_int64_t(), 1); |
1380 | + EXPECT_EQ("", r->title()); |
1381 | + EXPECT_EQ(1, r->value("int64value").get_int64_t()); |
1382 | auto d = receiver->dept(); |
1383 | - EXPECT_EQ(d->id(), ""); |
1384 | + EXPECT_EQ("", d->id()); |
1385 | auto sd = *d->subdepartments().begin(); |
1386 | - EXPECT_EQ(sd->id(), "sub"); |
1387 | + EXPECT_EQ("sub", sd->id()); |
1388 | auto filters = receiver->filters(); |
1389 | - ASSERT_EQ(1, filters.size()); |
1390 | + ASSERT_EQ(1u, filters.size()); |
1391 | auto f = *filters.begin(); |
1392 | EXPECT_EQ("option_selector", f->filter_type()); |
1393 | auto osf = dynamic_pointer_cast<OptionSelectorFilter const>(f); |
1394 | @@ -342,7 +347,7 @@ |
1395 | auto receiver = make_shared<Receiver>(); |
1396 | scope()->search("", SearchMetadata("unused", "unused"), receiver); |
1397 | receiver->wait_until_finished(); |
1398 | - EXPECT_EQ(receiver->result(), nullptr); |
1399 | + EXPECT_EQ(nullptr, receiver->result()); |
1400 | ::chmod(TEST_RUNTIME_PATH "/unconfined/CacheScope/.surfacing_cache", 0600); |
1401 | |
1402 | // Cache file must still be there, but read will have failed. |
1403 | @@ -362,7 +367,7 @@ |
1404 | auto receiver = make_shared<Receiver>(); |
1405 | scope()->search("", SearchMetadata("unused", "unused"), receiver); |
1406 | receiver->wait_until_finished(); |
1407 | - EXPECT_EQ(receiver->result(), nullptr); |
1408 | + EXPECT_EQ(nullptr, receiver->result()); |
1409 | |
1410 | // Cache file must still be there, but decode will have failed. |
1411 | boost::system::error_code ec; |
1412 | @@ -376,7 +381,7 @@ |
1413 | auto receiver = make_shared<Receiver>(); |
1414 | scope()->search("", SearchMetadata("unused", "unused"), receiver); |
1415 | receiver->wait_until_finished(); |
1416 | - EXPECT_EQ(receiver->result(), nullptr); |
1417 | + EXPECT_EQ(nullptr, receiver->result()); |
1418 | |
1419 | // Cache file must still be there, but decode will have failed. |
1420 | boost::system::error_code ec; |
1421 | @@ -390,7 +395,7 @@ |
1422 | auto receiver = make_shared<Receiver>(); |
1423 | scope()->search("", SearchMetadata("unused", "unused"), receiver); |
1424 | receiver->wait_until_finished(); |
1425 | - EXPECT_EQ(receiver->result(), nullptr); |
1426 | + EXPECT_EQ(nullptr, receiver->result()); |
1427 | |
1428 | // Cache file must still be there, but decode will have failed. |
1429 | boost::system::error_code ec; |
1430 | @@ -404,7 +409,7 @@ |
1431 | auto receiver = make_shared<Receiver>(); |
1432 | scope()->search("", SearchMetadata("unused", "unused"), receiver); |
1433 | receiver->wait_until_finished(); |
1434 | - EXPECT_EQ(receiver->result(), nullptr); |
1435 | + EXPECT_EQ(nullptr, receiver->result()); |
1436 | |
1437 | // Cache file must still be there, but decode will have failed. |
1438 | boost::system::error_code ec; |
1439 | |
1440 | === modified file 'test/gtest/scopes/Runtime/PusherScope.cpp' |
1441 | --- test/gtest/scopes/Runtime/PusherScope.cpp 2014-07-30 20:39:04 +0000 |
1442 | +++ test/gtest/scopes/Runtime/PusherScope.cpp 2017-01-16 02:36:15 +0000 |
1443 | @@ -25,7 +25,10 @@ |
1444 | |
1445 | #include <atomic> |
1446 | |
1447 | +#pragma GCC diagnostic push |
1448 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1449 | #include <gtest/gtest.h> |
1450 | +#pragma GCC diagnostic pop |
1451 | |
1452 | using namespace std; |
1453 | using namespace unity::scopes; |
1454 | |
1455 | === modified file 'test/gtest/scopes/Runtime/Runtime_test.cpp' |
1456 | --- test/gtest/scopes/Runtime/Runtime_test.cpp 2015-01-09 03:16:51 +0000 |
1457 | +++ test/gtest/scopes/Runtime/Runtime_test.cpp 2017-01-16 02:36:15 +0000 |
1458 | @@ -28,7 +28,10 @@ |
1459 | #include <unity/scopes/SearchMetadata.h> |
1460 | #include <unity/UnityExceptions.h> |
1461 | |
1462 | +#pragma GCC diagnostic push |
1463 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1464 | #include <gtest/gtest.h> |
1465 | +#pragma GCC diagnostic pop |
1466 | |
1467 | #include "PusherScope.h" |
1468 | #include "SlowCreateScope.h" |
1469 | @@ -113,7 +116,7 @@ |
1470 | EXPECT_EQ(1, annotation_count_); |
1471 | EXPECT_EQ(2, info_count_); |
1472 | |
1473 | - EXPECT_EQ(2, details.info_list().size()); |
1474 | + EXPECT_EQ(2u, details.info_list().size()); |
1475 | if (details.info_list().size() == 2) |
1476 | { |
1477 | EXPECT_EQ(OperationInfo::NoInternet, details.info_list()[0].code()); |
1478 | @@ -201,7 +204,7 @@ |
1479 | EXPECT_EQ(2, data_pushes_); |
1480 | EXPECT_EQ(2, info_count_); |
1481 | |
1482 | - EXPECT_EQ(2, details.info_list().size()); |
1483 | + EXPECT_EQ(2u, details.info_list().size()); |
1484 | if (details.info_list().size() == 2) |
1485 | { |
1486 | EXPECT_EQ(OperationInfo::NoLocationData, details.info_list()[0].code()); |
1487 | |
1488 | === modified file 'test/gtest/scopes/Runtime/SlowCreateScope.cpp' |
1489 | --- test/gtest/scopes/Runtime/SlowCreateScope.cpp 2014-09-08 05:55:39 +0000 |
1490 | +++ test/gtest/scopes/Runtime/SlowCreateScope.cpp 2017-01-16 02:36:15 +0000 |
1491 | @@ -24,7 +24,10 @@ |
1492 | #include <mutex> |
1493 | #include <thread> |
1494 | |
1495 | +#pragma GCC diagnostic push |
1496 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1497 | #include <gtest/gtest.h> |
1498 | +#pragma GCC diagnostic pop |
1499 | |
1500 | using namespace std; |
1501 | using namespace unity::scopes; |
1502 | |
1503 | === modified file 'test/gtest/scopes/Runtime/TestScope.cpp' |
1504 | --- test/gtest/scopes/Runtime/TestScope.cpp 2014-07-30 20:39:04 +0000 |
1505 | +++ test/gtest/scopes/Runtime/TestScope.cpp 2017-01-16 02:36:15 +0000 |
1506 | @@ -25,7 +25,11 @@ |
1507 | #include <unity/scopes/ScopeBase.h> |
1508 | #include <unity/scopes/SearchReply.h> |
1509 | #include <unity/UnityExceptions.h> |
1510 | + |
1511 | +#pragma GCC diagnostic push |
1512 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1513 | #include <gtest/gtest.h> |
1514 | +#pragma GCC diagnostic pop |
1515 | |
1516 | #include "TestScope.h" |
1517 | |
1518 | |
1519 | === modified file 'test/gtest/scopes/ScopeBase/ScopeBase_test.cpp' |
1520 | --- test/gtest/scopes/ScopeBase/ScopeBase_test.cpp 2014-07-10 06:39:03 +0000 |
1521 | +++ test/gtest/scopes/ScopeBase/ScopeBase_test.cpp 2017-01-16 02:36:15 +0000 |
1522 | @@ -20,7 +20,10 @@ |
1523 | #include <unity/scopes/internal/DynamicLoader.h> |
1524 | #include <unity/UnityExceptions.h> |
1525 | |
1526 | +#pragma GCC diagnostic push |
1527 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1528 | #include <gtest/gtest.h> |
1529 | +#pragma GCC diagnostic pop |
1530 | |
1531 | using namespace unity::scopes; |
1532 | using namespace unity::scopes::internal; |
1533 | |
1534 | === modified file 'test/gtest/scopes/ScopeExceptions/ScopeExceptions_test.cpp' |
1535 | --- test/gtest/scopes/ScopeExceptions/ScopeExceptions_test.cpp 2014-04-17 01:36:29 +0000 |
1536 | +++ test/gtest/scopes/ScopeExceptions/ScopeExceptions_test.cpp 2017-01-16 02:36:15 +0000 |
1537 | @@ -18,7 +18,10 @@ |
1538 | |
1539 | #include <unity/scopes/ScopeExceptions.h> |
1540 | |
1541 | +#pragma GCC diagnostic push |
1542 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1543 | #include <gtest/gtest.h> |
1544 | +#pragma GCC diagnostic pop |
1545 | |
1546 | using namespace std; |
1547 | using namespace unity::scopes; |
1548 | |
1549 | === modified file 'test/gtest/scopes/StandAloneScope/StandAloneScope_test.cpp' |
1550 | --- test/gtest/scopes/StandAloneScope/StandAloneScope_test.cpp 2015-08-05 05:59:00 +0000 |
1551 | +++ test/gtest/scopes/StandAloneScope/StandAloneScope_test.cpp 2017-01-16 02:36:15 +0000 |
1552 | @@ -22,7 +22,10 @@ |
1553 | #include <unity/scopes/SearchListenerBase.h> |
1554 | #include <unity/scopes/SearchMetadata.h> |
1555 | |
1556 | +#pragma GCC diagnostic push |
1557 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1558 | #include <gtest/gtest.h> |
1559 | +#pragma GCC diagnostic pop |
1560 | |
1561 | #include <chrono> |
1562 | #include <condition_variable> |
1563 | |
1564 | === modified file 'test/gtest/scopes/StripLocation/StripLocation_test.cpp' |
1565 | --- test/gtest/scopes/StripLocation/StripLocation_test.cpp 2015-03-02 07:04:42 +0000 |
1566 | +++ test/gtest/scopes/StripLocation/StripLocation_test.cpp 2017-01-16 02:36:15 +0000 |
1567 | @@ -20,7 +20,10 @@ |
1568 | #include <unity/scopes/internal/RuntimeImpl.h> |
1569 | #include <unity/scopes/SearchMetadata.h> |
1570 | |
1571 | +#pragma GCC diagnostic push |
1572 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1573 | #include <gtest/gtest.h> |
1574 | +#pragma GCC diagnostic pop |
1575 | |
1576 | using namespace std; |
1577 | using namespace unity::scopes; |
1578 | |
1579 | === modified file 'test/gtest/scopes/SwitchFilter/SwitchFilter_test.cpp' |
1580 | --- test/gtest/scopes/SwitchFilter/SwitchFilter_test.cpp 2015-11-12 12:45:41 +0000 |
1581 | +++ test/gtest/scopes/SwitchFilter/SwitchFilter_test.cpp 2017-01-16 02:36:15 +0000 |
1582 | @@ -16,7 +16,11 @@ |
1583 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
1584 | */ |
1585 | |
1586 | +#pragma GCC diagnostic push |
1587 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1588 | #include <gtest/gtest.h> |
1589 | +#pragma GCC diagnostic pop |
1590 | + |
1591 | #include <unity/scopes/FilterState.h> |
1592 | #include <unity/scopes/SwitchFilter.h> |
1593 | #include <unity/scopes/internal/SwitchFilterImpl.h> |
1594 | |
1595 | === modified file 'test/gtest/scopes/ThrowingClient/ThrowingClient_test.cpp' |
1596 | --- test/gtest/scopes/ThrowingClient/ThrowingClient_test.cpp 2015-11-26 05:48:01 +0000 |
1597 | +++ test/gtest/scopes/ThrowingClient/ThrowingClient_test.cpp 2017-01-16 02:36:15 +0000 |
1598 | @@ -21,7 +21,10 @@ |
1599 | |
1600 | #include <unity/UnityExceptions.h> |
1601 | |
1602 | +#pragma GCC diagnostic push |
1603 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1604 | #include <gtest/gtest.h> |
1605 | +#pragma GCC diagnostic pop |
1606 | |
1607 | #include <condition_variable> |
1608 | |
1609 | @@ -325,7 +328,7 @@ |
1610 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1611 | EXPECT_EQ("", receiver->completion_msg()); |
1612 | auto r = receiver->results(); |
1613 | - ASSERT_EQ(1, r.size()); |
1614 | + ASSERT_EQ(1u, r.size()); |
1615 | EXPECT_EQ("success", r[0].title()); |
1616 | } |
1617 | |
1618 | @@ -413,7 +416,7 @@ |
1619 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1620 | EXPECT_EQ("", receiver->completion_msg()); |
1621 | auto r = receiver->results(); |
1622 | - ASSERT_EQ(1, r.size()); |
1623 | + ASSERT_EQ(1u, r.size()); |
1624 | EXPECT_EQ(r[0].title(), "success"); |
1625 | |
1626 | auto plistener = make_shared<PreviewListener>(); |
1627 | @@ -433,7 +436,7 @@ |
1628 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1629 | EXPECT_EQ("", receiver->completion_msg()); |
1630 | auto r = receiver->results(); |
1631 | - ASSERT_EQ(1, r.size()); |
1632 | + ASSERT_EQ(1u, r.size()); |
1633 | EXPECT_EQ(r[0].title(), "success"); |
1634 | |
1635 | auto plistener = make_shared<PreviewListener>("throw from preview push layout"); |
1636 | @@ -454,7 +457,7 @@ |
1637 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1638 | EXPECT_EQ("", receiver->completion_msg()); |
1639 | auto r = receiver->results(); |
1640 | - ASSERT_EQ(1, r.size()); |
1641 | + ASSERT_EQ(1u, r.size()); |
1642 | EXPECT_EQ(r[0].title(), "success"); |
1643 | |
1644 | auto plistener = make_shared<PreviewListener>("throw from preview push widget"); |
1645 | @@ -475,7 +478,7 @@ |
1646 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1647 | EXPECT_EQ("", receiver->completion_msg()); |
1648 | auto r = receiver->results(); |
1649 | - ASSERT_EQ(1, r.size()); |
1650 | + ASSERT_EQ(1u, r.size()); |
1651 | EXPECT_EQ(r[0].title(), "success"); |
1652 | |
1653 | auto plistener = make_shared<PreviewListener>("throw from preview push attribute"); |
1654 | @@ -496,7 +499,7 @@ |
1655 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1656 | EXPECT_EQ("", receiver->completion_msg()); |
1657 | auto r = receiver->results(); |
1658 | - ASSERT_EQ(1, r.size()); |
1659 | + ASSERT_EQ(1u, r.size()); |
1660 | EXPECT_EQ(r[0].title(), "success"); |
1661 | |
1662 | auto plistener = make_shared<PreviewListener>("throw from preview finished"); |
1663 | @@ -516,7 +519,7 @@ |
1664 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1665 | EXPECT_EQ("", receiver->completion_msg()); |
1666 | auto r = receiver->results(); |
1667 | - ASSERT_EQ(1, r.size()); |
1668 | + ASSERT_EQ(1u, r.size()); |
1669 | EXPECT_EQ(r[0].title(), "success"); |
1670 | |
1671 | auto alistener = make_shared<ActivationListener>(); |
1672 | @@ -536,7 +539,7 @@ |
1673 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1674 | EXPECT_EQ("", receiver->completion_msg()); |
1675 | auto r = receiver->results(); |
1676 | - ASSERT_EQ(1, r.size()); |
1677 | + ASSERT_EQ(1u, r.size()); |
1678 | EXPECT_EQ(r[0].title(), "success"); |
1679 | |
1680 | auto alistener = make_shared<ActivationListener>("throw from activation activate"); |
1681 | @@ -557,7 +560,7 @@ |
1682 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1683 | EXPECT_EQ("", receiver->completion_msg()); |
1684 | auto r = receiver->results(); |
1685 | - ASSERT_EQ(1, r.size()); |
1686 | + ASSERT_EQ(1u, r.size()); |
1687 | EXPECT_EQ(r[0].title(), "success"); |
1688 | |
1689 | auto alistener = make_shared<ActivationListener>("throw from activation finished"); |
1690 | |
1691 | === modified file 'test/gtest/scopes/ThrowingScope/ThrowingScope_test.cpp' |
1692 | --- test/gtest/scopes/ThrowingScope/ThrowingScope_test.cpp 2015-02-06 06:33:23 +0000 |
1693 | +++ test/gtest/scopes/ThrowingScope/ThrowingScope_test.cpp 2017-01-16 02:36:15 +0000 |
1694 | @@ -20,7 +20,10 @@ |
1695 | #include <unity/scopes/QueryCtrl.h> |
1696 | #include <unity/scopes/Runtime.h> |
1697 | |
1698 | +#pragma GCC diagnostic push |
1699 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1700 | #include <gtest/gtest.h> |
1701 | +#pragma GCC diagnostic pop |
1702 | |
1703 | #include <condition_variable> |
1704 | #include <thread> |
1705 | @@ -240,7 +243,7 @@ |
1706 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1707 | EXPECT_EQ("", receiver->completion_msg()); |
1708 | auto r = receiver->results(); |
1709 | - EXPECT_EQ(1, r.size()); |
1710 | + EXPECT_EQ(1u, r.size()); |
1711 | } |
1712 | |
1713 | TEST_F(ThrowingScopeTest, throw_from_search) |
1714 | @@ -255,7 +258,7 @@ |
1715 | " unity::ResourceException: exception from search", |
1716 | receiver->completion_msg()); |
1717 | auto r = receiver->results(); |
1718 | - EXPECT_EQ(0, r.size()); |
1719 | + EXPECT_EQ(0u, r.size()); |
1720 | } |
1721 | |
1722 | TEST_F(ThrowingScopeTest, throw_from_run) |
1723 | @@ -267,7 +270,7 @@ |
1724 | EXPECT_EQ(CompletionDetails::CompletionStatus::Error, receiver->completion_status()); |
1725 | EXPECT_EQ("QueryBase::run(): unity::ResourceException: exception from run", receiver->completion_msg()); |
1726 | auto r = receiver->results(); |
1727 | - EXPECT_EQ(0, r.size()); |
1728 | + EXPECT_EQ(0u, r.size()); |
1729 | } |
1730 | |
1731 | TEST_F(ThrowingScopeTest, throw_from_cancelled) |
1732 | @@ -280,7 +283,7 @@ |
1733 | receiver->wait_until_finished(); |
1734 | |
1735 | auto r = receiver->results(); |
1736 | - EXPECT_EQ(0, r.size()); |
1737 | + EXPECT_EQ(0u, r.size()); |
1738 | |
1739 | EXPECT_EQ(CompletionDetails::CompletionStatus::Cancelled, receiver->completion_status()); |
1740 | // No exception string here because we short-cut the cancellation on the client side. |
1741 | @@ -297,7 +300,7 @@ |
1742 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1743 | EXPECT_EQ("", receiver->completion_msg()); |
1744 | auto r = receiver->results(); |
1745 | - EXPECT_EQ(1, r.size()); |
1746 | + EXPECT_EQ(1u, r.size()); |
1747 | |
1748 | auto plistener = make_shared<PreviewListener>(); |
1749 | scope()->preview(r[0], ActionMetadata("unused", "unused"), plistener); |
1750 | @@ -319,7 +322,7 @@ |
1751 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1752 | EXPECT_EQ("", receiver->completion_msg()); |
1753 | auto r = receiver->results(); |
1754 | - EXPECT_EQ(1, r.size()); |
1755 | + EXPECT_EQ(1u, r.size()); |
1756 | |
1757 | auto plistener = make_shared<PreviewListener>(); |
1758 | scope()->preview(r[0], ActionMetadata("unused", "unused"), plistener); |
1759 | @@ -338,7 +341,7 @@ |
1760 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1761 | EXPECT_EQ("", receiver->completion_msg()); |
1762 | auto r = receiver->results(); |
1763 | - EXPECT_EQ(1, r.size()); |
1764 | + EXPECT_EQ(1u, r.size()); |
1765 | |
1766 | auto plistener = make_shared<PreviewListener>(); |
1767 | auto ctrl = scope()->preview(r[0], ActionMetadata("unused", "unused"), plistener); |
1768 | @@ -361,7 +364,7 @@ |
1769 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1770 | EXPECT_EQ("", receiver->completion_msg()); |
1771 | auto r = receiver->results(); |
1772 | - EXPECT_EQ(1, r.size()); |
1773 | + EXPECT_EQ(1u, r.size()); |
1774 | |
1775 | auto alistener = make_shared<ActivationListener>(); |
1776 | scope()->activate(r[0], ActionMetadata("unused", "unused"), alistener); |
1777 | @@ -383,7 +386,7 @@ |
1778 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1779 | EXPECT_EQ("", receiver->completion_msg()); |
1780 | auto r = receiver->results(); |
1781 | - EXPECT_EQ(1, r.size()); |
1782 | + EXPECT_EQ(1u, r.size()); |
1783 | |
1784 | auto alistener = make_shared<ActivationListener>(); |
1785 | scope()->activate(r[0], ActionMetadata("unused", "unused"), alistener); |
1786 | @@ -403,7 +406,7 @@ |
1787 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1788 | EXPECT_EQ("", receiver->completion_msg()); |
1789 | auto r = receiver->results(); |
1790 | - EXPECT_EQ(1, r.size()); |
1791 | + EXPECT_EQ(1u, r.size()); |
1792 | |
1793 | auto alistener = make_shared<ActivationListener>(); |
1794 | auto ctrl = scope()->activate(r[0], ActionMetadata("unused", "unused"), alistener); |
1795 | @@ -426,7 +429,7 @@ |
1796 | EXPECT_EQ(CompletionDetails::CompletionStatus::OK, receiver->completion_status()); |
1797 | EXPECT_EQ("", receiver->completion_msg()); |
1798 | auto r = receiver->results(); |
1799 | - EXPECT_EQ(1, r.size()); |
1800 | + EXPECT_EQ(1u, r.size()); |
1801 | |
1802 | auto alistener = make_shared<ActivationListener>(); |
1803 | scope()->perform_action(r[0], ActionMetadata("unused", "unused"), "", "", alistener); |
1804 | |
1805 | === modified file 'test/gtest/scopes/ValueSliderFilter/ValueSliderFilter_test.cpp' |
1806 | --- test/gtest/scopes/ValueSliderFilter/ValueSliderFilter_test.cpp 2016-03-11 13:21:36 +0000 |
1807 | +++ test/gtest/scopes/ValueSliderFilter/ValueSliderFilter_test.cpp 2017-01-16 02:36:15 +0000 |
1808 | @@ -16,7 +16,11 @@ |
1809 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
1810 | */ |
1811 | |
1812 | +#pragma GCC diagnostic push |
1813 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1814 | #include <gtest/gtest.h> |
1815 | +#pragma GCC diagnostic pop |
1816 | + |
1817 | #include <unity/scopes/FilterState.h> |
1818 | #include <unity/scopes/ValueSliderFilter.h> |
1819 | #include <unity/scopes/ValueSliderLabels.h> |
1820 | @@ -45,7 +49,7 @@ |
1821 | EXPECT_EQ("f1", filter1->id()); |
1822 | EXPECT_EQ("Min", filter1->labels().min_label()); |
1823 | EXPECT_EQ("Max", filter1->labels().max_label()); |
1824 | - EXPECT_EQ(2, filter1->labels().extra_labels().size()); |
1825 | + EXPECT_EQ(2u, filter1->labels().extra_labels().size()); |
1826 | EXPECT_EQ("Ten", filter1->labels().extra_labels()[0].second); |
1827 | EXPECT_EQ("Fifty", filter1->labels().extra_labels()[1].second); |
1828 | EXPECT_EQ(50, filter1->default_value()); |
1829 | @@ -115,7 +119,7 @@ |
1830 | EXPECT_EQ("f1", filter2->id()); |
1831 | EXPECT_EQ("Min", filter2->labels().min_label()); |
1832 | EXPECT_EQ("Max", filter2->labels().max_label()); |
1833 | - EXPECT_EQ(1, filter2->labels().extra_labels().size()); |
1834 | + EXPECT_EQ(1u, filter2->labels().extra_labels().size()); |
1835 | EXPECT_EQ(10, filter2->labels().extra_labels()[0].first); |
1836 | EXPECT_EQ("Ten", filter2->labels().extra_labels()[0].second); |
1837 | EXPECT_EQ(1, filter2->min()); |
1838 | |
1839 | === modified file 'test/gtest/scopes/Variant/Variant_test.cpp' |
1840 | --- test/gtest/scopes/Variant/Variant_test.cpp 2015-06-17 10:15:34 +0000 |
1841 | +++ test/gtest/scopes/Variant/Variant_test.cpp 2017-01-16 02:36:15 +0000 |
1842 | @@ -21,7 +21,10 @@ |
1843 | |
1844 | #include <boost/variant.hpp> |
1845 | |
1846 | +#pragma GCC diagnostic push |
1847 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1848 | #include <gtest/gtest.h> |
1849 | +#pragma GCC diagnostic pop |
1850 | |
1851 | using namespace std; |
1852 | using namespace unity; |
1853 | @@ -292,12 +295,12 @@ |
1854 | |
1855 | v = Variant::deserialize_json("{\"foo\": \"bar\"}"); |
1856 | VariantMap vm = v.get_dict(); |
1857 | - EXPECT_EQ(1, vm.size()); |
1858 | + EXPECT_EQ(1u, vm.size()); |
1859 | EXPECT_EQ("bar", vm.at("foo").get_string()); |
1860 | |
1861 | v = Variant::deserialize_json("[1, \"two\"]"); |
1862 | VariantArray va = v.get_array(); |
1863 | - EXPECT_EQ(2, va.size()); |
1864 | + EXPECT_EQ(2u, va.size()); |
1865 | EXPECT_EQ(1, va[0].get_int()); |
1866 | EXPECT_EQ("two", va[1].get_string()); |
1867 | } |
1868 | |
1869 | === modified file 'test/gtest/scopes/VariantBuilder/VariantBuilder_test.cpp' |
1870 | --- test/gtest/scopes/VariantBuilder/VariantBuilder_test.cpp 2014-02-25 12:08:41 +0000 |
1871 | +++ test/gtest/scopes/VariantBuilder/VariantBuilder_test.cpp 2017-01-16 02:36:15 +0000 |
1872 | @@ -17,8 +17,12 @@ |
1873 | */ |
1874 | |
1875 | #include <unity/scopes/VariantBuilder.h> |
1876 | +#include <unity/UnityExceptions.h> |
1877 | + |
1878 | +#pragma GCC diagnostic push |
1879 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1880 | #include <gtest/gtest.h> |
1881 | -#include <unity/UnityExceptions.h> |
1882 | +#pragma GCC diagnostic pop |
1883 | |
1884 | using namespace unity; |
1885 | using namespace unity::scopes; |
1886 | |
1887 | === modified file 'test/gtest/scopes/Version/Version_test.cpp' |
1888 | --- test/gtest/scopes/Version/Version_test.cpp 2014-01-07 12:22:29 +0000 |
1889 | +++ test/gtest/scopes/Version/Version_test.cpp 2017-01-16 02:36:15 +0000 |
1890 | @@ -18,7 +18,10 @@ |
1891 | |
1892 | #include <unity/scopes/Version.h> |
1893 | |
1894 | +#pragma GCC diagnostic push |
1895 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1896 | #include <gtest/gtest.h> |
1897 | +#pragma GCC diagnostic pop |
1898 | |
1899 | using namespace unity::scopes; |
1900 | |
1901 | |
1902 | === modified file 'test/gtest/scopes/internal/CategoryRegistry/CategoryRegistry_test.cpp' |
1903 | --- test/gtest/scopes/internal/CategoryRegistry/CategoryRegistry_test.cpp 2014-07-02 09:36:34 +0000 |
1904 | +++ test/gtest/scopes/internal/CategoryRegistry/CategoryRegistry_test.cpp 2017-01-16 02:36:15 +0000 |
1905 | @@ -21,7 +21,10 @@ |
1906 | #include <unity/UnityExceptions.h> |
1907 | #include <unity/scopes/Variant.h> |
1908 | |
1909 | +#pragma GCC diagnostic push |
1910 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1911 | #include <gtest/gtest.h> |
1912 | +#pragma GCC diagnostic pop |
1913 | |
1914 | using namespace std; |
1915 | using namespace unity; |
1916 | |
1917 | === modified file 'test/gtest/scopes/internal/ConfigBase/ConfigBase_test.cpp' |
1918 | --- test/gtest/scopes/internal/ConfigBase/ConfigBase_test.cpp 2014-07-07 23:53:36 +0000 |
1919 | +++ test/gtest/scopes/internal/ConfigBase/ConfigBase_test.cpp 2017-01-16 02:36:15 +0000 |
1920 | @@ -20,7 +20,10 @@ |
1921 | #include <unity/scopes/ScopeExceptions.h> |
1922 | #include <unity/UnityExceptions.h> |
1923 | |
1924 | +#pragma GCC diagnostic push |
1925 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1926 | #include <gtest/gtest.h> |
1927 | +#pragma GCC diagnostic pop |
1928 | |
1929 | using namespace std; |
1930 | using namespace unity; |
1931 | |
1932 | === modified file 'test/gtest/scopes/internal/DynamicLoader/DynamicLoader_test.cpp' |
1933 | --- test/gtest/scopes/internal/DynamicLoader/DynamicLoader_test.cpp 2014-08-28 00:20:56 +0000 |
1934 | +++ test/gtest/scopes/internal/DynamicLoader/DynamicLoader_test.cpp 2017-01-16 02:36:15 +0000 |
1935 | @@ -19,7 +19,10 @@ |
1936 | #include <unity/scopes/internal/DynamicLoader.h> |
1937 | #include <unity/UnityExceptions.h> |
1938 | |
1939 | +#pragma GCC diagnostic push |
1940 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1941 | #include <gtest/gtest.h> |
1942 | +#pragma GCC diagnostic pop |
1943 | |
1944 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
1945 | using namespace std; |
1946 | |
1947 | === modified file 'test/gtest/scopes/internal/IniSettingsSchema/IniSettingsSchema_test.cpp' |
1948 | --- test/gtest/scopes/internal/IniSettingsSchema/IniSettingsSchema_test.cpp 2014-11-20 21:33:33 +0000 |
1949 | +++ test/gtest/scopes/internal/IniSettingsSchema/IniSettingsSchema_test.cpp 2017-01-16 02:36:15 +0000 |
1950 | @@ -21,7 +21,10 @@ |
1951 | #include <unity/UnityExceptions.h> |
1952 | |
1953 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
1954 | +#pragma GCC diagnostic push |
1955 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
1956 | #include <gtest/gtest.h> |
1957 | +#pragma GCC diagnostic pop |
1958 | |
1959 | using namespace unity; |
1960 | using namespace unity::scopes; |
1961 | @@ -34,7 +37,7 @@ |
1962 | s->add_location_setting(); |
1963 | |
1964 | auto defs = s->definitions(); |
1965 | - ASSERT_EQ(9, defs.size()); |
1966 | + ASSERT_EQ(9u, defs.size()); |
1967 | |
1968 | EXPECT_EQ("location", defs[0].get_dict()["id"].get_string()); |
1969 | EXPECT_EQ("string", defs[0].get_dict()["type"].get_string()); |
1970 | @@ -45,7 +48,7 @@ |
1971 | EXPECT_EQ("list", defs[1].get_dict()["type"].get_string()); |
1972 | EXPECT_EQ("Temperature Unit", defs[1].get_dict()["displayName"].get_string()); |
1973 | EXPECT_EQ(1, defs[1].get_dict()["defaultValue"].get_int()); |
1974 | - ASSERT_EQ(2, defs[1].get_dict()["displayValues"].get_array().size()); |
1975 | + ASSERT_EQ(2u, defs[1].get_dict()["displayValues"].get_array().size()); |
1976 | EXPECT_EQ("Celsius", defs[1].get_dict()["displayValues"].get_array()[0].get_string()); |
1977 | EXPECT_EQ("Fahrenheit", defs[1].get_dict()["displayValues"].get_array()[1].get_string()); |
1978 | |
1979 | @@ -204,7 +207,7 @@ |
1980 | |
1981 | EXPECT_EQ("tempUnit", defs[1].get_dict()["id"].get_string()); |
1982 | EXPECT_EQ("testTemperature Unit", defs[1].get_dict()["displayName"].get_string()); |
1983 | - ASSERT_EQ(2, defs[1].get_dict()["displayValues"].get_array().size()); |
1984 | + ASSERT_EQ(2u, defs[1].get_dict()["displayValues"].get_array().size()); |
1985 | EXPECT_EQ("testCelsius", defs[1].get_dict()["displayValues"].get_array()[0].get_string()); |
1986 | EXPECT_EQ("testFahrenheit", defs[1].get_dict()["displayValues"].get_array()[1].get_string()); |
1987 | } |
1988 | @@ -215,11 +218,11 @@ |
1989 | auto s = IniSettingsSchema::create(TEST_SRC_DIR "/locale_fallback.ini"); |
1990 | |
1991 | auto defs = s->definitions(); |
1992 | - ASSERT_EQ(1, defs.size()); |
1993 | + ASSERT_EQ(1u, defs.size()); |
1994 | |
1995 | EXPECT_EQ("tempUnit", defs[0].get_dict()["id"].get_string()); |
1996 | EXPECT_EQ("Temperature Unit", defs[0].get_dict()["displayName"].get_string()); |
1997 | - ASSERT_EQ(2, defs[0].get_dict()["displayValues"].get_array().size()); |
1998 | + ASSERT_EQ(2u, defs[0].get_dict()["displayValues"].get_array().size()); |
1999 | EXPECT_EQ("Celsius", defs[0].get_dict()["displayValues"].get_array()[0].get_string()); |
2000 | EXPECT_EQ("Fahrenheit", defs[0].get_dict()["displayValues"].get_array()[1].get_string()); |
2001 | } |
2002 | @@ -235,7 +238,7 @@ |
2003 | s->add_location_setting(); |
2004 | { |
2005 | auto defs = s->definitions(); |
2006 | - ASSERT_EQ(1, defs.size()); |
2007 | + ASSERT_EQ(1u, defs.size()); |
2008 | |
2009 | EXPECT_EQ("internal.location", defs[0].get_dict()["id"].get_string()); |
2010 | EXPECT_EQ("Enable location data", defs[0].get_dict()["displayName"].get_string()); |
2011 | |
2012 | === modified file 'test/gtest/scopes/internal/JsonNode/JsonNode_test.cpp' |
2013 | --- test/gtest/scopes/internal/JsonNode/JsonNode_test.cpp 2016-05-27 11:26:53 +0000 |
2014 | +++ test/gtest/scopes/internal/JsonNode/JsonNode_test.cpp 2017-01-16 02:36:15 +0000 |
2015 | @@ -20,7 +20,11 @@ |
2016 | #include <unity/UnityExceptions.h> |
2017 | #include <unity/scopes/Variant.h> |
2018 | |
2019 | +#pragma GCC diagnostic push |
2020 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2021 | #include <gtest/gtest.h> |
2022 | +#pragma GCC diagnostic pop |
2023 | + |
2024 | #include <memory> |
2025 | #include <algorithm> |
2026 | |
2027 | |
2028 | === modified file 'test/gtest/scopes/internal/JsonSettingsSchema/JsonSettingsSchema_test.cpp' |
2029 | --- test/gtest/scopes/internal/JsonSettingsSchema/JsonSettingsSchema_test.cpp 2016-05-27 11:03:57 +0000 |
2030 | +++ test/gtest/scopes/internal/JsonSettingsSchema/JsonSettingsSchema_test.cpp 2017-01-16 02:36:15 +0000 |
2031 | @@ -21,7 +21,10 @@ |
2032 | #include <unity/UnityExceptions.h> |
2033 | #include <unity/util/FileIO.h> |
2034 | |
2035 | +#pragma GCC diagnostic push |
2036 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2037 | #include <gtest/gtest.h> |
2038 | +#pragma GCC diagnostic pop |
2039 | |
2040 | using namespace unity; |
2041 | using namespace unity::scopes; |
2042 | @@ -118,7 +121,7 @@ |
2043 | auto s = JsonSettingsSchema::create(ok_schema); |
2044 | |
2045 | auto defs = s->definitions(); |
2046 | - EXPECT_EQ(11, defs.size()); |
2047 | + EXPECT_EQ(11u, defs.size()); |
2048 | |
2049 | EXPECT_EQ("location", defs[0].get_dict()["id"].get_string()); |
2050 | EXPECT_EQ("string", defs[0].get_dict()["type"].get_string()); |
2051 | @@ -129,7 +132,7 @@ |
2052 | EXPECT_EQ("list", defs[1].get_dict()["type"].get_string()); |
2053 | EXPECT_EQ("Temperature Units", defs[1].get_dict()["displayName"].get_string()); |
2054 | EXPECT_EQ(1, defs[1].get_dict()["defaultValue"].get_int()); |
2055 | - EXPECT_EQ(2, defs[1].get_dict()["displayValues"].get_array().size()); |
2056 | + EXPECT_EQ(2u, defs[1].get_dict()["displayValues"].get_array().size()); |
2057 | EXPECT_EQ("Celsius", defs[1].get_dict()["displayValues"].get_array()[0].get_string()); |
2058 | EXPECT_EQ("Fahrenheit", defs[1].get_dict()["displayValues"].get_array()[1].get_string()); |
2059 | |
2060 | @@ -181,7 +184,7 @@ |
2061 | auto s = JsonSettingsSchema::create(schema); |
2062 | |
2063 | auto defs = s->definitions(); |
2064 | - EXPECT_EQ(2, defs.size()); |
2065 | + EXPECT_EQ(2u, defs.size()); |
2066 | |
2067 | EXPECT_EQ(3.14, defs[0].get_dict()["defaultValue"].get_double()); |
2068 | EXPECT_EQ(2147483648, defs[1].get_dict()["defaultValue"].get_double()); |
2069 | @@ -705,7 +708,7 @@ |
2070 | s->add_location_setting(); |
2071 | { |
2072 | auto defs = s->definitions(); |
2073 | - ASSERT_EQ(1, defs.size()); |
2074 | + ASSERT_EQ(1u, defs.size()); |
2075 | |
2076 | EXPECT_EQ("internal.location", defs[0].get_dict()["id"].get_string()); |
2077 | EXPECT_EQ("Enable location data", defs[0].get_dict()["displayName"].get_string()); |
2078 | |
2079 | === modified file 'test/gtest/scopes/internal/Logger/Logger_test.cpp' |
2080 | --- test/gtest/scopes/internal/Logger/Logger_test.cpp 2016-02-22 04:35:26 +0000 |
2081 | +++ test/gtest/scopes/internal/Logger/Logger_test.cpp 2017-01-16 02:36:15 +0000 |
2082 | @@ -19,7 +19,12 @@ |
2083 | #include <unity/scopes/internal/Logger.h> |
2084 | |
2085 | #include <boost/algorithm/string.hpp> |
2086 | + |
2087 | +#pragma GCC diagnostic push |
2088 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2089 | #include <gtest/gtest.h> |
2090 | +#pragma GCC diagnostic pop |
2091 | + |
2092 | #include <unity/UnityExceptions.h> |
2093 | |
2094 | using namespace std; |
2095 | |
2096 | === modified file 'test/gtest/scopes/internal/MiddlewareFactory/MiddlewareFactory_test.cpp' |
2097 | --- test/gtest/scopes/internal/MiddlewareFactory/MiddlewareFactory_test.cpp 2014-12-02 00:16:04 +0000 |
2098 | +++ test/gtest/scopes/internal/MiddlewareFactory/MiddlewareFactory_test.cpp 2017-01-16 02:36:15 +0000 |
2099 | @@ -19,7 +19,10 @@ |
2100 | #include <unity/scopes/internal/MiddlewareFactory.h> |
2101 | #include <unity/scopes/ScopeExceptions.h> |
2102 | |
2103 | +#pragma GCC diagnostic push |
2104 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2105 | #include <gtest/gtest.h> |
2106 | +#pragma GCC diagnostic pop |
2107 | |
2108 | using namespace std; |
2109 | using namespace unity::scopes; |
2110 | |
2111 | === modified file 'test/gtest/scopes/internal/Reaper/Reaper_test.cpp' |
2112 | --- test/gtest/scopes/internal/Reaper/Reaper_test.cpp 2014-11-05 05:00:38 +0000 |
2113 | +++ test/gtest/scopes/internal/Reaper/Reaper_test.cpp 2017-01-16 02:36:15 +0000 |
2114 | @@ -20,7 +20,10 @@ |
2115 | |
2116 | #include <unity/UnityExceptions.h> |
2117 | |
2118 | +#pragma GCC diagnostic push |
2119 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2120 | #include <gtest/gtest.h> |
2121 | +#pragma GCC diagnostic pop |
2122 | |
2123 | using namespace std; |
2124 | using namespace unity::scopes; |
2125 | @@ -200,17 +203,17 @@ |
2126 | auto e1 = r->add([]{}); |
2127 | auto e2 = r->add([]{}); |
2128 | auto e3 = r->add([]{}); |
2129 | - EXPECT_EQ(3, r->size()); |
2130 | + EXPECT_EQ(3u, r->size()); |
2131 | e2->cancel(); |
2132 | - EXPECT_EQ(2, r->size()); |
2133 | + EXPECT_EQ(2u, r->size()); |
2134 | |
2135 | r->destroy(); |
2136 | |
2137 | - EXPECT_EQ(2, r->size()); |
2138 | + EXPECT_EQ(2u, r->size()); |
2139 | e3->cancel(); |
2140 | - EXPECT_EQ(1, r->size()); |
2141 | + EXPECT_EQ(1u, r->size()); |
2142 | e1->cancel(); |
2143 | - EXPECT_EQ(0, r->size()); |
2144 | + EXPECT_EQ(0u, r->size()); |
2145 | } |
2146 | } |
2147 | |
2148 | @@ -326,7 +329,7 @@ |
2149 | // Now we destroy the reaper, *before* the pass at t == 6.0. |
2150 | // Because CallbackOnDestroy is set, e3 is reaped. |
2151 | r->destroy(); |
2152 | - EXPECT_EQ(0, r->size()); |
2153 | + EXPECT_EQ(0u, r->size()); |
2154 | EXPECT_EQ(1, c1.get()); |
2155 | EXPECT_EQ(0, c2.get()); |
2156 | EXPECT_EQ(1, c3.get()); // Callback for e3 must have been invoked. |
2157 | @@ -361,7 +364,7 @@ |
2158 | |
2159 | // e1 is oldest, so at the tail of the reap list. |
2160 | |
2161 | - EXPECT_EQ(2, r->size()); |
2162 | + EXPECT_EQ(2u, r->size()); |
2163 | EXPECT_LT(t(), 2000); |
2164 | |
2165 | this_thread::sleep_for(chrono::milliseconds(2500)); // At t == 2.0, reaper kicks in. |
2166 | @@ -370,14 +373,14 @@ |
2167 | EXPECT_GE(t(), 2500); |
2168 | EXPECT_EQ(1, c1.get()); // Was reaped at t ~ 2.0 (tested by lambda on c1) |
2169 | EXPECT_EQ(0, c2.get()); // Expires at t ~ 2.0, but not reaped yet, because c1 has not completed |
2170 | - EXPECT_EQ(1, r->size()); // e2 must still be there |
2171 | + EXPECT_EQ(1u, r->size()); // e2 must still be there |
2172 | |
2173 | // We null out e2 while the reaping pass is still stuck in the callback for e1. |
2174 | EXPECT_LT(t(), 3000); |
2175 | e2 = nullptr; // Blocks until e1's callback completes at t ~ 3.0 (tested by lambda on c2) |
2176 | EXPECT_GE(t(), 3000); |
2177 | EXPECT_EQ(0, c2.get()); |
2178 | - EXPECT_EQ(0, r->size()); |
2179 | + EXPECT_EQ(0u, r->size()); |
2180 | } |
2181 | } |
2182 | |
2183 | @@ -419,7 +422,7 @@ |
2184 | SelfDestroy sd(r); |
2185 | this_thread::sleep_for(chrono::milliseconds(1500)); |
2186 | EXPECT_TRUE(sd.called()); |
2187 | - EXPECT_EQ(0, r->size()); |
2188 | + EXPECT_EQ(0u, r->size()); |
2189 | } |
2190 | } |
2191 | |
2192 | @@ -441,13 +444,13 @@ |
2193 | |
2194 | e1->refresh(); |
2195 | e2->cancel(); |
2196 | - EXPECT_EQ(2, r->size()); |
2197 | + EXPECT_EQ(2u, r->size()); |
2198 | EXPECT_EQ(0, c1.get()); |
2199 | EXPECT_EQ(0, c2.get()); |
2200 | EXPECT_EQ(0, c3.get()); |
2201 | |
2202 | r->destroy(); |
2203 | - EXPECT_EQ(0, r->size()); |
2204 | + EXPECT_EQ(0u, r->size()); |
2205 | EXPECT_EQ(1, c1.get()); |
2206 | EXPECT_EQ(0, c2.get()); |
2207 | EXPECT_EQ(1, c3.get()); |
2208 | @@ -466,13 +469,13 @@ |
2209 | |
2210 | e1->refresh(); |
2211 | e2->cancel(); |
2212 | - EXPECT_EQ(2, r->size()); |
2213 | + EXPECT_EQ(2u, r->size()); |
2214 | EXPECT_EQ(0, c1.get()); |
2215 | EXPECT_EQ(0, c2.get()); |
2216 | EXPECT_EQ(0, c3.get()); |
2217 | |
2218 | r->destroy(); |
2219 | - EXPECT_EQ(2, r->size()); |
2220 | + EXPECT_EQ(2u, r->size()); |
2221 | EXPECT_EQ(0, c1.get()); |
2222 | EXPECT_EQ(0, c2.get()); |
2223 | EXPECT_EQ(0, c3.get()); |
2224 | |
2225 | === modified file 'test/gtest/scopes/internal/RegistryConfig/RegistryConfig_test.cpp' |
2226 | --- test/gtest/scopes/internal/RegistryConfig/RegistryConfig_test.cpp 2015-08-04 04:56:01 +0000 |
2227 | +++ test/gtest/scopes/internal/RegistryConfig/RegistryConfig_test.cpp 2017-01-16 02:36:15 +0000 |
2228 | @@ -21,7 +21,10 @@ |
2229 | #include <unity/scopes/ScopeExceptions.h> |
2230 | |
2231 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
2232 | +#pragma GCC diagnostic push |
2233 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2234 | #include <gtest/gtest.h> |
2235 | +#pragma GCC diagnostic pop |
2236 | |
2237 | using namespace std; |
2238 | using namespace unity; |
2239 | |
2240 | === modified file 'test/gtest/scopes/internal/RegistryObject/RegistryObject_test.cpp' |
2241 | --- test/gtest/scopes/internal/RegistryObject/RegistryObject_test.cpp 2015-05-29 10:17:42 +0000 |
2242 | +++ test/gtest/scopes/internal/RegistryObject/RegistryObject_test.cpp 2017-01-16 02:36:15 +0000 |
2243 | @@ -24,8 +24,10 @@ |
2244 | #include <unity/UnityExceptions.h> |
2245 | #include <unity/scopes/ScopeExceptions.h> |
2246 | |
2247 | -#include <gtest/gtest.h> |
2248 | +#pragma GCC diagnostic push |
2249 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2250 | #include <gmock/gmock.h> |
2251 | +#pragma GCC diagnostic pop |
2252 | |
2253 | using namespace std; |
2254 | using namespace testing; |
2255 | |
2256 | === modified file 'test/gtest/scopes/internal/ResultReplyObject/ResultReplyObject_test.cpp' |
2257 | --- test/gtest/scopes/internal/ResultReplyObject/ResultReplyObject_test.cpp 2014-12-01 08:21:05 +0000 |
2258 | +++ test/gtest/scopes/internal/ResultReplyObject/ResultReplyObject_test.cpp 2017-01-16 02:36:15 +0000 |
2259 | @@ -23,7 +23,11 @@ |
2260 | #include <unity/scopes/SearchListenerBase.h> |
2261 | #include <unity/scopes/Department.h> |
2262 | #include <unity/scopes/CategorisedResult.h> |
2263 | + |
2264 | +#pragma GCC diagnostic push |
2265 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2266 | #include <gtest/gtest.h> |
2267 | +#pragma GCC diagnostic pop |
2268 | |
2269 | using namespace unity::scopes; |
2270 | using namespace unity::scopes::internal; |
2271 | |
2272 | === modified file 'test/gtest/scopes/internal/RuntimeConfig/RuntimeConfig_test.cpp' |
2273 | --- test/gtest/scopes/internal/RuntimeConfig/RuntimeConfig_test.cpp 2016-02-22 01:29:01 +0000 |
2274 | +++ test/gtest/scopes/internal/RuntimeConfig/RuntimeConfig_test.cpp 2017-01-16 02:36:15 +0000 |
2275 | @@ -24,7 +24,10 @@ |
2276 | #include <unity/UnityExceptions.h> |
2277 | |
2278 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
2279 | +#pragma GCC diagnostic push |
2280 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2281 | #include <gtest/gtest.h> |
2282 | +#pragma GCC diagnostic pop |
2283 | |
2284 | using namespace std; |
2285 | using namespace unity::scopes; |
2286 | |
2287 | === modified file 'test/gtest/scopes/internal/RuntimeImpl/RuntimeImpl_test.cpp' |
2288 | --- test/gtest/scopes/internal/RuntimeImpl/RuntimeImpl_test.cpp 2014-12-04 04:33:50 +0000 |
2289 | +++ test/gtest/scopes/internal/RuntimeImpl/RuntimeImpl_test.cpp 2017-01-16 02:36:15 +0000 |
2290 | @@ -25,7 +25,11 @@ |
2291 | |
2292 | #include <boost/algorithm/string.hpp> |
2293 | #include <boost/filesystem.hpp> |
2294 | + |
2295 | +#pragma GCC diagnostic push |
2296 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2297 | #include <gtest/gtest.h> |
2298 | +#pragma GCC diagnostic pop |
2299 | |
2300 | #include <fstream> |
2301 | |
2302 | |
2303 | === modified file 'test/gtest/scopes/internal/ScopeConfig/ScopeConfig_test.cpp' |
2304 | --- test/gtest/scopes/internal/ScopeConfig/ScopeConfig_test.cpp 2016-10-13 11:57:05 +0000 |
2305 | +++ test/gtest/scopes/internal/ScopeConfig/ScopeConfig_test.cpp 2017-01-16 02:36:15 +0000 |
2306 | @@ -23,7 +23,10 @@ |
2307 | #include <unity/UnityExceptions.h> |
2308 | |
2309 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
2310 | +#pragma GCC diagnostic push |
2311 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2312 | #include <gtest/gtest.h> |
2313 | +#pragma GCC diagnostic pop |
2314 | |
2315 | using namespace unity::scopes; |
2316 | using namespace unity::scopes::internal; |
2317 | @@ -65,7 +68,7 @@ |
2318 | EXPECT_TRUE(cfg.is_aggregator()); |
2319 | |
2320 | auto attrs = cfg.appearance_attributes(); |
2321 | - EXPECT_EQ(5, attrs.size()); |
2322 | + EXPECT_EQ(5u, attrs.size()); |
2323 | EXPECT_TRUE(attrs["arbitrary_key"].get_bool()); |
2324 | EXPECT_EQ("bar", attrs["another_one"].get_string()); |
2325 | EXPECT_EQ(11, attrs["num_key"].get_int()); |
2326 | @@ -97,7 +100,7 @@ |
2327 | EXPECT_EQ(0, cfg.version()); |
2328 | EXPECT_FALSE(cfg.is_aggregator()); |
2329 | |
2330 | - EXPECT_EQ(0, cfg.appearance_attributes().size()); |
2331 | + EXPECT_EQ(0u, cfg.appearance_attributes().size()); |
2332 | |
2333 | // Optional items that throw if not set |
2334 | |
2335 | @@ -137,13 +140,13 @@ |
2336 | TEST(ScopeConfig, empty_scope_ids) |
2337 | { |
2338 | ScopeConfig cfg(EMPTY_CHILD_IDS); |
2339 | - EXPECT_EQ(cfg.child_scope_ids().size(), 0); |
2340 | + EXPECT_EQ(0u, cfg.child_scope_ids().size()); |
2341 | } |
2342 | |
2343 | TEST(ScopeConfig, single_scope_id) |
2344 | { |
2345 | ScopeConfig cfg(SINGLE_CHILD_ID); |
2346 | - EXPECT_EQ(cfg.child_scope_ids().size(), 1); |
2347 | + EXPECT_EQ(1u, cfg.child_scope_ids().size()); |
2348 | } |
2349 | |
2350 | TEST(ScopeConfig, bad_timeout) |
2351 | @@ -206,13 +209,13 @@ |
2352 | TEST(ScopeConfig, empty_keywords) |
2353 | { |
2354 | ScopeConfig cfg(EMPTY_KEYWORDS); |
2355 | - EXPECT_EQ(cfg.keywords().size(), 0); |
2356 | + EXPECT_EQ(0u, cfg.keywords().size()); |
2357 | } |
2358 | |
2359 | TEST(ScopeConfig, single_keyword) |
2360 | { |
2361 | ScopeConfig cfg(SINGLE_KEYWORD); |
2362 | - EXPECT_EQ(cfg.keywords().size(), 1); |
2363 | + EXPECT_EQ(1u, cfg.keywords().size()); |
2364 | } |
2365 | |
2366 | TEST(ScopeConfig, empty_display_name) |
2367 | |
2368 | === modified file 'test/gtest/scopes/internal/ScopeLoader/ScopeLoader_test.cpp' |
2369 | --- test/gtest/scopes/internal/ScopeLoader/ScopeLoader_test.cpp 2014-08-28 00:20:56 +0000 |
2370 | +++ test/gtest/scopes/internal/ScopeLoader/ScopeLoader_test.cpp 2017-01-16 02:36:15 +0000 |
2371 | @@ -21,7 +21,10 @@ |
2372 | #include <unity/scopes/internal/ScopeLoader.h> |
2373 | #include <unity/UnityExceptions.h> |
2374 | |
2375 | +#pragma GCC diagnostic push |
2376 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2377 | #include <gtest/gtest.h> |
2378 | +#pragma GCC diagnostic pop |
2379 | |
2380 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
2381 | #include "Counters.h" |
2382 | |
2383 | === modified file 'test/gtest/scopes/internal/ScopeMetadataImpl/ScopeMetadataImpl_test.cpp' |
2384 | --- test/gtest/scopes/internal/ScopeMetadataImpl/ScopeMetadataImpl_test.cpp 2015-01-27 12:46:11 +0000 |
2385 | +++ test/gtest/scopes/internal/ScopeMetadataImpl/ScopeMetadataImpl_test.cpp 2017-01-16 02:36:15 +0000 |
2386 | @@ -25,7 +25,10 @@ |
2387 | #include <unity/UnityExceptions.h> |
2388 | |
2389 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
2390 | +#pragma GCC diagnostic push |
2391 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2392 | #include <gtest/gtest.h> |
2393 | +#pragma GCC diagnostic pop |
2394 | |
2395 | using namespace std; |
2396 | using namespace unity; |
2397 | @@ -61,7 +64,7 @@ |
2398 | EXPECT_EQ("display_name", m.display_name()); |
2399 | EXPECT_EQ("description", m.description()); |
2400 | EXPECT_EQ("author", m.author()); |
2401 | - EXPECT_EQ(0, m.appearance_attributes().size()); |
2402 | + EXPECT_EQ(0u, m.appearance_attributes().size()); |
2403 | EXPECT_EQ(ScopeMetadata::ResultsTtlType::Medium, m.results_ttl_type()); |
2404 | |
2405 | // Check that optional fields that are not set throw |
2406 | @@ -144,7 +147,7 @@ |
2407 | EXPECT_EQ("display_name", mi2->display_name()); |
2408 | EXPECT_EQ("description", mi2->description()); |
2409 | EXPECT_EQ("author", mi2->author()); |
2410 | - EXPECT_EQ(0, mi2->appearance_attributes().size()); |
2411 | + EXPECT_EQ(0u, mi2->appearance_attributes().size()); |
2412 | EXPECT_EQ(ScopeMetadata::ResultsTtlType::Medium, mi2->results_ttl_type()); |
2413 | EXPECT_EQ(0, mi2->version()); |
2414 | |
2415 | |
2416 | === modified file 'test/gtest/scopes/internal/SettingsDB/SettingsDB_test.cpp' |
2417 | --- test/gtest/scopes/internal/SettingsDB/SettingsDB_test.cpp 2016-03-15 04:36:08 +0000 |
2418 | +++ test/gtest/scopes/internal/SettingsDB/SettingsDB_test.cpp 2017-01-16 02:36:15 +0000 |
2419 | @@ -24,7 +24,11 @@ |
2420 | |
2421 | #include <boost/algorithm/string.hpp> |
2422 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
2423 | +#pragma GCC diagnostic push |
2424 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2425 | #include <gtest/gtest.h> |
2426 | +#pragma GCC diagnostic pop |
2427 | + |
2428 | #include <fcntl.h> |
2429 | #include <ctime> |
2430 | #include <thread> |
2431 | @@ -91,7 +95,7 @@ |
2432 | auto db = SettingsDB::create_from_ini_file(db_name, schema); |
2433 | |
2434 | // If db doesn't exist, default values are returned. |
2435 | - EXPECT_EQ(4, db->settings().size()); |
2436 | + EXPECT_EQ(4u, db->settings().size()); |
2437 | EXPECT_EQ("London", db->settings()["locationSetting"].get_string()); |
2438 | EXPECT_EQ(1, db->settings()["unitTempSetting"].get_int()); |
2439 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2440 | @@ -101,7 +105,7 @@ |
2441 | write_db("db_empty.ini"); |
2442 | |
2443 | // Default values must still be there. |
2444 | - EXPECT_EQ(4, db->settings().size()); |
2445 | + EXPECT_EQ(4u, db->settings().size()); |
2446 | EXPECT_EQ("London", db->settings()["locationSetting"].get_string()); |
2447 | EXPECT_EQ(1, db->settings()["unitTempSetting"].get_int()); |
2448 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2449 | @@ -111,7 +115,7 @@ |
2450 | write_db("db_unknown_setting.ini"); |
2451 | |
2452 | // Default values must still be there. |
2453 | - EXPECT_EQ(4, db->settings().size()); |
2454 | + EXPECT_EQ(4u, db->settings().size()); |
2455 | EXPECT_EQ("London", db->settings()["locationSetting"].get_string()); |
2456 | EXPECT_EQ(1, db->settings()["unitTempSetting"].get_int()); |
2457 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2458 | @@ -119,7 +123,7 @@ |
2459 | |
2460 | // Change the location. |
2461 | write_db("db_location.ini"); |
2462 | - EXPECT_EQ(4, db->settings().size()); |
2463 | + EXPECT_EQ(4u, db->settings().size()); |
2464 | EXPECT_EQ("New York", db->settings()["locationSetting"].get_string()); |
2465 | EXPECT_EQ(1, db->settings()["unitTempSetting"].get_int()); |
2466 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2467 | @@ -127,7 +131,7 @@ |
2468 | |
2469 | // Change the unit. |
2470 | write_db("db_loctemp.ini"); |
2471 | - EXPECT_EQ(4, db->settings().size()); |
2472 | + EXPECT_EQ(4u, db->settings().size()); |
2473 | EXPECT_EQ("New York", db->settings()["locationSetting"].get_string()); |
2474 | EXPECT_EQ(0, db->settings()["unitTempSetting"].get_int()); |
2475 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2476 | @@ -135,7 +139,7 @@ |
2477 | |
2478 | // Change the age. |
2479 | write_db("db_loctempage.ini"); |
2480 | - EXPECT_EQ(4, db->settings().size()); |
2481 | + EXPECT_EQ(4u, db->settings().size()); |
2482 | EXPECT_EQ("New York", db->settings()["locationSetting"].get_string()); |
2483 | EXPECT_EQ(0, db->settings()["unitTempSetting"].get_int()); |
2484 | EXPECT_EQ(42.0, db->settings()["ageSetting"].get_double()); |
2485 | @@ -144,7 +148,7 @@ |
2486 | // Call settings again. This causes state_changed_ in the implementation |
2487 | // to remain false because the generation count hasn't changed, meaning |
2488 | // that we must see the same unchanged values as last time. |
2489 | - EXPECT_EQ(4, db->settings().size()); |
2490 | + EXPECT_EQ(4u, db->settings().size()); |
2491 | EXPECT_EQ("New York", db->settings()["locationSetting"].get_string()); |
2492 | EXPECT_EQ(0, db->settings()["unitTempSetting"].get_int()); |
2493 | EXPECT_EQ(42, db->settings()["ageSetting"].get_double()); |
2494 | @@ -152,7 +156,7 @@ |
2495 | |
2496 | // Change enabled boolean. |
2497 | write_db("db_loctempageenabled.ini"); |
2498 | - EXPECT_EQ(4, db->settings().size()); |
2499 | + EXPECT_EQ(4u, db->settings().size()); |
2500 | EXPECT_EQ("New York", db->settings()["locationSetting"].get_string()); |
2501 | EXPECT_EQ(0, db->settings()["unitTempSetting"].get_int()); |
2502 | EXPECT_EQ(42, db->settings()["ageSetting"].get_double()); |
2503 | @@ -167,7 +171,7 @@ |
2504 | auto db = SettingsDB::create_from_ini_file(db_name, schema); |
2505 | |
2506 | // Check that we now can see only the other two values. (DB doesn't exist yet.) |
2507 | - EXPECT_EQ(2, db->settings().size()); |
2508 | + EXPECT_EQ(2u, db->settings().size()); |
2509 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2510 | EXPECT_TRUE(db->settings()["enabledSetting"].get_bool()); |
2511 | |
2512 | @@ -175,7 +179,7 @@ |
2513 | write_db("db_loctemp.ini"); |
2514 | |
2515 | // Check that they are correct |
2516 | - EXPECT_EQ(4, db->settings().size()); |
2517 | + EXPECT_EQ(4u, db->settings().size()); |
2518 | EXPECT_EQ("New York", db->settings()["locationSetting"].get_string()); |
2519 | EXPECT_EQ(0, db->settings()["unitTempSetting"].get_int()); |
2520 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2521 | @@ -193,7 +197,7 @@ |
2522 | write_db("db_loctemp.ini"); |
2523 | |
2524 | // Check that they are correct. |
2525 | - EXPECT_EQ(4, db->settings().size()); |
2526 | + EXPECT_EQ(4u, db->settings().size()); |
2527 | EXPECT_EQ("New York", db->settings()["locationSetting"].get_string()); |
2528 | EXPECT_EQ(0, db->settings()["unitTempSetting"].get_int()); |
2529 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2530 | @@ -203,7 +207,7 @@ |
2531 | write_db("db_loctemp_bad_age.ini"); |
2532 | |
2533 | // Check that nothing has changed. |
2534 | - EXPECT_EQ(4, db->settings().size()); |
2535 | + EXPECT_EQ(4u, db->settings().size()); |
2536 | EXPECT_EQ("Paris", db->settings()["locationSetting"].get_string()); |
2537 | EXPECT_EQ(0, db->settings()["unitTempSetting"].get_int()); |
2538 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2539 | @@ -220,12 +224,12 @@ |
2540 | auto db = SettingsDB::create_from_ini_file(db_name, schema); |
2541 | |
2542 | // If db doesn't exist, default values are returned. |
2543 | - EXPECT_EQ(1, db->settings().size()); |
2544 | + EXPECT_EQ(1u, db->settings().size()); |
2545 | EXPECT_EQ("çš„", db->settings()["locationSetting"].get_string()); |
2546 | |
2547 | // Change the location. |
2548 | write_db("db_chinese_location.ini"); |
2549 | - EXPECT_EQ(1, db->settings().size()); |
2550 | + EXPECT_EQ(1u, db->settings().size()); |
2551 | EXPECT_EQ("丈", db->settings()["locationSetting"].get_string()); |
2552 | } |
2553 | } |
2554 | @@ -239,7 +243,7 @@ |
2555 | auto db = SettingsDB::create_from_ini_file(db_name, schema); |
2556 | |
2557 | // If db doesn't exist, default values are returned. |
2558 | - EXPECT_EQ(4, db->settings().size()); |
2559 | + EXPECT_EQ(4u, db->settings().size()); |
2560 | EXPECT_EQ("London", db->settings()["locationSetting"].get_string()); |
2561 | EXPECT_EQ(1, db->settings()["unitTempSetting"].get_int()); |
2562 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2563 | @@ -249,7 +253,7 @@ |
2564 | write_db("db_loctempageenabled.ini"); |
2565 | |
2566 | // Settings should be updated. |
2567 | - EXPECT_EQ(4, db->settings().size()); |
2568 | + EXPECT_EQ(4u, db->settings().size()); |
2569 | EXPECT_EQ("New York", db->settings()["locationSetting"].get_string()); |
2570 | EXPECT_EQ(0, db->settings()["unitTempSetting"].get_int()); |
2571 | EXPECT_EQ(42, db->settings()["ageSetting"].get_double()); |
2572 | @@ -259,7 +263,7 @@ |
2573 | unlink(db_name.c_str()); |
2574 | |
2575 | // Default values should come back. |
2576 | - EXPECT_EQ(4, db->settings().size()); |
2577 | + EXPECT_EQ(4u, db->settings().size()); |
2578 | EXPECT_EQ("London", db->settings()["locationSetting"].get_string()); |
2579 | EXPECT_EQ(1, db->settings()["unitTempSetting"].get_int()); |
2580 | EXPECT_EQ(23, db->settings()["ageSetting"].get_double()); |
2581 | @@ -290,12 +294,12 @@ |
2582 | auto db = SettingsDB::create_from_json_string(db_name, ok_schema); |
2583 | |
2584 | // If db doesn't exist, default values are returned. |
2585 | - EXPECT_EQ(1, db->settings().size()); |
2586 | + EXPECT_EQ(1u, db->settings().size()); |
2587 | EXPECT_EQ("London", db->settings()["location"].get_string()); |
2588 | |
2589 | // Change the location. |
2590 | write_db("db_location_json.ini"); |
2591 | - EXPECT_EQ(1, db->settings().size()); |
2592 | + EXPECT_EQ(1u, db->settings().size()); |
2593 | EXPECT_EQ("New York", db->settings()["location"].get_string()); |
2594 | } |
2595 | } |
2596 | @@ -363,7 +367,7 @@ |
2597 | auto schema = TEST_SRC_DIR "/schema.ini"; |
2598 | auto db = SettingsDB::create_from_ini_file(db_name, schema); |
2599 | |
2600 | - EXPECT_EQ(4, db->settings().size()); |
2601 | + EXPECT_EQ(4u, db->settings().size()); |
2602 | EXPECT_EQ("Munich", db->settings()["locationSetting"].get_string()); |
2603 | |
2604 | |
2605 | @@ -381,7 +385,7 @@ |
2606 | } |
2607 | catch (ResourceException const& e) |
2608 | { |
2609 | - boost::regex r("unity::ResourceException: unity::FileException: Could not load ini file .*: Key file contains line 'x' which is not a key-value pair, group, or comment \\(errno = 1\\)"); |
2610 | + boost::regex r("unity::ResourceException: unity::FileException: Could not load ini file .*: Key file contains line .*"); |
2611 | EXPECT_TRUE(boost::regex_match(e.what(), r)) << e.what(); |
2612 | } |
2613 | } |
2614 | |
2615 | === modified file 'test/gtest/scopes/internal/ThreadPool/ThreadPool_test.cpp' |
2616 | --- test/gtest/scopes/internal/ThreadPool/ThreadPool_test.cpp 2014-09-22 05:50:56 +0000 |
2617 | +++ test/gtest/scopes/internal/ThreadPool/ThreadPool_test.cpp 2017-01-16 02:36:15 +0000 |
2618 | @@ -20,7 +20,11 @@ |
2619 | |
2620 | #include <unity/UnityExceptions.h> |
2621 | |
2622 | +#pragma GCC diagnostic push |
2623 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2624 | #include <gtest/gtest.h> |
2625 | +#pragma GCC diagnostic pop |
2626 | + |
2627 | #include <valgrind/valgrind.h> |
2628 | |
2629 | using namespace std; |
2630 | |
2631 | === modified file 'test/gtest/scopes/internal/ThreadSafeQueue/ThreadSafeQueue_test.cpp' |
2632 | --- test/gtest/scopes/internal/ThreadSafeQueue/ThreadSafeQueue_test.cpp 2014-09-08 05:55:39 +0000 |
2633 | +++ test/gtest/scopes/internal/ThreadSafeQueue/ThreadSafeQueue_test.cpp 2017-01-16 02:36:15 +0000 |
2634 | @@ -18,7 +18,10 @@ |
2635 | |
2636 | #include <unity/scopes/internal/ThreadSafeQueue.h> |
2637 | |
2638 | +#pragma GCC diagnostic push |
2639 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2640 | #include <gtest/gtest.h> |
2641 | +#pragma GCC diagnostic pop |
2642 | |
2643 | #include <future> |
2644 | |
2645 | |
2646 | === modified file 'test/gtest/scopes/internal/UniqueID/UniqueID_test.cpp' |
2647 | --- test/gtest/scopes/internal/UniqueID/UniqueID_test.cpp 2014-02-25 12:08:41 +0000 |
2648 | +++ test/gtest/scopes/internal/UniqueID/UniqueID_test.cpp 2017-01-16 02:36:15 +0000 |
2649 | @@ -18,7 +18,10 @@ |
2650 | |
2651 | #include <unity/scopes/internal/UniqueID.h> |
2652 | |
2653 | +#pragma GCC diagnostic push |
2654 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2655 | #include <gtest/gtest.h> |
2656 | +#pragma GCC diagnostic pop |
2657 | |
2658 | using namespace std; |
2659 | using namespace unity::scopes::internal; |
2660 | |
2661 | === modified file 'test/gtest/scopes/internal/Utils/Utils_test.cpp' |
2662 | --- test/gtest/scopes/internal/Utils/Utils_test.cpp 2016-10-07 15:42:53 +0000 |
2663 | +++ test/gtest/scopes/internal/Utils/Utils_test.cpp 2017-01-16 02:36:15 +0000 |
2664 | @@ -18,9 +18,14 @@ |
2665 | |
2666 | #include <unity/scopes/internal/Utils.h> |
2667 | |
2668 | +#include <unity/UnityExceptions.h> |
2669 | + |
2670 | #include <boost/filesystem.hpp> |
2671 | + |
2672 | +#pragma GCC diagnostic push |
2673 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2674 | #include <gtest/gtest.h> |
2675 | -#include <unity/UnityExceptions.h> |
2676 | +#pragma GCC diagnostic pop |
2677 | |
2678 | using namespace unity::scopes; |
2679 | using namespace unity::scopes::internal; |
2680 | @@ -39,13 +44,24 @@ |
2681 | |
2682 | TEST(Utils, uncamelcase_turkish) |
2683 | { |
2684 | - char *old_locale = strdup(getenv("LC_ALL")); |
2685 | + string old_locale; |
2686 | + char const* p = getenv("LC_ALL"); |
2687 | + if (p) |
2688 | + { |
2689 | + old_locale = p; |
2690 | + } |
2691 | setenv("LC_ALL", "tr_TR.UTF-8", 1); |
2692 | |
2693 | EXPECT_EQ("small-i", uncamelcase("smallI")); |
2694 | |
2695 | - setenv("LC_ALL", old_locale, 1); |
2696 | - free(old_locale); |
2697 | + if (!old_locale.empty()) |
2698 | + { |
2699 | + setenv("LC_ALL", old_locale.c_str(), 1); |
2700 | + } |
2701 | + else |
2702 | + { |
2703 | + unsetenv("LC_ALL"); |
2704 | + } |
2705 | } |
2706 | |
2707 | TEST(Utils, convert_to) |
2708 | @@ -170,7 +186,7 @@ |
2709 | |
2710 | // Test argument splitting |
2711 | auto exec_args = split_exec_args("test", "/path\\ to/exec' 'file arg \"arg 2\" arg' '3 arg\\ 4"); |
2712 | - ASSERT_EQ(5, exec_args.size()); |
2713 | + ASSERT_EQ(5u, exec_args.size()); |
2714 | EXPECT_STREQ("\"/path to/exec file\"", exec_args[0].c_str()); |
2715 | EXPECT_STREQ("arg", exec_args[1].c_str()); |
2716 | EXPECT_STREQ("\"arg 2\"", exec_args[2].c_str()); |
2717 | |
2718 | === modified file 'test/gtest/scopes/internal/gobj_ptr/gobj_ptr_test.cpp' |
2719 | --- test/gtest/scopes/internal/gobj_ptr/gobj_ptr_test.cpp 2016-03-15 04:43:56 +0000 |
2720 | +++ test/gtest/scopes/internal/gobj_ptr/gobj_ptr_test.cpp 2017-01-16 02:36:15 +0000 |
2721 | @@ -22,7 +22,11 @@ |
2722 | |
2723 | #include <unity/scopes/internal/gobj_memory.h> |
2724 | #include <glib-object.h> |
2725 | + |
2726 | +#pragma GCC diagnostic push |
2727 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2728 | #include <gtest/gtest.h> |
2729 | +#pragma GCC diagnostic pop |
2730 | |
2731 | using namespace std; |
2732 | using namespace unity::scopes::internal; |
2733 | @@ -87,17 +91,17 @@ |
2734 | TEST(Gobj_ptr, refcount) |
2735 | { |
2736 | GObject* o = G_OBJECT(g_object_new(G_TYPE_OBJECT, nullptr)); |
2737 | - EXPECT_EQ(1, o->ref_count); |
2738 | + EXPECT_EQ(1u, o->ref_count); |
2739 | g_object_ref(o); |
2740 | |
2741 | { |
2742 | - EXPECT_EQ(2, o->ref_count); |
2743 | + EXPECT_EQ(2u, o->ref_count); |
2744 | gobj_ptr<GObject> u(o); |
2745 | - EXPECT_EQ(2, o->ref_count); |
2746 | + EXPECT_EQ(2u, o->ref_count); |
2747 | // Now it dies and refcount is reduced. |
2748 | } |
2749 | |
2750 | - EXPECT_EQ(1, o->ref_count); |
2751 | + EXPECT_EQ(1u, o->ref_count); |
2752 | g_object_unref(o); |
2753 | } |
2754 | |
2755 | @@ -105,14 +109,14 @@ |
2756 | { |
2757 | GObject* o = G_OBJECT(g_object_new(G_TYPE_OBJECT, nullptr)); |
2758 | gobj_ptr<GObject> u(o); |
2759 | - EXPECT_EQ(1, u->ref_count); |
2760 | + EXPECT_EQ(1u, u->ref_count); |
2761 | gobj_ptr<GObject> u2(u); |
2762 | - EXPECT_EQ(2, u->ref_count); |
2763 | + EXPECT_EQ(2u, u->ref_count); |
2764 | gobj_ptr<GObject> u3 = u2; |
2765 | - EXPECT_EQ(3, u->ref_count); |
2766 | + EXPECT_EQ(3u, u->ref_count); |
2767 | u3.reset(); |
2768 | u2.reset(); |
2769 | - EXPECT_EQ(1, u->ref_count); |
2770 | + EXPECT_EQ(1u, u->ref_count); |
2771 | } |
2772 | |
2773 | TEST(Gobj_ptr, swap) |
2774 | |
2775 | === modified file 'test/gtest/scopes/internal/safe_strerror/safe_strerror_test.cpp' |
2776 | --- test/gtest/scopes/internal/safe_strerror/safe_strerror_test.cpp 2014-11-17 01:29:26 +0000 |
2777 | +++ test/gtest/scopes/internal/safe_strerror/safe_strerror_test.cpp 2017-01-16 02:36:15 +0000 |
2778 | @@ -17,7 +17,11 @@ |
2779 | */ |
2780 | |
2781 | #include <unity/scopes/internal/safe_strerror.h> |
2782 | + |
2783 | +#pragma GCC diagnostic push |
2784 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2785 | #include <gtest/gtest.h> |
2786 | +#pragma GCC diagnostic pop |
2787 | |
2788 | using namespace unity::scopes::internal; |
2789 | |
2790 | |
2791 | === modified file 'test/gtest/scopes/internal/smartscopes/HttpClient/HttpClient_test.cpp' |
2792 | --- test/gtest/scopes/internal/smartscopes/HttpClient/HttpClient_test.cpp 2015-01-16 06:13:57 +0000 |
2793 | +++ test/gtest/scopes/internal/smartscopes/HttpClient/HttpClient_test.cpp 2017-01-16 02:36:15 +0000 |
2794 | @@ -21,7 +21,11 @@ |
2795 | |
2796 | #include "../RaiiServer.h" |
2797 | |
2798 | +#pragma GCC diagnostic push |
2799 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2800 | #include <gtest/gtest.h> |
2801 | +#pragma GCC diagnostic pop |
2802 | + |
2803 | #include <memory> |
2804 | #include <thread> |
2805 | |
2806 | |
2807 | === modified file 'test/gtest/scopes/internal/smartscopes/SSConfig/SSConfig_test.cpp' |
2808 | --- test/gtest/scopes/internal/smartscopes/SSConfig/SSConfig_test.cpp 2014-07-25 07:29:19 +0000 |
2809 | +++ test/gtest/scopes/internal/smartscopes/SSConfig/SSConfig_test.cpp 2017-01-16 02:36:15 +0000 |
2810 | @@ -21,7 +21,10 @@ |
2811 | #include <unity/scopes/ScopeExceptions.h> |
2812 | #include <unity/UnityExceptions.h> |
2813 | |
2814 | +#pragma GCC diagnostic push |
2815 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2816 | #include <gtest/gtest.h> |
2817 | +#pragma GCC diagnostic pop |
2818 | |
2819 | using namespace std; |
2820 | using namespace unity; |
2821 | |
2822 | === modified file 'test/gtest/scopes/internal/smartscopes/SmartScopesClient/SmartScopesClient_test.cpp' |
2823 | --- test/gtest/scopes/internal/smartscopes/SmartScopesClient/SmartScopesClient_test.cpp 2016-03-14 07:24:54 +0000 |
2824 | +++ test/gtest/scopes/internal/smartscopes/SmartScopesClient/SmartScopesClient_test.cpp 2017-01-16 02:36:15 +0000 |
2825 | @@ -29,7 +29,11 @@ |
2826 | |
2827 | #include "../RaiiServer.h" |
2828 | |
2829 | +#pragma GCC diagnostic push |
2830 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2831 | #include <gtest/gtest.h> |
2832 | +#pragma GCC diagnostic pop |
2833 | + |
2834 | #include <memory> |
2835 | #include <thread> |
2836 | |
2837 | @@ -84,7 +88,7 @@ |
2838 | |
2839 | // first try an invalid locale (should throw) |
2840 | EXPECT_THROW(ssc_->get_remote_scopes(scopes, "test_FAIL", false), std::exception); |
2841 | - ASSERT_EQ(0, scopes.size()); |
2842 | + ASSERT_EQ(0u, scopes.size()); |
2843 | |
2844 | // now try an empty locale |
2845 | EXPECT_TRUE(ssc_->get_remote_scopes(scopes, "", false)); |
2846 | @@ -165,7 +169,7 @@ |
2847 | params = vm["parameters"].get_dict(); |
2848 | EXPECT_TRUE(params["defaultValue"].get_bool()); |
2849 | } |
2850 | - ASSERT_EQ(4, scopes[2].keywords.size()); |
2851 | + ASSERT_EQ(4u, scopes[2].keywords.size()); |
2852 | EXPECT_NE(scopes[2].keywords.end(), scopes[2].keywords.find("music")); |
2853 | EXPECT_NE(scopes[2].keywords.end(), scopes[2].keywords.find("video")); |
2854 | EXPECT_NE(scopes[2].keywords.end(), scopes[2].keywords.find("news")); |
2855 | @@ -265,27 +269,27 @@ |
2856 | |
2857 | // check filters |
2858 | EXPECT_FALSE(filters.empty()); |
2859 | - EXPECT_EQ(filters.size(), 1); |
2860 | + EXPECT_EQ(1u, filters.size()); |
2861 | auto filter1 = filters.front(); |
2862 | auto option_filter = std::dynamic_pointer_cast<const OptionSelectorFilter>(filter1); |
2863 | EXPECT_TRUE(option_filter != nullptr); |
2864 | - EXPECT_EQ(option_filter->label(), "Label"); |
2865 | - EXPECT_EQ(option_filter->id(), "sorting_primary_filter"); |
2866 | - EXPECT_EQ(option_filter->display_hints(), FilterBase::DisplayHints::Primary); |
2867 | - EXPECT_EQ(option_filter->multi_select(), false); |
2868 | + EXPECT_EQ("Label", option_filter->label()); |
2869 | + EXPECT_EQ("sorting_primary_filter", option_filter->id()); |
2870 | + EXPECT_EQ(FilterBase::DisplayHints::Primary, option_filter->display_hints()); |
2871 | + EXPECT_FALSE(option_filter->multi_select()); |
2872 | |
2873 | auto options = option_filter->options(); |
2874 | - EXPECT_EQ(options.size(), 3); |
2875 | - EXPECT_EQ(options.front()->id(), "titlerank"); |
2876 | - EXPECT_EQ(options.front()->label(), "Title rank"); |
2877 | - EXPECT_EQ(options.back()->id(), "salesrank"); |
2878 | - EXPECT_EQ(options.back()->label(), "Bestselling"); |
2879 | + EXPECT_EQ(3u, options.size()); |
2880 | + EXPECT_EQ("titlerank", options.front()->id()); |
2881 | + EXPECT_EQ("Title rank", options.front()->label()); |
2882 | + EXPECT_EQ("salesrank", options.back()->id()); |
2883 | + EXPECT_EQ("Bestselling", options.back()->label()); |
2884 | |
2885 | EXPECT_TRUE(option_filter->has_active_option(filter_state)); |
2886 | auto active_options = option_filter->active_options(filter_state); |
2887 | EXPECT_FALSE(active_options.empty()); |
2888 | auto active_option = *(active_options.begin()); |
2889 | - EXPECT_EQ(active_option->id(), "salesrank"); |
2890 | + EXPECT_EQ("salesrank", active_option->id()); |
2891 | } |
2892 | |
2893 | TEST_F(SmartScopesClientTest, filter_groups) |
2894 | @@ -326,7 +330,7 @@ |
2895 | |
2896 | // check filters |
2897 | EXPECT_FALSE(filters.empty()); |
2898 | - EXPECT_EQ(filters.size(), 1); |
2899 | + EXPECT_EQ(1u, filters.size()); |
2900 | auto filter1 = filters.front(); |
2901 | auto option_filter = std::dynamic_pointer_cast<const OptionSelectorFilter>(filter1); |
2902 | EXPECT_TRUE(option_filter != nullptr); |
2903 | @@ -334,19 +338,19 @@ |
2904 | EXPECT_TRUE(grp != nullptr); |
2905 | EXPECT_EQ("g1", grp->id()); |
2906 | EXPECT_EQ("Group 1", grp->label()); |
2907 | - EXPECT_EQ(option_filter->label(), "Label"); |
2908 | - EXPECT_EQ(option_filter->id(), "sorting_primary_filter"); |
2909 | - EXPECT_EQ(option_filter->display_hints(), FilterBase::DisplayHints::Primary); |
2910 | - EXPECT_EQ(option_filter->multi_select(), false); |
2911 | + EXPECT_EQ("Label", option_filter->label()); |
2912 | + EXPECT_EQ("sorting_primary_filter", option_filter->id()); |
2913 | + EXPECT_EQ(FilterBase::DisplayHints::Primary, option_filter->display_hints()); |
2914 | + EXPECT_FALSE(option_filter->multi_select()); |
2915 | |
2916 | auto options = option_filter->options(); |
2917 | - EXPECT_EQ(options.size(), 2); |
2918 | + EXPECT_EQ(2u, options.size()); |
2919 | |
2920 | EXPECT_TRUE(option_filter->has_active_option(filter_state)); |
2921 | auto active_options = option_filter->active_options(filter_state); |
2922 | EXPECT_FALSE(active_options.empty()); |
2923 | auto active_option = *(active_options.begin()); |
2924 | - EXPECT_EQ(active_option->id(), "salesrank"); |
2925 | + EXPECT_EQ("salesrank", active_option->id()); |
2926 | } |
2927 | |
2928 | TEST_F(SmartScopesClientTest, userAgentHeader) |
2929 | |
2930 | === modified file 'test/gtest/scopes/internal/smartscopes/smartscopesproxy/smartscopesproxy_test.cpp' |
2931 | --- test/gtest/scopes/internal/smartscopes/smartscopesproxy/smartscopesproxy_test.cpp 2015-04-29 17:01:02 +0000 |
2932 | +++ test/gtest/scopes/internal/smartscopes/smartscopesproxy/smartscopesproxy_test.cpp 2017-01-16 02:36:15 +0000 |
2933 | @@ -32,7 +32,11 @@ |
2934 | #include "../RaiiServer.h" |
2935 | |
2936 | #include <memory> |
2937 | + |
2938 | +#pragma GCC diagnostic push |
2939 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
2940 | #include <gtest/gtest.h> |
2941 | +#pragma GCC diagnostic pop |
2942 | |
2943 | using namespace testing; |
2944 | using namespace unity::scopes; |
2945 | @@ -136,15 +140,15 @@ |
2946 | EXPECT_EQ("Dummy demo scope 3.", meta.description()); |
2947 | EXPECT_EQ("Mr.Fake", meta.author()); |
2948 | EXPECT_FALSE(meta.invisible()); |
2949 | - EXPECT_EQ(4, meta.settings_definitions().size()); |
2950 | + EXPECT_EQ(4u, meta.settings_definitions().size()); |
2951 | EXPECT_EQ("unitTemp", meta.settings_definitions()[1].get_dict()["id"].get_string()); |
2952 | EXPECT_EQ("Temperature Units", meta.settings_definitions()[1].get_dict()["displayName"].get_string()); |
2953 | EXPECT_EQ("list", meta.settings_definitions()[1].get_dict()["type"].get_string()); |
2954 | EXPECT_EQ(1, meta.settings_definitions()[1].get_dict()["defaultValue"].get_int()); |
2955 | - EXPECT_EQ(2, meta.settings_definitions()[1].get_dict()["displayValues"].get_array().size()); |
2956 | + EXPECT_EQ(2u, meta.settings_definitions()[1].get_dict()["displayValues"].get_array().size()); |
2957 | EXPECT_EQ("Celsius", meta.settings_definitions()[1].get_dict()["displayValues"].get_array()[0].get_string()); |
2958 | EXPECT_EQ("Fahrenheit", meta.settings_definitions()[1].get_dict()["displayValues"].get_array()[1].get_string()); |
2959 | - ASSERT_EQ(4, meta.keywords().size()); |
2960 | + ASSERT_EQ(4u, meta.keywords().size()); |
2961 | EXPECT_NE(meta.keywords().end(), meta.keywords().find("music")); |
2962 | EXPECT_NE(meta.keywords().end(), meta.keywords().find("video")); |
2963 | EXPECT_NE(meta.keywords().end(), meta.keywords().find("news")); |
2964 | @@ -176,12 +180,12 @@ |
2965 | EXPECT_EQ("Dummy demo scope 3.", meta.description()); |
2966 | EXPECT_EQ("Mr.Fake", meta.author()); |
2967 | EXPECT_FALSE(meta.invisible()); |
2968 | - EXPECT_EQ(4, meta.settings_definitions().size()); |
2969 | + EXPECT_EQ(4u, meta.settings_definitions().size()); |
2970 | EXPECT_EQ("unitTemp", meta.settings_definitions()[1].get_dict()["id"].get_string()); |
2971 | EXPECT_EQ("Temperature Units", meta.settings_definitions()[1].get_dict()["displayName"].get_string()); |
2972 | EXPECT_EQ("list", meta.settings_definitions()[1].get_dict()["type"].get_string()); |
2973 | EXPECT_EQ(1, meta.settings_definitions()[1].get_dict()["defaultValue"].get_int()); |
2974 | - EXPECT_EQ(2, meta.settings_definitions()[1].get_dict()["displayValues"].get_array().size()); |
2975 | + EXPECT_EQ(2u, meta.settings_definitions()[1].get_dict()["displayValues"].get_array().size()); |
2976 | EXPECT_EQ("Celsius", meta.settings_definitions()[1].get_dict()["displayValues"].get_array()[0].get_string()); |
2977 | EXPECT_EQ("Fahrenheit", meta.settings_definitions()[1].get_dict()["displayValues"].get_array()[1].get_string()); |
2978 | } |
2979 | @@ -192,7 +196,7 @@ |
2980 | // set an invalid LANGUAGE env var (should return 0 scopes) |
2981 | ::setenv("LANGUAGE", "test_FAIL", 1); |
2982 | reset_reg(); |
2983 | - EXPECT_EQ(0, reg_->list().size()); |
2984 | + EXPECT_EQ(0u, reg_->list().size()); |
2985 | |
2986 | // set an empty LANGUAGE env var (should return 2 scopes) |
2987 | ::setenv("LANGUAGE", "", 1); |
2988 | @@ -217,7 +221,7 @@ |
2989 | // set a colon seperated LANGUAGE env var (first invalid - should return 0 scopes) |
2990 | ::setenv("LANGUAGE", "test_FAIL:test_TEST", 1); |
2991 | reset_reg(); |
2992 | - EXPECT_EQ(0, reg_->list().size()); |
2993 | + EXPECT_EQ(0u, reg_->list().size()); |
2994 | } |
2995 | |
2996 | class Receiver : public SearchListenerBase |
2997 | |
2998 | === modified file 'test/gtest/scopes/internal/zmq_middleware/ConnectionPool/ConnectionPool_test.cpp' |
2999 | --- test/gtest/scopes/internal/zmq_middleware/ConnectionPool/ConnectionPool_test.cpp 2014-10-09 00:49:02 +0000 |
3000 | +++ test/gtest/scopes/internal/zmq_middleware/ConnectionPool/ConnectionPool_test.cpp 2017-01-16 02:36:15 +0000 |
3001 | @@ -20,7 +20,10 @@ |
3002 | |
3003 | #include <zmqpp/context.hpp> |
3004 | |
3005 | +#pragma GCC diagnostic push |
3006 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3007 | #include <gtest/gtest.h> |
3008 | +#pragma GCC diagnostic pop |
3009 | |
3010 | using namespace std; |
3011 | using namespace unity::scopes::internal::zmq_middleware; |
3012 | |
3013 | === modified file 'test/gtest/scopes/internal/zmq_middleware/ObjectAdapter/ObjectAdapter_test.cpp' |
3014 | --- test/gtest/scopes/internal/zmq_middleware/ObjectAdapter/ObjectAdapter_test.cpp 2014-11-18 07:04:04 +0000 |
3015 | +++ test/gtest/scopes/internal/zmq_middleware/ObjectAdapter/ObjectAdapter_test.cpp 2017-01-16 02:36:15 +0000 |
3016 | @@ -30,7 +30,11 @@ |
3017 | |
3018 | #include <boost/regex.hpp> // Use Boost implementation until http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 is fixed. |
3019 | #include <capnp/serialize.h> |
3020 | + |
3021 | +#pragma GCC diagnostic push |
3022 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3023 | #include <gtest/gtest.h> |
3024 | +#pragma GCC diagnostic pop |
3025 | |
3026 | using namespace std; |
3027 | using namespace unity; |
3028 | |
3029 | === modified file 'test/gtest/scopes/internal/zmq_middleware/PubSub/PubSub_test.cpp' |
3030 | --- test/gtest/scopes/internal/zmq_middleware/PubSub/PubSub_test.cpp 2014-11-18 07:04:04 +0000 |
3031 | +++ test/gtest/scopes/internal/zmq_middleware/PubSub/PubSub_test.cpp 2017-01-16 02:36:15 +0000 |
3032 | @@ -20,7 +20,11 @@ |
3033 | #include <unity/scopes/internal/zmq_middleware/ZmqMiddleware.h> |
3034 | #include <unity/scopes/ScopeExceptions.h> |
3035 | |
3036 | +#pragma GCC diagnostic push |
3037 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3038 | #include <gtest/gtest.h> |
3039 | +#pragma GCC diagnostic pop |
3040 | + |
3041 | #include <condition_variable> |
3042 | #include <mutex> |
3043 | |
3044 | |
3045 | === modified file 'test/gtest/scopes/internal/zmq_middleware/RegistryI/RegistryI_test.cpp' |
3046 | --- test/gtest/scopes/internal/zmq_middleware/RegistryI/RegistryI_test.cpp 2016-02-22 00:19:46 +0000 |
3047 | +++ test/gtest/scopes/internal/zmq_middleware/RegistryI/RegistryI_test.cpp 2017-01-16 02:36:15 +0000 |
3048 | @@ -52,7 +52,10 @@ |
3049 | |
3050 | #pragma pop_macro("BOOST_RANGE_ENABLE_CONCEPT_ASSERT") |
3051 | |
3052 | +#pragma GCC diagnostic push |
3053 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3054 | #include <gtest/gtest.h> |
3055 | +#pragma GCC diagnostic pop |
3056 | |
3057 | #include <array> |
3058 | #include <cassert> |
3059 | @@ -459,7 +462,7 @@ |
3060 | pid_t only_child_pid() |
3061 | { |
3062 | auto pids = child_pids(); |
3063 | - EXPECT_EQ(1, pids.size()) << "Expected to find a single child process"; |
3064 | + EXPECT_EQ(1u, pids.size()) << "Expected to find a single child process"; |
3065 | return pids[0]; |
3066 | } |
3067 | |
3068 | |
3069 | === modified file 'test/gtest/scopes/internal/zmq_middleware/ServantBase/ServantBase_test.cpp' |
3070 | --- test/gtest/scopes/internal/zmq_middleware/ServantBase/ServantBase_test.cpp 2014-11-18 07:04:04 +0000 |
3071 | +++ test/gtest/scopes/internal/zmq_middleware/ServantBase/ServantBase_test.cpp 2017-01-16 02:36:15 +0000 |
3072 | @@ -22,7 +22,10 @@ |
3073 | #include <unity/scopes/internal/zmq_middleware/ObjectAdapter.h> |
3074 | #include <unity/UnityExceptions.h> |
3075 | |
3076 | +#pragma GCC diagnostic push |
3077 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3078 | #include <gtest/gtest.h> |
3079 | +#pragma GCC diagnostic pop |
3080 | |
3081 | #include <cassert> |
3082 | |
3083 | |
3084 | === modified file 'test/gtest/scopes/internal/zmq_middleware/StopPublisher/StopPublisher_test.cpp' |
3085 | --- test/gtest/scopes/internal/zmq_middleware/StopPublisher/StopPublisher_test.cpp 2014-04-14 23:47:33 +0000 |
3086 | +++ test/gtest/scopes/internal/zmq_middleware/StopPublisher/StopPublisher_test.cpp 2017-01-16 02:36:15 +0000 |
3087 | @@ -20,7 +20,10 @@ |
3088 | #include <unity/scopes/ScopeExceptions.h> |
3089 | #include <zmqpp/poller.hpp> |
3090 | |
3091 | +#pragma GCC diagnostic push |
3092 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3093 | #include <gtest/gtest.h> |
3094 | +#pragma GCC diagnostic pop |
3095 | |
3096 | using namespace std; |
3097 | using namespace unity::scopes; |
3098 | |
3099 | === modified file 'test/gtest/scopes/internal/zmq_middleware/Util/Util_test.cpp' |
3100 | --- test/gtest/scopes/internal/zmq_middleware/Util/Util_test.cpp 2014-08-28 00:20:56 +0000 |
3101 | +++ test/gtest/scopes/internal/zmq_middleware/Util/Util_test.cpp 2017-01-16 02:36:15 +0000 |
3102 | @@ -22,7 +22,11 @@ |
3103 | #include <unity/scopes/ScopeExceptions.h> |
3104 | |
3105 | #include <sys/un.h> |
3106 | + |
3107 | +#pragma GCC diagnostic push |
3108 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3109 | #include <gtest/gtest.h> |
3110 | +#pragma GCC diagnostic pop |
3111 | |
3112 | using namespace std; |
3113 | using namespace unity; |
3114 | |
3115 | === modified file 'test/gtest/scopes/internal/zmq_middleware/VariantConverter/VariantConverter_test.cpp' |
3116 | --- test/gtest/scopes/internal/zmq_middleware/VariantConverter/VariantConverter_test.cpp 2015-03-30 15:58:45 +0000 |
3117 | +++ test/gtest/scopes/internal/zmq_middleware/VariantConverter/VariantConverter_test.cpp 2017-01-16 02:36:15 +0000 |
3118 | @@ -20,8 +20,12 @@ |
3119 | #include <scopes/internal/zmq_middleware/capnproto/ValueDict.capnp.h> |
3120 | #include <unity/UnityExceptions.h> |
3121 | |
3122 | +#include <capnp/message.h> |
3123 | + |
3124 | +#pragma GCC diagnostic push |
3125 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3126 | #include <gtest/gtest.h> |
3127 | -#include <capnp/message.h> |
3128 | +#pragma GCC diagnostic pop |
3129 | |
3130 | using namespace std; |
3131 | using namespace unity; |
3132 | |
3133 | === modified file 'test/gtest/scopes/internal/zmq_middleware/ZmqMiddleware/ZmqMiddleware_test.cpp' |
3134 | --- test/gtest/scopes/internal/zmq_middleware/ZmqMiddleware/ZmqMiddleware_test.cpp 2015-05-29 12:02:54 +0000 |
3135 | +++ test/gtest/scopes/internal/zmq_middleware/ZmqMiddleware/ZmqMiddleware_test.cpp 2017-01-16 02:36:15 +0000 |
3136 | @@ -23,7 +23,10 @@ |
3137 | #include <unity/scopes/internal/zmq_middleware/ZmqObjectProxy.h> |
3138 | #include <unity/scopes/ScopeExceptions.h> |
3139 | |
3140 | +#pragma GCC diagnostic push |
3141 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3142 | #include <gtest/gtest.h> |
3143 | +#pragma GCC diagnostic pop |
3144 | |
3145 | using namespace std; |
3146 | using namespace unity::scopes; |
3147 | |
3148 | === modified file 'test/gtest/scopes/qt/JsonAsyncReader/JsonAsyncReader_test.cpp' |
3149 | --- test/gtest/scopes/qt/JsonAsyncReader/JsonAsyncReader_test.cpp 2015-02-19 02:30:09 +0000 |
3150 | +++ test/gtest/scopes/qt/JsonAsyncReader/JsonAsyncReader_test.cpp 2017-01-16 02:36:15 +0000 |
3151 | @@ -23,7 +23,11 @@ |
3152 | |
3153 | #include <QtCore/QJsonObject> |
3154 | |
3155 | +#pragma GCC diagnostic push |
3156 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3157 | #include <gtest/gtest.h> |
3158 | +#pragma GCC diagnostic pop |
3159 | + |
3160 | #include <core/posix/exec.h> |
3161 | |
3162 | namespace posix = core::posix; |
3163 | @@ -162,7 +166,7 @@ |
3164 | } |
3165 | |
3166 | // check that we've got 5 valid results |
3167 | - EXPECT_EQ(results.size(), 5); |
3168 | + EXPECT_EQ(5u, results.size()); |
3169 | } |
3170 | |
3171 | TEST_F(ExceptionsTest, check_xml_bad_formed) |
3172 | |
3173 | === modified file 'test/gtest/scopes/qt/XmlAsyncReader/XmlAsyncReader_test.cpp' |
3174 | --- test/gtest/scopes/qt/XmlAsyncReader/XmlAsyncReader_test.cpp 2015-02-19 02:30:09 +0000 |
3175 | +++ test/gtest/scopes/qt/XmlAsyncReader/XmlAsyncReader_test.cpp 2017-01-16 02:36:15 +0000 |
3176 | @@ -23,7 +23,10 @@ |
3177 | #include <QtCore/QXmlStreamReader> |
3178 | #include <QtCore/QJsonObject> |
3179 | |
3180 | +#pragma GCC diagnostic push |
3181 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3182 | #include <gtest/gtest.h> |
3183 | +#pragma GCC diagnostic pop |
3184 | |
3185 | #include <core/posix/exec.h> |
3186 | |
3187 | |
3188 | === modified file 'test/gtest/scopes/qt/qt-bindings/QActionMetadata_test.cpp' |
3189 | --- test/gtest/scopes/qt/qt-bindings/QActionMetadata_test.cpp 2015-02-19 02:30:09 +0000 |
3190 | +++ test/gtest/scopes/qt/qt-bindings/QActionMetadata_test.cpp 2017-01-16 02:36:15 +0000 |
3191 | @@ -16,7 +16,10 @@ |
3192 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3193 | */ |
3194 | |
3195 | +#pragma GCC diagnostic push |
3196 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3197 | #include <gtest/gtest.h> |
3198 | +#pragma GCC diagnostic pop |
3199 | |
3200 | #include <unity/scopes/qt/QActionMetadata.h> |
3201 | |
3202 | |
3203 | === modified file 'test/gtest/scopes/qt/qt-bindings/QCannedQuery_test.cpp' |
3204 | --- test/gtest/scopes/qt/qt-bindings/QCannedQuery_test.cpp 2015-02-24 02:11:17 +0000 |
3205 | +++ test/gtest/scopes/qt/qt-bindings/QCannedQuery_test.cpp 2017-01-16 02:36:15 +0000 |
3206 | @@ -16,7 +16,10 @@ |
3207 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3208 | */ |
3209 | |
3210 | +#pragma GCC diagnostic push |
3211 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3212 | #include <gtest/gtest.h> |
3213 | +#pragma GCC diagnostic pop |
3214 | |
3215 | #include <unity/scopes/qt/QCannedQuery.h> |
3216 | #include <unity/scopes/qt/internal/QCannedQueryImpl.h> |
3217 | @@ -49,7 +52,7 @@ |
3218 | |
3219 | unity::scopes::VariantMap api_map = api_query->serialize(); |
3220 | QVariantMap qt_map = query.serialize(); |
3221 | - EXPECT_EQ(api_map.size(), qt_map.size()); |
3222 | + EXPECT_EQ(int(api_map.size()), qt_map.size()); |
3223 | EXPECT_TRUE(qt_map.size() != 0); |
3224 | EXPECT_EQ(variantmap_to_qvariantmap(api_map), qt_map); |
3225 | |
3226 | |
3227 | === modified file 'test/gtest/scopes/qt/qt-bindings/QCategorisedResult_test.cpp' |
3228 | --- test/gtest/scopes/qt/qt-bindings/QCategorisedResult_test.cpp 2015-02-25 12:37:03 +0000 |
3229 | +++ test/gtest/scopes/qt/qt-bindings/QCategorisedResult_test.cpp 2017-01-16 02:36:15 +0000 |
3230 | @@ -16,7 +16,10 @@ |
3231 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3232 | */ |
3233 | |
3234 | +#pragma GCC diagnostic push |
3235 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3236 | #include <gtest/gtest.h> |
3237 | +#pragma GCC diagnostic pop |
3238 | |
3239 | #include <unity/scopes/qt/QCategorisedResult.h> |
3240 | #include <unity/scopes/qt/QCategory.h> |
3241 | |
3242 | === modified file 'test/gtest/scopes/qt/qt-bindings/QColumnLayout_test.cpp' |
3243 | --- test/gtest/scopes/qt/qt-bindings/QColumnLayout_test.cpp 2015-02-24 02:11:17 +0000 |
3244 | +++ test/gtest/scopes/qt/qt-bindings/QColumnLayout_test.cpp 2017-01-16 02:36:15 +0000 |
3245 | @@ -16,7 +16,10 @@ |
3246 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3247 | */ |
3248 | |
3249 | +#pragma GCC diagnostic push |
3250 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3251 | #include <gtest/gtest.h> |
3252 | +#pragma GCC diagnostic pop |
3253 | |
3254 | #include <unity/scopes/qt/QColumnLayout.h> |
3255 | #include <unity/scopes/qt/internal/QColumnLayoutImpl.h> |
3256 | @@ -50,7 +53,7 @@ |
3257 | QVector<QString> retrieved_widget_ids = layout.column(0); |
3258 | |
3259 | std::vector<std::string> api_widgets = api_layout->column(0); |
3260 | - EXPECT_EQ(api_widgets.size(), retrieved_widget_ids.size()); |
3261 | + EXPECT_EQ(int(api_widgets.size()), retrieved_widget_ids.size()); |
3262 | EXPECT_TRUE(api_widgets.size() != 0); |
3263 | for (uint i = 0; i < api_widgets.size(); ++i) |
3264 | { |
3265 | @@ -59,7 +62,7 @@ |
3266 | |
3267 | retrieved_widget_ids = layout.column(1); |
3268 | api_widgets = api_layout->column(1); |
3269 | - EXPECT_EQ(api_widgets.size(), retrieved_widget_ids.size()); |
3270 | + EXPECT_EQ(int(api_widgets.size()), retrieved_widget_ids.size()); |
3271 | EXPECT_TRUE(api_widgets.size() != 0); |
3272 | for (uint i = 0; i < api_widgets.size(); ++i) |
3273 | { |
3274 | |
3275 | === modified file 'test/gtest/scopes/qt/qt-bindings/QDepartment_test.cpp' |
3276 | --- test/gtest/scopes/qt/qt-bindings/QDepartment_test.cpp 2015-02-24 02:11:17 +0000 |
3277 | +++ test/gtest/scopes/qt/qt-bindings/QDepartment_test.cpp 2017-01-16 02:36:15 +0000 |
3278 | @@ -16,7 +16,10 @@ |
3279 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3280 | */ |
3281 | |
3282 | +#pragma GCC diagnostic push |
3283 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3284 | #include <gtest/gtest.h> |
3285 | +#pragma GCC diagnostic pop |
3286 | |
3287 | #include <unity/scopes/qt/QCannedQuery.h> |
3288 | #include <unity/scopes/qt/QDepartment.h> |
3289 | @@ -63,7 +66,7 @@ |
3290 | unity::scopes::DepartmentList api_list = api_dep->subdepartments(); |
3291 | |
3292 | EXPECT_TRUE(qt_list.size() != 0); |
3293 | - EXPECT_EQ(qt_list.size(), api_list.size()); |
3294 | + EXPECT_EQ(qt_list.size(), int(api_list.size())); |
3295 | |
3296 | std::vector<std::string> dep_ids; |
3297 | for (auto item : api_list) |
3298 | |
3299 | === modified file 'test/gtest/scopes/qt/qt-bindings/QPreviewQueryBaseAPI_test.cpp' |
3300 | --- test/gtest/scopes/qt/qt-bindings/QPreviewQueryBaseAPI_test.cpp 2015-02-19 05:27:04 +0000 |
3301 | +++ test/gtest/scopes/qt/qt-bindings/QPreviewQueryBaseAPI_test.cpp 2017-01-16 02:36:15 +0000 |
3302 | @@ -16,8 +16,10 @@ |
3303 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3304 | */ |
3305 | |
3306 | -#include <gtest/gtest.h> |
3307 | +#pragma GCC diagnostic push |
3308 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3309 | #include <gmock/gmock.h> |
3310 | +#pragma GCC diagnostic pop |
3311 | |
3312 | #include "BasicEventsChecker.h" |
3313 | #include "TestSetup.h" |
3314 | |
3315 | === modified file 'test/gtest/scopes/qt/qt-bindings/QPreviewWidget_test.cpp' |
3316 | --- test/gtest/scopes/qt/qt-bindings/QPreviewWidget_test.cpp 2015-02-24 06:56:42 +0000 |
3317 | +++ test/gtest/scopes/qt/qt-bindings/QPreviewWidget_test.cpp 2017-01-16 02:36:15 +0000 |
3318 | @@ -16,7 +16,10 @@ |
3319 | * Authored by: Michi Henning <michi.henning@canonical.com> |
3320 | */ |
3321 | |
3322 | +#pragma GCC diagnostic push |
3323 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3324 | #include <gtest/gtest.h> |
3325 | +#pragma GCC diagnostic pop |
3326 | |
3327 | #include <unity/scopes/qt/QPreviewWidget.h> |
3328 | #include <unity/scopes/qt/internal/QPreviewWidgetImpl.h> |
3329 | |
3330 | === modified file 'test/gtest/scopes/qt/qt-bindings/QScopeBaseAPIImpl_test.cpp' |
3331 | --- test/gtest/scopes/qt/qt-bindings/QScopeBaseAPIImpl_test.cpp 2015-02-24 04:03:22 +0000 |
3332 | +++ test/gtest/scopes/qt/qt-bindings/QScopeBaseAPIImpl_test.cpp 2017-01-16 02:36:15 +0000 |
3333 | @@ -16,9 +16,11 @@ |
3334 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3335 | */ |
3336 | |
3337 | -#include <gtest/gtest.h> |
3338 | +#pragma GCC diagnostic push |
3339 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3340 | #include <gmock/gmock.h> |
3341 | #include <gmock/gmock-actions.h> |
3342 | +#pragma GCC diagnostic pop |
3343 | |
3344 | #include "QMockScope.h" |
3345 | #include "QScopeBaseAPIMock.h" |
3346 | |
3347 | === modified file 'test/gtest/scopes/qt/qt-bindings/QScopeCreation_test.cpp' |
3348 | --- test/gtest/scopes/qt/qt-bindings/QScopeCreation_test.cpp 2015-02-24 04:05:51 +0000 |
3349 | +++ test/gtest/scopes/qt/qt-bindings/QScopeCreation_test.cpp 2017-01-16 02:36:15 +0000 |
3350 | @@ -17,7 +17,11 @@ |
3351 | */ |
3352 | |
3353 | #include "FakeScope.h" |
3354 | + |
3355 | +#pragma GCC diagnostic push |
3356 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3357 | #include <gtest/gtest.h> |
3358 | +#pragma GCC diagnostic pop |
3359 | |
3360 | #include <unity/scopes/qt/QScopeBaseAPI.h> |
3361 | |
3362 | |
3363 | === modified file 'test/gtest/scopes/qt/qt-bindings/QSearchMetadata_test.cpp' |
3364 | --- test/gtest/scopes/qt/qt-bindings/QSearchMetadata_test.cpp 2015-02-19 02:30:09 +0000 |
3365 | +++ test/gtest/scopes/qt/qt-bindings/QSearchMetadata_test.cpp 2017-01-16 02:36:15 +0000 |
3366 | @@ -16,7 +16,10 @@ |
3367 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3368 | */ |
3369 | |
3370 | +#pragma GCC diagnostic push |
3371 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3372 | #include <gtest/gtest.h> |
3373 | +#pragma GCC diagnostic pop |
3374 | |
3375 | #include <unity/scopes/qt/QSearchMetadata.h> |
3376 | |
3377 | |
3378 | === modified file 'test/gtest/scopes/qt/qt-bindings/QSearchQueryBaseAPI_test.cpp' |
3379 | --- test/gtest/scopes/qt/qt-bindings/QSearchQueryBaseAPI_test.cpp 2015-02-19 02:30:09 +0000 |
3380 | +++ test/gtest/scopes/qt/qt-bindings/QSearchQueryBaseAPI_test.cpp 2017-01-16 02:36:15 +0000 |
3381 | @@ -16,8 +16,10 @@ |
3382 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3383 | */ |
3384 | |
3385 | -#include <gtest/gtest.h> |
3386 | +#pragma GCC diagnostic push |
3387 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3388 | #include <gmock/gmock.h> |
3389 | +#pragma GCC diagnostic pop |
3390 | |
3391 | #include "BasicEventsChecker.h" |
3392 | #include "TestSetup.h" |
3393 | |
3394 | === modified file 'test/gtest/scopes/qt/qt-bindings/QUtils_test.cpp' |
3395 | --- test/gtest/scopes/qt/qt-bindings/QUtils_test.cpp 2015-02-24 02:11:17 +0000 |
3396 | +++ test/gtest/scopes/qt/qt-bindings/QUtils_test.cpp 2017-01-16 02:36:15 +0000 |
3397 | @@ -16,7 +16,10 @@ |
3398 | * Authored by: Michi Henning <michi.henning@canonical.com> |
3399 | */ |
3400 | |
3401 | +#pragma GCC diagnostic push |
3402 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3403 | #include <gtest/gtest.h> |
3404 | +#pragma GCC diagnostic pop |
3405 | |
3406 | #include <unity/scopes/qt/internal/QUtils.h> |
3407 | |
3408 | @@ -161,7 +164,7 @@ |
3409 | qvm["string"] = "Hello"; |
3410 | |
3411 | VariantMap vm = qvariantmap_to_variantmap(qvm); |
3412 | - ASSERT_EQ(2, vm.size()); |
3413 | + ASSERT_EQ(2u, vm.size()); |
3414 | EXPECT_EQ(42, vm["int"].get_int()); |
3415 | EXPECT_EQ("Hello", vm["string"].get_string()); |
3416 | } |
3417 | |
3418 | === modified file 'test/gtest/scopes/qt/qt-bindings/QVariantBuilder_test.cpp' |
3419 | --- test/gtest/scopes/qt/qt-bindings/QVariantBuilder_test.cpp 2015-02-24 02:11:17 +0000 |
3420 | +++ test/gtest/scopes/qt/qt-bindings/QVariantBuilder_test.cpp 2017-01-16 02:36:15 +0000 |
3421 | @@ -16,7 +16,10 @@ |
3422 | * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com> |
3423 | */ |
3424 | |
3425 | +#pragma GCC diagnostic push |
3426 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3427 | #include <gtest/gtest.h> |
3428 | +#pragma GCC diagnostic pop |
3429 | |
3430 | #include <unity/scopes/qt/QVariantBuilder.h> |
3431 | #include <unity/scopes/qt/internal/QVariantBuilderImpl.h> |
3432 | |
3433 | === modified file 'test/gtest/scopes/stress/scopes-stress.cpp' |
3434 | --- test/gtest/scopes/stress/scopes-stress.cpp 2014-10-24 17:59:48 +0000 |
3435 | +++ test/gtest/scopes/stress/scopes-stress.cpp 2017-01-16 02:36:15 +0000 |
3436 | @@ -18,7 +18,11 @@ |
3437 | |
3438 | // You may also include individual headers if you prefer. |
3439 | #include <unity-scopes.h> |
3440 | + |
3441 | +#pragma GCC diagnostic push |
3442 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3443 | #include <gtest/gtest.h> |
3444 | +#pragma GCC diagnostic pop |
3445 | |
3446 | #include <boost/filesystem.hpp> |
3447 | #include <condition_variable> |
3448 | @@ -107,7 +111,7 @@ |
3449 | RegistryProxy r = rt->registry(); |
3450 | |
3451 | auto scopes_meta = r->list(); |
3452 | - EXPECT_EQ(scopes_meta.size(), 3); |
3453 | + EXPECT_EQ(3u, scopes_meta.size()); |
3454 | |
3455 | const std::list<std::string> scopes {"scope1", "scope2", "scope3"}; |
3456 | |
3457 | @@ -131,7 +135,7 @@ |
3458 | { |
3459 | reply->wait_until_finished(); |
3460 | cout << "finished query for scope " << reply->scope_id() << endl; |
3461 | - EXPECT_EQ(reply->result_count(), 20u); |
3462 | + EXPECT_EQ(20, reply->result_count()); |
3463 | } |
3464 | } |
3465 | } |
3466 | |
3467 | === modified file 'test/gtest/scopes/testing/IsolatedScope/IsolatedScope_test.cpp' |
3468 | --- test/gtest/scopes/testing/IsolatedScope/IsolatedScope_test.cpp 2015-01-28 09:03:59 +0000 |
3469 | +++ test/gtest/scopes/testing/IsolatedScope/IsolatedScope_test.cpp 2017-01-16 02:36:15 +0000 |
3470 | @@ -32,7 +32,10 @@ |
3471 | |
3472 | #include <unity/scopes/CategoryRenderer.h> |
3473 | |
3474 | +#pragma GCC diagnostic push |
3475 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3476 | #include <gtest/gtest.h> |
3477 | +#pragma GCC diagnostic pop |
3478 | |
3479 | #include "scope.h" |
3480 | |
3481 | |
3482 | === modified file 'test/gtest/scopes/testing/IsolatedScopeBenchmark/IsolatedScopeBenchmark_test.cpp' |
3483 | --- test/gtest/scopes/testing/IsolatedScopeBenchmark/IsolatedScopeBenchmark_test.cpp 2014-08-01 14:31:16 +0000 |
3484 | +++ test/gtest/scopes/testing/IsolatedScopeBenchmark/IsolatedScopeBenchmark_test.cpp 2017-01-16 02:36:15 +0000 |
3485 | @@ -26,7 +26,10 @@ |
3486 | |
3487 | #include <unity/scopes/CategoryRenderer.h> |
3488 | |
3489 | +#pragma GCC diagnostic push |
3490 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3491 | #include <gtest/gtest.h> |
3492 | +#pragma GCC diagnostic pop |
3493 | |
3494 | #include "config.h" |
3495 | #include "scope.h" |
3496 | |
3497 | === modified file 'test/gtest/scopes/testing/Statistics/Statistics_test.cpp' |
3498 | --- test/gtest/scopes/testing/Statistics/Statistics_test.cpp 2014-08-28 00:20:56 +0000 |
3499 | +++ test/gtest/scopes/testing/Statistics/Statistics_test.cpp 2017-01-16 02:36:15 +0000 |
3500 | @@ -19,7 +19,10 @@ |
3501 | #include <unity/scopes/testing/Benchmark.h> |
3502 | #include <unity/scopes/testing/Statistics.h> |
3503 | |
3504 | +#pragma GCC diagnostic push |
3505 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3506 | #include <gtest/gtest.h> |
3507 | +#pragma GCC diagnostic pop |
3508 | |
3509 | #include "config.h" |
3510 | |
3511 | |
3512 | === modified file 'test/gtest/scopes/utility/BufferedResultForwarder/BufferedResultForwarder_test.cpp' |
3513 | --- test/gtest/scopes/utility/BufferedResultForwarder/BufferedResultForwarder_test.cpp 2014-12-01 01:51:38 +0000 |
3514 | +++ test/gtest/scopes/utility/BufferedResultForwarder/BufferedResultForwarder_test.cpp 2017-01-16 02:36:15 +0000 |
3515 | @@ -16,7 +16,11 @@ |
3516 | * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com> |
3517 | */ |
3518 | |
3519 | +#pragma GCC diagnostic push |
3520 | +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" |
3521 | #include <gtest/gtest.h> |
3522 | +#pragma GCC diagnostic pop |
3523 | + |
3524 | #include <unity/scopes/utility/BufferedResultForwarder.h> |
3525 | #include <unity/scopes/CategoryRenderer.h> |
3526 | #include <unity/scopes/testing/MockSearchReply.h> |
LGTM