Merge lp:~compiz-team/compiz/compiz.fix_1049169 into lp:compiz/0.9.8
- compiz.fix_1049169
- Merge into 0.9.8
Proposed by
Sam Spilsbury
Status: | Superseded |
---|---|
Proposed branch: | lp:~compiz-team/compiz/compiz.fix_1049169 |
Merge into: | lp:compiz/0.9.8 |
Prerequisite: | lp:~compiz-team/compiz/compiz.fix_1050796 |
Diff against target: |
472 lines (+60/-209) 10 files modified
compizconfig/gsettings/src/gsettings.c (+2/-1) compizconfig/gsettings/tests/compizconfig_ccs_gsettings_settings_env_test.cpp (+0/-17) compizconfig/gsettings/tests/compizconfig_ccs_gsettings_settings_env_test.h (+2/-2) compizconfig/gsettings/tests/test_gsettings_conformance.cpp (+0/-1) compizconfig/gsettings/tests/test_gsettings_tests.h (+13/-8) compizconfig/integration/gnome/gsettings/include/ccs_gnome_integration_gsettings_integrated_setting_factory.h (+3/-0) compizconfig/integration/gnome/gsettings/src/ccs_gnome_integration_gsettings_integrated_setting_factory.c (+12/-0) compizconfig/integration/gnome/gsettings/tests/compizconfig_test_ccs_gnome_gsettings_integrated_setting.cpp (+26/-15) compizconfig/libcompizconfig/src/bindings.c (+2/-2) compizconfig/tests/compizconfig_ccs_list_wrapper.h (+0/-163) |
To merge this branch: | bzr merge lp:~compiz-team/compiz/compiz.fix_1049169 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
jenkins (community) | continuous-integration | Needs Fixing | |
Compiz Maintainers | Pending | ||
Review via email: mp+126163@code.launchpad.net |
This proposal has been superseded by a proposal from 2012-09-25.
Commit message
Fixes memory leaks in the tests
Description of the change
Fixes memory leaks in the tests
To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote : | # |
review:
Needs Fixing
(continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote : | # |
Seems to me like the above failure is probably caused by a missing file. Jenkins doesn't say too much about it, rebuilding locally to check
- 3392. By Sam Spilsbury
-
Merge compiz.fix_1050796
- 3393. By Sam Spilsbury
Revision history for this message
jenkins (martin-mrazik+qa) wrote : | # |
FAILED: Continuous integration, rev:3393
http://
Executed test runs:
FAILURE: http://
review:
Needs Fixing
(continuous-integration)
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'compizconfig/gsettings/src/gsettings.c' | |||
2 | --- compizconfig/gsettings/src/gsettings.c 2012-08-16 17:00:25 +0000 | |||
3 | +++ compizconfig/gsettings/src/gsettings.c 2012-09-25 08:46:22 +0000 | |||
4 | @@ -50,7 +50,8 @@ | |||
5 | 50 | cleanSettingName, | 50 | cleanSettingName, |
6 | 51 | pathName, | 51 | pathName, |
7 | 52 | ccsSettingGetType (setting)); | 52 | ccsSettingGetType (setting)); |
9 | 53 | 53 | free (cleanSettingName); | |
10 | 54 | g_free (pathName); | ||
11 | 54 | return gsettingsValue; | 55 | return gsettingsValue; |
12 | 55 | } | 56 | } |
13 | 56 | 57 | ||
14 | 57 | 58 | ||
15 | === modified file 'compizconfig/gsettings/tests/compizconfig_ccs_gsettings_settings_env_test.cpp' | |||
16 | --- compizconfig/gsettings/tests/compizconfig_ccs_gsettings_settings_env_test.cpp 2012-09-25 08:46:22 +0000 | |||
17 | +++ compizconfig/gsettings/tests/compizconfig_ccs_gsettings_settings_env_test.cpp 2012-09-25 08:46:22 +0000 | |||
18 | @@ -52,8 +52,6 @@ | |||
19 | 52 | 52 | ||
20 | 53 | CCSGSettingsWrapper *mSettings; | 53 | CCSGSettingsWrapper *mSettings; |
21 | 54 | std::string profileName; | 54 | std::string profileName; |
22 | 55 | CompizGLibGSettingsMemoryBackendTestingEnv gsettingsEnv; | ||
23 | 56 | CompizGLibGSliceOffEnv gsliceEnv; | ||
24 | 57 | }; | 55 | }; |
25 | 58 | 56 | ||
26 | 59 | void | 57 | void |
27 | @@ -333,21 +331,6 @@ | |||
28 | 333 | return shared; | 331 | return shared; |
29 | 334 | } | 332 | } |
30 | 335 | 333 | ||
31 | 336 | void | ||
32 | 337 | CCSGSettingsStorageEnv::SetUp () | ||
33 | 338 | { | ||
34 | 339 | g_type_init (); | ||
35 | 340 | priv->gsliceEnv.SetUpEnv (); | ||
36 | 341 | priv->gsettingsEnv.SetUpEnv (MOCK_PATH); | ||
37 | 342 | } | ||
38 | 343 | |||
39 | 344 | void | ||
40 | 345 | CCSGSettingsStorageEnv::TearDown () | ||
41 | 346 | { | ||
42 | 347 | priv->gsettingsEnv.TearDownEnv (); | ||
43 | 348 | priv->gsliceEnv.TearDownEnv (); | ||
44 | 349 | } | ||
45 | 350 | |||
46 | 351 | PrivateCCSGSettingsStorageEnv::PrivateCCSGSettingsStorageEnv (CCSGSettingsWrapper *settings, | 334 | PrivateCCSGSettingsStorageEnv::PrivateCCSGSettingsStorageEnv (CCSGSettingsWrapper *settings, |
47 | 352 | const std::string &profileName) : | 335 | const std::string &profileName) : |
48 | 353 | mSettings (settings), | 336 | mSettings (settings), |
49 | 354 | 337 | ||
50 | === modified file 'compizconfig/gsettings/tests/compizconfig_ccs_gsettings_settings_env_test.h' | |||
51 | --- compizconfig/gsettings/tests/compizconfig_ccs_gsettings_settings_env_test.h 2012-09-25 08:46:22 +0000 | |||
52 | +++ compizconfig/gsettings/tests/compizconfig_ccs_gsettings_settings_env_test.h 2012-09-25 08:46:22 +0000 | |||
53 | @@ -40,8 +40,8 @@ | |||
54 | 40 | { | 40 | { |
55 | 41 | public: | 41 | public: |
56 | 42 | 42 | ||
59 | 43 | virtual void SetUp (); | 43 | virtual void SetUp () {} |
60 | 44 | virtual void TearDown (); | 44 | virtual void TearDown () {} |
61 | 45 | 45 | ||
62 | 46 | CCSGSettingsStorageEnv (CCSGSettingsWrapper *settings, | 46 | CCSGSettingsStorageEnv (CCSGSettingsWrapper *settings, |
63 | 47 | const std::string &profileName); | 47 | const std::string &profileName); |
64 | 48 | 48 | ||
65 | === modified file 'compizconfig/gsettings/tests/test_gsettings_conformance.cpp' | |||
66 | --- compizconfig/gsettings/tests/test_gsettings_conformance.cpp 2012-09-25 08:46:22 +0000 | |||
67 | +++ compizconfig/gsettings/tests/test_gsettings_conformance.cpp 2012-09-25 08:46:22 +0000 | |||
68 | @@ -65,7 +65,6 @@ | |||
69 | 65 | CCSGSettingsBackendEnv () : | 65 | CCSGSettingsBackendEnv () : |
70 | 66 | pluginToMatch ("mock") | 66 | pluginToMatch ("mock") |
71 | 67 | { | 67 | { |
72 | 68 | g_type_init (); | ||
73 | 69 | } | 68 | } |
74 | 70 | 69 | ||
75 | 71 | /* A wrapper to prevent signals from being added */ | 70 | /* A wrapper to prevent signals from being added */ |
76 | 72 | 71 | ||
77 | === modified file 'compizconfig/gsettings/tests/test_gsettings_tests.h' | |||
78 | --- compizconfig/gsettings/tests/test_gsettings_tests.h 2012-09-25 08:46:22 +0000 | |||
79 | +++ compizconfig/gsettings/tests/test_gsettings_tests.h 2012-09-25 08:46:22 +0000 | |||
80 | @@ -45,13 +45,18 @@ | |||
81 | 45 | 45 | ||
82 | 46 | virtual void SetUpEnv () | 46 | virtual void SetUpEnv () |
83 | 47 | { | 47 | { |
85 | 48 | setenv ("G_SLICE", "always-malloc", 1); | 48 | gsliceEnv.SetUpEnv (); |
86 | 49 | g_type_init (); | ||
87 | 49 | } | 50 | } |
88 | 50 | 51 | ||
89 | 51 | virtual void TearDownEnv () | 52 | virtual void TearDownEnv () |
90 | 52 | { | 53 | { |
92 | 53 | unsetenv ("G_SLICE"); | 54 | gsliceEnv.TearDownEnv (); |
93 | 54 | } | 55 | } |
94 | 56 | |||
95 | 57 | private: | ||
96 | 58 | |||
97 | 59 | CompizGLibGSliceOffEnv gsliceEnv; | ||
98 | 55 | }; | 60 | }; |
99 | 56 | 61 | ||
100 | 57 | class CCSGSettingsMemoryBackendTestingEnv : | 62 | class CCSGSettingsMemoryBackendTestingEnv : |
101 | @@ -62,18 +67,18 @@ | |||
102 | 62 | virtual void SetUpEnv () | 67 | virtual void SetUpEnv () |
103 | 63 | { | 68 | { |
104 | 64 | CCSGSettingsTestingEnv::SetUpEnv (); | 69 | CCSGSettingsTestingEnv::SetUpEnv (); |
108 | 65 | 70 | gsettingsEnv.SetUpEnv (MOCK_PATH); | |
106 | 66 | g_setenv ("GSETTINGS_SCHEMA_DIR", MOCK_PATH.c_str (), true); | ||
107 | 67 | g_setenv ("GSETTINGS_BACKEND", "memory", 1); | ||
109 | 68 | } | 71 | } |
110 | 69 | 72 | ||
111 | 70 | virtual void TearDownEnv () | 73 | virtual void TearDownEnv () |
112 | 71 | { | 74 | { |
116 | 72 | g_unsetenv ("GSETTINGS_BACKEND"); | 75 | gsettingsEnv.TearDownEnv (); |
114 | 73 | g_unsetenv ("GSETTINGS_SCHEMA_DIR"); | ||
115 | 74 | |||
117 | 75 | CCSGSettingsTestingEnv::TearDownEnv (); | 76 | CCSGSettingsTestingEnv::TearDownEnv (); |
118 | 76 | } | 77 | } |
119 | 78 | |||
120 | 79 | private: | ||
121 | 80 | |||
122 | 81 | CompizGLibGSettingsMemoryBackendTestingEnv gsettingsEnv; | ||
123 | 77 | }; | 82 | }; |
124 | 78 | 83 | ||
125 | 79 | class CCSGSettingsTestCommon : | 84 | class CCSGSettingsTestCommon : |
126 | 80 | 85 | ||
127 | === modified file 'compizconfig/integration/gnome/gsettings/include/ccs_gnome_integration_gsettings_integrated_setting_factory.h' | |||
128 | --- compizconfig/integration/gnome/gsettings/include/ccs_gnome_integration_gsettings_integrated_setting_factory.h 2012-09-25 08:46:22 +0000 | |||
129 | +++ compizconfig/integration/gnome/gsettings/include/ccs_gnome_integration_gsettings_integrated_setting_factory.h 2012-09-25 08:46:22 +0000 | |||
130 | @@ -60,6 +60,9 @@ | |||
131 | 60 | CCSGNOMEIntegrationGSettingsWrapperFactory * | 60 | CCSGNOMEIntegrationGSettingsWrapperFactory * |
132 | 61 | ccsGNOMEIntegrationGSettingsWrapperDefaultImplNew (CCSObjectAllocationInterface *ai); | 61 | ccsGNOMEIntegrationGSettingsWrapperDefaultImplNew (CCSObjectAllocationInterface *ai); |
133 | 62 | 62 | ||
134 | 63 | void | ||
135 | 64 | ccsGNOMEIntegrationGSettingsWrapperDefaultImplFree (CCSGNOMEIntegrationGSettingsWrapperFactory *wrapperFactory); | ||
136 | 65 | |||
137 | 63 | CCSIntegratedSettingFactory * | 66 | CCSIntegratedSettingFactory * |
138 | 64 | ccsGSettingsIntegratedSettingFactoryNew (CCSGNOMEIntegrationGSettingsWrapperFactory *wrapperFactory, | 67 | ccsGSettingsIntegratedSettingFactoryNew (CCSGNOMEIntegrationGSettingsWrapperFactory *wrapperFactory, |
139 | 65 | CCSGNOMEValueChangeData *data, | 68 | CCSGNOMEValueChangeData *data, |
140 | 66 | 69 | ||
141 | === modified file 'compizconfig/integration/gnome/gsettings/src/ccs_gnome_integration_gsettings_integrated_setting_factory.c' | |||
142 | --- compizconfig/integration/gnome/gsettings/src/ccs_gnome_integration_gsettings_integrated_setting_factory.c 2012-09-25 08:46:22 +0000 | |||
143 | +++ compizconfig/integration/gnome/gsettings/src/ccs_gnome_integration_gsettings_integrated_setting_factory.c 2012-09-25 08:46:22 +0000 | |||
144 | @@ -79,6 +79,14 @@ | |||
145 | 79 | ccsGNOMEIntegrationGSettingsWrapperFactoryNewGSettingsWrapperDefault | 79 | ccsGNOMEIntegrationGSettingsWrapperFactoryNewGSettingsWrapperDefault |
146 | 80 | }; | 80 | }; |
147 | 81 | 81 | ||
148 | 82 | void | ||
149 | 83 | ccsGNOMEIntegrationGSettingsWrapperDefaultImplFree (CCSGNOMEIntegrationGSettingsWrapperFactory *wrapperFactory) | ||
150 | 84 | { | ||
151 | 85 | ccsObjectFinalize (wrapperFactory); | ||
152 | 86 | (*wrapperFactory->object.object_allocation->free_) (wrapperFactory->object.object_allocation->allocator, | ||
153 | 87 | wrapperFactory); | ||
154 | 88 | } | ||
155 | 89 | |||
156 | 82 | CCSGNOMEIntegrationGSettingsWrapperFactory * | 90 | CCSGNOMEIntegrationGSettingsWrapperFactory * |
157 | 83 | ccsGNOMEIntegrationGSettingsWrapperDefaultImplNew (CCSObjectAllocationInterface *ai) | 91 | ccsGNOMEIntegrationGSettingsWrapperDefaultImplNew (CCSObjectAllocationInterface *ai) |
158 | 84 | { | 92 | { |
159 | @@ -279,6 +287,8 @@ | |||
160 | 279 | if (priv->pluginsToSettingNameGNOMENameHashTable) | 287 | if (priv->pluginsToSettingNameGNOMENameHashTable) |
161 | 280 | g_hash_table_unref (priv->pluginsToSettingNameGNOMENameHashTable); | 288 | g_hash_table_unref (priv->pluginsToSettingNameGNOMENameHashTable); |
162 | 281 | 289 | ||
163 | 290 | ccsGNOMEIntegrationGSettingsWrapperDefaultImplFree (priv->wrapperFactory); | ||
164 | 291 | |||
165 | 282 | ccsObjectFinalize (factory); | 292 | ccsObjectFinalize (factory); |
166 | 283 | (*factory->object.object_allocation->free_) (factory->object.object_allocation->allocator, factory); | 293 | (*factory->object.object_allocation->free_) (factory->object.object_allocation->allocator, factory); |
167 | 284 | } | 294 | } |
168 | @@ -318,6 +328,8 @@ | |||
169 | 318 | ccsObjectSetPrivate (factory, (CCSPrivate *) priv); | 328 | ccsObjectSetPrivate (factory, (CCSPrivate *) priv); |
170 | 319 | ccsObjectAddInterface (factory, (const CCSInterface *) &ccsGSettingsIntegratedSettingFactoryInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingFactoryInterface)); | 329 | ccsObjectAddInterface (factory, (const CCSInterface *) &ccsGSettingsIntegratedSettingFactoryInterface, GET_INTERFACE_TYPE (CCSIntegratedSettingFactoryInterface)); |
171 | 320 | 330 | ||
172 | 331 | ccsObjectRef (factory); | ||
173 | 332 | |||
174 | 321 | return factory; | 333 | return factory; |
175 | 322 | } | 334 | } |
176 | 323 | 335 | ||
177 | 324 | 336 | ||
178 | === modified file 'compizconfig/integration/gnome/gsettings/tests/compizconfig_test_ccs_gnome_gsettings_integrated_setting.cpp' | |||
179 | --- compizconfig/integration/gnome/gsettings/tests/compizconfig_test_ccs_gnome_gsettings_integrated_setting.cpp 2012-09-25 08:46:22 +0000 | |||
180 | +++ compizconfig/integration/gnome/gsettings/tests/compizconfig_test_ccs_gnome_gsettings_integrated_setting.cpp 2012-09-25 08:46:22 +0000 | |||
181 | @@ -43,6 +43,7 @@ | |||
182 | 43 | using ::testing::ValuesIn; | 43 | using ::testing::ValuesIn; |
183 | 44 | using ::testing::Values; | 44 | using ::testing::Values; |
184 | 45 | using ::testing::Eq; | 45 | using ::testing::Eq; |
185 | 46 | using ::testing::WithArgs; | ||
186 | 46 | using ::testing::_; | 47 | using ::testing::_; |
187 | 47 | 48 | ||
188 | 48 | namespace compiz | 49 | namespace compiz |
189 | @@ -103,6 +104,7 @@ | |||
190 | 103 | ValueGenerator valueGenerator; | 104 | ValueGenerator valueGenerator; |
191 | 104 | Expectation expectation; | 105 | Expectation expectation; |
192 | 105 | CCSSettingType settingType; | 106 | CCSSettingType settingType; |
193 | 107 | CCSSettingType returnType; | ||
194 | 106 | }; | 108 | }; |
195 | 107 | 109 | ||
196 | 108 | namespace impl | 110 | namespace impl |
197 | @@ -114,10 +116,10 @@ | |||
198 | 114 | 116 | ||
199 | 115 | ccit::GSettingsIntegratedSettingInfo settingsInfo[] = | 117 | ccit::GSettingsIntegratedSettingInfo settingsInfo[] = |
200 | 116 | { | 118 | { |
205 | 117 | { vg::i, cvg::integer, ex::integer, TypeInt }, | 119 | { vg::i, cvg::integer, ex::integer, TypeInt, TypeInt }, |
206 | 118 | { vg::b, cvg::boolean, ex::boolean, TypeBool }, | 120 | { vg::b, cvg::boolean, ex::boolean, TypeBool, TypeBool }, |
207 | 119 | { vg::s, cvg::string, ex::string, TypeString }, | 121 | { vg::s, cvg::string, ex::string, TypeString, TypeString }, |
208 | 120 | { vg::as, cvg::key, ex::key, TypeKey } | 122 | { vg::as, cvg::key, ex::key, TypeKey, TypeString } |
209 | 121 | }; | 123 | }; |
210 | 122 | } | 124 | } |
211 | 123 | } | 125 | } |
212 | @@ -361,6 +363,7 @@ | |||
213 | 361 | const CCSSettingType createSettingType = | 363 | const CCSSettingType createSettingType = |
214 | 362 | std::tr1::get <0> (GetParam ()); | 364 | std::tr1::get <0> (GetParam ()); |
215 | 363 | 365 | ||
216 | 366 | /* The GSettings Integrated setting takes ownership of these */ | ||
217 | 364 | CCSIntegratedSettingInfo *integratedSetting = ccsSharedIntegratedSettingInfoNew (keyName.c_str (), | 367 | CCSIntegratedSettingInfo *integratedSetting = ccsSharedIntegratedSettingInfoNew (keyName.c_str (), |
218 | 365 | keyName.c_str (), | 368 | keyName.c_str (), |
219 | 366 | integratedSettingInfo.settingType, | 369 | integratedSettingInfo.settingType, |
220 | @@ -370,14 +373,15 @@ | |||
221 | 370 | specialType, | 373 | specialType, |
222 | 371 | keyName.c_str (), | 374 | keyName.c_str (), |
223 | 372 | &ccsDefaultObjectAllocator); | 375 | &ccsDefaultObjectAllocator); |
227 | 373 | CCSIntegratedSetting *gsettingsIntegrated = ccsGSettingsIntegratedSettingNew (gnomeIntegratedSetting, | 376 | boost::shared_ptr <CCSIntegratedSetting> gsettingsIntegrated (AutoDestroy (ccsGSettingsIntegratedSettingNew (gnomeIntegratedSetting, |
228 | 374 | mWrapper.get (), | 377 | mWrapper.get (), |
229 | 375 | &ccsDefaultObjectAllocator); | 378 | &ccsDefaultObjectAllocator), |
230 | 379 | ccsIntegratedSettingUnref)); | ||
231 | 376 | 380 | ||
232 | 377 | GVariant *variant = (*integratedSettingInfo.variantGenerator) (); | 381 | GVariant *variant = (*integratedSettingInfo.variantGenerator) (); |
233 | 378 | EXPECT_CALL (*mWrapperMock, getValue (Eq (keyName))).WillOnce (Return (variant)); | 382 | EXPECT_CALL (*mWrapperMock, getValue (Eq (keyName))).WillOnce (Return (variant)); |
234 | 379 | 383 | ||
236 | 380 | CCSSettingValue *value = ccsIntegratedSettingReadValue (gsettingsIntegrated, createSettingType); | 384 | CCSSettingValue *value = ccsIntegratedSettingReadValue (gsettingsIntegrated.get (), createSettingType); |
237 | 381 | 385 | ||
238 | 382 | if (createSettingType == integratedSettingInfo.settingType) | 386 | if (createSettingType == integratedSettingInfo.settingType) |
239 | 383 | (*integratedSettingInfo.expectation) (value); | 387 | (*integratedSettingInfo.expectation) (value); |
240 | @@ -385,7 +389,12 @@ | |||
241 | 385 | EXPECT_THAT (value, IsNull ()); | 389 | EXPECT_THAT (value, IsNull ()); |
242 | 386 | 390 | ||
243 | 387 | if (value) | 391 | if (value) |
245 | 388 | ccsFreeSettingValueWithType (value, integratedSettingInfo.settingType); | 392 | ccsFreeSettingValueWithType (value, integratedSettingInfo.returnType); |
246 | 393 | } | ||
247 | 394 | |||
248 | 395 | ACTION (FreeVariant) | ||
249 | 396 | { | ||
250 | 397 | g_variant_unref (arg0); | ||
251 | 389 | } | 398 | } |
252 | 390 | 399 | ||
253 | 391 | TEST_P (CCSGSettingsIntegratedSettingTest, MatchedTypesReturnValueMismatchedTypesResetOrWrite) | 400 | TEST_P (CCSGSettingsIntegratedSettingTest, MatchedTypesReturnValueMismatchedTypesResetOrWrite) |
254 | @@ -405,14 +414,15 @@ | |||
255 | 405 | specialType, | 414 | specialType, |
256 | 406 | keyName.c_str (), | 415 | keyName.c_str (), |
257 | 407 | &ccsDefaultObjectAllocator); | 416 | &ccsDefaultObjectAllocator); |
261 | 408 | CCSIntegratedSetting *gsettingsIntegrated = ccsGSettingsIntegratedSettingNew (gnomeIntegratedSetting, | 417 | boost::shared_ptr <CCSIntegratedSetting> gsettingsIntegrated (AutoDestroy (ccsGSettingsIntegratedSettingNew (gnomeIntegratedSetting, |
262 | 409 | mWrapper.get (), | 418 | mWrapper.get (), |
263 | 410 | &ccsDefaultObjectAllocator); | 419 | &ccsDefaultObjectAllocator), |
264 | 420 | ccsIntegratedSettingUnref)); | ||
265 | 411 | 421 | ||
266 | 412 | boost::shared_ptr <CCSSettingValue> value ((*integratedSettingInfo.valueGenerator) (), | 422 | boost::shared_ptr <CCSSettingValue> value ((*integratedSettingInfo.valueGenerator) (), |
267 | 413 | boost::bind (ccsFreeSettingValueWithType, | 423 | boost::bind (ccsFreeSettingValueWithType, |
268 | 414 | _1, | 424 | _1, |
270 | 415 | integratedSettingInfo.settingType)); | 425 | integratedSettingInfo.returnType)); |
271 | 416 | boost::shared_ptr <GVariant> variant = AutoDestroy (g_variant_ref ((*integratedSettingInfo.variantGenerator) ()), | 426 | boost::shared_ptr <GVariant> variant = AutoDestroy (g_variant_ref ((*integratedSettingInfo.variantGenerator) ()), |
272 | 417 | g_variant_unref); | 427 | g_variant_unref); |
273 | 418 | boost::shared_ptr <GVariant> newVariant = AutoDestroy (ccvg::fromValue (value.get (), | 428 | boost::shared_ptr <GVariant> newVariant = AutoDestroy (ccvg::fromValue (value.get (), |
274 | @@ -421,11 +431,12 @@ | |||
275 | 421 | EXPECT_CALL (*mWrapperMock, getValue (Eq (keyName))).WillOnce (Return (variant.get ())); | 431 | EXPECT_CALL (*mWrapperMock, getValue (Eq (keyName))).WillOnce (Return (variant.get ())); |
276 | 422 | 432 | ||
277 | 423 | if (createSettingType == integratedSettingInfo.settingType) | 433 | if (createSettingType == integratedSettingInfo.settingType) |
279 | 424 | EXPECT_CALL (*mWrapperMock, setValue (Eq (keyName), VariantEqual (newVariant.get ()))); | 434 | EXPECT_CALL (*mWrapperMock, setValue (Eq (keyName), VariantEqual (newVariant.get ()))) |
280 | 435 | .WillOnce (WithArgs <1> (FreeVariant ())); | ||
281 | 425 | else | 436 | else |
282 | 426 | EXPECT_CALL (*mWrapperMock, resetKey (Eq (keyName))); | 437 | EXPECT_CALL (*mWrapperMock, resetKey (Eq (keyName))); |
283 | 427 | 438 | ||
285 | 428 | ccsIntegratedSettingWriteValue (gsettingsIntegrated, value.get (), createSettingType); | 439 | ccsIntegratedSettingWriteValue (gsettingsIntegrated.get (), value.get (), createSettingType); |
286 | 429 | } | 440 | } |
287 | 430 | 441 | ||
288 | 431 | INSTANTIATE_TEST_CASE_P (CCSGSettingsIntegratedSettingTestMismatchedValues, CCSGSettingsIntegratedSettingTest, | 442 | INSTANTIATE_TEST_CASE_P (CCSGSettingsIntegratedSettingTestMismatchedValues, CCSGSettingsIntegratedSettingTest, |
289 | 432 | 443 | ||
290 | === modified file 'compizconfig/libcompizconfig/src/bindings.c' | |||
291 | --- compizconfig/libcompizconfig/src/bindings.c 2012-07-29 10:11:30 +0000 | |||
292 | +++ compizconfig/libcompizconfig/src/bindings.c 2012-09-25 08:46:22 +0000 | |||
293 | @@ -219,9 +219,9 @@ | |||
294 | 219 | 219 | ||
295 | 220 | if (button->button) | 220 | if (button->button) |
296 | 221 | { | 221 | { |
298 | 222 | char buttonStr[256]; | 222 | char buttonStr[256]; |
299 | 223 | snprintf (buttonStr, 256, "Button%d", button->button); | 223 | snprintf (buttonStr, 256, "Button%d", button->button); |
301 | 224 | binding = stringAppend (binding, buttonStr); | 224 | binding = stringAppend (binding, buttonStr); |
302 | 225 | } | 225 | } |
303 | 226 | 226 | ||
304 | 227 | if (!binding) | 227 | if (!binding) |
305 | 228 | 228 | ||
306 | === removed file 'compizconfig/tests/compizconfig_ccs_list_wrapper.h' | |||
307 | --- compizconfig/tests/compizconfig_ccs_list_wrapper.h 2012-09-25 08:46:22 +0000 | |||
308 | +++ compizconfig/tests/compizconfig_ccs_list_wrapper.h 1970-01-01 00:00:00 +0000 | |||
309 | @@ -1,163 +0,0 @@ | |||
310 | 1 | /* | ||
311 | 2 | * Compiz configuration system library | ||
312 | 3 | * | ||
313 | 4 | * Copyright (C) 2012 Canonical Ltd. | ||
314 | 5 | * | ||
315 | 6 | * This library is free software; you can redistribute it and/or | ||
316 | 7 | * modify it under the terms of the GNU Lesser General Public | ||
317 | 8 | * License as published by the Free Software Foundation; either | ||
318 | 9 | * version 2.1 of the License, or (at your option) any later version. | ||
319 | 10 | |||
320 | 11 | * This library is distributed in the hope that it will be useful, | ||
321 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
322 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
323 | 14 | * Lesser General Public License for more details. | ||
324 | 15 | |||
325 | 16 | * You should have received a copy of the GNU Lesser General Public | ||
326 | 17 | * License along with this library; if not, write to the Free Software | ||
327 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
328 | 19 | * | ||
329 | 20 | * Authored By: | ||
330 | 21 | * Sam Spilsbury <sam.spilsbury@canonical.com> | ||
331 | 22 | */ | ||
332 | 23 | #ifndef _COMPIZCONFIG_CCS_LIST_WRAPPER_H | ||
333 | 24 | #define _COMPIZCONFIG_CCS_LIST_WRAPPER_H | ||
334 | 25 | |||
335 | 26 | #include <ccs-defs.h> | ||
336 | 27 | #include <ccs-setting-types.h> | ||
337 | 28 | |||
338 | 29 | #include <boost/shared_ptr.hpp> | ||
339 | 30 | #include <boost/noncopyable.hpp> | ||
340 | 31 | |||
341 | 32 | typedef struct _CCSSettingValueList * CCSSettingValueList; | ||
342 | 33 | typedef struct _CCSSetting CCSSetting; | ||
343 | 34 | typedef union _CCSSettingInfo CCSSettingInfo; | ||
344 | 35 | typedef struct _CCSSettingValue CCSSettingValue; | ||
345 | 36 | |||
346 | 37 | namespace compiz | ||
347 | 38 | { | ||
348 | 39 | namespace config | ||
349 | 40 | { | ||
350 | 41 | template <typename ListType, typename DataType> | ||
351 | 42 | class ListWrapper : | ||
352 | 43 | boost::noncopyable | ||
353 | 44 | { | ||
354 | 45 | public: | ||
355 | 46 | |||
356 | 47 | virtual ~ListWrapper () {} | ||
357 | 48 | |||
358 | 49 | virtual ListWrapper<ListType, DataType> & append (const DataType &) = 0; | ||
359 | 50 | virtual ListWrapper<ListType, DataType> & remove (const DataType &) = 0; | ||
360 | 51 | |||
361 | 52 | virtual operator const ListType & () const = 0; | ||
362 | 53 | virtual operator ListType & () = 0; | ||
363 | 54 | }; | ||
364 | 55 | |||
365 | 56 | namespace impl | ||
366 | 57 | { | ||
367 | 58 | namespace cc = compiz::config; | ||
368 | 59 | namespace cci = compiz::config::impl; | ||
369 | 60 | |||
370 | 61 | typedef enum _ListStorageType | ||
371 | 62 | { | ||
372 | 63 | Shallow = 0, | ||
373 | 64 | Deep = 1 | ||
374 | 65 | } ListStorageType; | ||
375 | 66 | |||
376 | 67 | template <typename ListType, typename DataType> | ||
377 | 68 | class ListWrapper : | ||
378 | 69 | public cc::ListWrapper <ListType, DataType> | ||
379 | 70 | { | ||
380 | 71 | public: | ||
381 | 72 | |||
382 | 73 | typedef ListType (*ListTypeFreeFunc) (ListType, Bool); | ||
383 | 74 | typedef ListType (*ListTypeAppendFunc) (ListType, DataType); | ||
384 | 75 | typedef ListType (*ListTypeRemoveFunc) (ListType, DataType, Bool); | ||
385 | 76 | |||
386 | 77 | ListWrapper (const ListType &list, | ||
387 | 78 | ListTypeFreeFunc freeFunc, | ||
388 | 79 | ListTypeAppendFunc appendFunc, | ||
389 | 80 | ListTypeRemoveFunc removeFunc, | ||
390 | 81 | ListStorageType storageType) : | ||
391 | 82 | mList (list), | ||
392 | 83 | mFree (freeFunc), | ||
393 | 84 | mAppend (appendFunc), | ||
394 | 85 | mRemove (removeFunc), | ||
395 | 86 | mStorageType (storageType) | ||
396 | 87 | { | ||
397 | 88 | }; | ||
398 | 89 | |||
399 | 90 | cc::ListWrapper<ListType, DataType> & append (DataType const &data) | ||
400 | 91 | { | ||
401 | 92 | mList = (*mAppend) (mList, data); | ||
402 | 93 | return *this; | ||
403 | 94 | } | ||
404 | 95 | |||
405 | 96 | cc::ListWrapper<ListType, DataType> & remove (DataType const &data) | ||
406 | 97 | { | ||
407 | 98 | Bool freeObj = (mStorageType == Deep); | ||
408 | 99 | mList = (*mRemove) (mList, data, freeObj); | ||
409 | 100 | return *this; | ||
410 | 101 | } | ||
411 | 102 | |||
412 | 103 | operator const ListType & () const | ||
413 | 104 | { | ||
414 | 105 | return mList; | ||
415 | 106 | } | ||
416 | 107 | |||
417 | 108 | operator ListType & () | ||
418 | 109 | { | ||
419 | 110 | return mList; | ||
420 | 111 | } | ||
421 | 112 | |||
422 | 113 | ~ListWrapper () | ||
423 | 114 | { | ||
424 | 115 | Bool freeObj = (mStorageType == Deep); | ||
425 | 116 | |||
426 | 117 | (*mFree) (mList, freeObj); | ||
427 | 118 | } | ||
428 | 119 | |||
429 | 120 | private: | ||
430 | 121 | |||
431 | 122 | ListType mList; | ||
432 | 123 | ListTypeFreeFunc mFree; | ||
433 | 124 | ListTypeAppendFunc mAppend; | ||
434 | 125 | ListTypeRemoveFunc mRemove; | ||
435 | 126 | ListStorageType mStorageType; | ||
436 | 127 | }; | ||
437 | 128 | |||
438 | 129 | class PrivateSettingValueListWrapper; | ||
439 | 130 | class SettingValueListWrapper : | ||
440 | 131 | public compiz::config::ListWrapper <CCSSettingValueList, CCSSettingValue *> | ||
441 | 132 | { | ||
442 | 133 | public: | ||
443 | 134 | |||
444 | 135 | typedef boost::shared_ptr <SettingValueListWrapper> Ptr; | ||
445 | 136 | typedef compiz::config::ListWrapper <CCSSettingValueList, CCSSettingValue *> InternalWrapper; | ||
446 | 137 | typedef compiz::config::impl::ListWrapper <CCSSettingValueList, CCSSettingValue *> InternalWrapperImpl; | ||
447 | 138 | |||
448 | 139 | SettingValueListWrapper (CCSSettingValueList list, | ||
449 | 140 | ListStorageType storageType, | ||
450 | 141 | CCSSettingType type, | ||
451 | 142 | const boost::shared_ptr <CCSSettingInfo> &listInfo, | ||
452 | 143 | const boost::shared_ptr <CCSSetting> &settingReference); | ||
453 | 144 | |||
454 | 145 | CCSSettingType type (); | ||
455 | 146 | |||
456 | 147 | InternalWrapper & append (CCSSettingValue * const &value); | ||
457 | 148 | InternalWrapper & remove (CCSSettingValue * const &value); | ||
458 | 149 | operator const CCSSettingValueList & () const; | ||
459 | 150 | operator CCSSettingValueList & (); | ||
460 | 151 | const boost::shared_ptr <CCSSetting> & setting (); | ||
461 | 152 | |||
462 | 153 | private: | ||
463 | 154 | |||
464 | 155 | boost::shared_ptr <PrivateSettingValueListWrapper> priv; | ||
465 | 156 | }; | ||
466 | 157 | } | ||
467 | 158 | } | ||
468 | 159 | } | ||
469 | 160 | |||
470 | 161 | |||
471 | 162 | |||
472 | 163 | #endif |
FAILED: Continuous integration, rev:3391 jenkins. qa.ubuntu. com/job/ compiz- ci/112/ jenkins. qa.ubuntu. com/job/ compiz- ci/./build= pbuilder, distribution= quantal, flavor= amd64/112/ console
http://
Executed test runs:
FAILURE: http://