Merge lp:~compiz-team/compiz/compiz.new-gmock.fixes into lp:~compiz-team/compiz/new-gmock

Proposed by Sam Spilsbury
Status: Merged
Approved by: Andrea Azzarone
Approved revision: 3761
Merged at revision: 3763
Proposed branch: lp:~compiz-team/compiz/compiz.new-gmock.fixes
Merge into: lp:~compiz-team/compiz/new-gmock
Diff against target: 1057 lines (+601/-153)
21 files modified
CMakeLists.txt (+1/-1)
cmake/GoogleTest.cmake (+36/-15)
cmake/src/compiz/compiz_discover_gtest_tests.cpp (+1/-1)
compizconfig/gsettings/tests/CMakeLists.txt (+1/-1)
compizconfig/libcompizconfig/tests/CMakeLists.txt (+2/-2)
compizconfig/libcompizconfig/tests/compizconfig_test_ccs_mock_backend_conformance.cpp (+11/-10)
compizconfig/libcompizconfig/tests/compizconfig_test_ccs_object.cpp (+21/-10)
compizconfig/libcompizconfig/tests/compizconfig_test_ccs_setting.cpp (+0/-2)
compizconfig/mocks/libcompizconfig/CMakeLists.txt (+10/-0)
compizconfig/mocks/libcompizconfig/compizconfig_ccs_setting_stub.cpp (+425/-0)
compizconfig/mocks/libcompizconfig/compizconfig_ccs_setting_stub.h (+44/-0)
compizconfig/tests/CMakeLists.txt (+2/-1)
compizconfig/tests/compizconfig_backend_concept_test.cpp (+31/-16)
compizconfig/tests/compizconfig_ccs_list_wrapper.cpp (+12/-17)
compizconfig/tests/compizconfig_ccs_list_wrapper.h (+4/-5)
plugins/composite/src/pixmapbinding/tests/CMakeLists.txt (+0/-12)
plugins/grid/src/grabhandler/tests/CMakeLists.txt (+0/-12)
plugins/opengl/src/doublebuffer/tests/CMakeLists.txt (+0/-12)
plugins/opengl/src/glxtfpbind/tests/CMakeLists.txt (+0/-12)
plugins/resize/src/logic/tests/CMakeLists.txt (+0/-12)
plugins/wall/src/offset_movement/tests/CMakeLists.txt (+0/-12)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.new-gmock.fixes
Reviewer Review Type Date Requested Status
Andrea Azzarone Approve
Review via email: mp+175213@code.launchpad.net

Commit message

Fix broken tests and detect gmock/gtest correctly:

1. Don't store any mocks in static storage, because gmock makes the assumption that the mocks will be destroyed before ::testing::internal::MockObjectRegistry and that assumption is wrong (undefined construction and destruction order in different translation units)
2. Only add the gmock subdirectory if we could actually find it
3. Fix a small typo
4. Remove duplication in CMakeLists.txt files

Description of the change

Fix broken tests and detect gmock/gtest correctly:

1. Don't store any mocks in static storage, because gmock makes the assumption that the mocks will be destroyed before ::testing::internal::MockObjectRegistry and that assumption is wrong (undefined construction and destruction order in different translation units)
2. Only add the gmock subdirectory if we could actually find it
3. Fix a small typo
4. Remove duplication in CMakeLists.txt files

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-07-15 09:48:24 +0000
3+++ CMakeLists.txt 2013-07-17 07:55:39 +0000
4@@ -156,7 +156,7 @@
5
6 if (COMPIZ_BUILD_TESTING)
7
8- include (FindGoogleTest)
9+ include (GoogleTest)
10
11 if (GOOGLE_TEST_AND_MOCK_FOUND)
12
13
14=== renamed file 'cmake/FindGoogleTest.cmake' => 'cmake/GoogleTest.cmake'
15--- cmake/FindGoogleTest.cmake 2013-07-15 09:48:24 +0000
16+++ cmake/GoogleTest.cmake 2013-07-17 07:55:39 +0000
17@@ -1,18 +1,37 @@
18 find_package (Threads REQUIRED)
19
20-set (GMOCK_INCLUDE_DIR "/usr/include/gmock/include" CACHE PATH "gmock source include directory")
21-set (GMOCK_SOURCE_DIR "/usr/src/gmock" CACHE PATH "gmock source directory")
22-set (GTEST_INCLUDE_DIR "${GMOCK_SOURCE_DIR}/gtest/include" CACHE PATH "gtest source include directory")
23-
24-add_subdirectory(${GMOCK_SOURCE_DIR} "${CMAKE_BINARY_DIR}/__gmock")
25-
26-include_directories (${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR})
27-
28-set (GTEST_BOTH_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} gtest gtest_main)
29+# Find the the Google Mock include directory
30+# by searching the system-wide include directory
31+# paths
32+find_path (GMOCK_INCLUDE_DIR
33+ gmock/gmock.h)
34+
35+if (GMOCK_INCLUDE_DIR)
36+ set (GMOCK_INCLUDE_BASE "include/")
37+ string (LENGTH ${GMOCK_INCLUDE_BASE} GMOCK_INCLUDE_BASE_LENGTH)
38+ string (LENGTH ${GMOCK_INCLUDE_DIR} GMOCK_INCLUDE_DIR_LENGTH)
39+
40+ math (EXPR
41+ GMOCK_INCLUDE_PREFIX_LENGTH
42+ "${GMOCK_INCLUDE_DIR_LENGTH} - ${GMOCK_INCLUDE_BASE_LENGTH}")
43+ string (SUBSTRING
44+ ${GMOCK_INCLUDE_DIR}
45+ 0
46+ ${GMOCK_INCLUDE_PREFIX_LENGTH}
47+ GMOCK_INCLUDE_PREFIX)
48+
49+ set (GMOCK_SRC_DIR ${GMOCK_INCLUDE_PREFIX}/src/gmock CACHE PATH "Path to Google Mock Sources")
50+ set (GMOCK_INCLUDE_DIR ${GMOCK_INCLUDE_DIR} CACHE PATH "Path to Google Mock Headers")
51+ set (GTEST_INCLUDE_DIR ${GMOCK_SRC_DIR}/gtest/include CACHE PATH "Path to Google Test Headers")
52+
53+ set (GMOCK_LIBRARY "gmock" CACHE STRING "Name of the Google Mock library")
54+ set (GMOCK_MAIN_LIBRARY "gmock_main" CACHE STIRNG "Name of the Google Mock main () library")
55+ set (GTEST_BOTH_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} gtest gtest_main)
56+
57+endif (GMOCK_INCLUDE_DIR)
58
59 if (NOT GTEST_BOTH_LIBRARIES)
60
61- message ("Google Test not found - cannot build tests!")
62 set (GTEST_FOUND FALSE)
63
64 else (NOT GTEST_BOTH_LIBRARIES)
65@@ -21,10 +40,6 @@
66
67 endif (NOT GTEST_BOTH_LIBRARIES)
68
69-set (GMOCK_LIBRARY gmock)
70-set (GMOCK_MAIN_LIBRARY gmock_main)
71-add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=0)
72-
73 if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
74
75 message ("Google Mock and Google Test not found - cannot build tests!")
76@@ -34,4 +49,10 @@
77
78 set (GOOGLE_TEST_AND_MOCK_FOUND TRUE)
79
80-endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
81\ No newline at end of file
82+ add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=0)
83+ add_subdirectory (${GMOCK_SRC_DIR} ${CMAKE_BINARY_DIR}/__gmock)
84+ include_directories (${GMOCK_INCLUDE_DIR}
85+ ${GTEST_INCLUDE_DIR})
86+
87+
88+endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
89
90=== modified file 'cmake/src/compiz/compiz_discover_gtest_tests.cpp'
91--- cmake/src/compiz/compiz_discover_gtest_tests.cpp 2013-07-15 09:48:24 +0000
92+++ cmake/src/compiz/compiz_discover_gtest_tests.cpp 2013-07-17 07:55:39 +0000
93@@ -75,7 +75,7 @@
94 gTestFilter << " \"--gtest_filter=";
95 endParen << "\")";
96
97- std::string testName = jt->substr(0, jt->find("#"));
98+ std::string testName = jt->substr(0, jt->find("#"));
99
100 testfilecmake <<
101 addTest.str () <<
102
103=== modified file 'compizconfig/gsettings/tests/CMakeLists.txt'
104--- compizconfig/gsettings/tests/CMakeLists.txt 2013-07-16 19:59:06 +0000
105+++ compizconfig/gsettings/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
106@@ -84,6 +84,6 @@
107 ${GMOCK_MAIN_LIBRARY})
108
109 compiz_discover_tests (compizconfig_test_gsettings COVERAGE compizconfig_gsettings_backend)
110- #compiz_discover_tests (compizconfig_test_gsettings_conformance COVERAGE compizconfig_gsettings_backend gsettings)
111+ compiz_discover_tests (compizconfig_test_gsettings_conformance COVERAGE compizconfig_gsettings_backend gsettings)
112
113 endif (COMPIZCONFIG_TEST_GSETTINGS_FOUND)
114
115=== modified file 'compizconfig/libcompizconfig/tests/CMakeLists.txt'
116--- compizconfig/libcompizconfig/tests/CMakeLists.txt 2013-07-16 19:59:06 +0000
117+++ compizconfig/libcompizconfig/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
118@@ -144,11 +144,11 @@
119 compizconfig
120 )
121
122-#compiz_discover_tests (compizconfig_test_ccs_object COVERAGE compizconfig)
123+compiz_discover_tests (compizconfig_test_ccs_object COVERAGE compizconfig)
124 compiz_discover_tests (compizconfig_test_ccs_context COVERAGE compizconfig_ccs_context_mock)
125 compiz_discover_tests (compizconfig_test_ccs_plugin COVERAGE compizconfig_ccs_plugin_mock)
126 compiz_discover_tests (compizconfig_test_ccs_setting COVERAGE compizconfig_ccs_setting_mock)
127-#compiz_discover_tests (compizconfig_test_ccs_mock_backend_conformance COVERAGE compizconfig_ccs_backend_mock)
128+compiz_discover_tests (compizconfig_test_ccs_mock_backend_conformance COVERAGE compizconfig_ccs_backend_mock)
129 compiz_discover_tests (compizconfig_test_ccs_text_file COVERAGE ccs_text_file_interface compizconfig_ccs_text_file_mock)
130 compiz_discover_tests (compizconfig_test_ccs_upgrade_internal COVERAGE ccs_settings_upgrade_internal)
131 compiz_discover_tests (compizconfig_test_ccs_util COVERAGE compizconfig)
132
133=== modified file 'compizconfig/libcompizconfig/tests/compizconfig_test_ccs_mock_backend_conformance.cpp'
134--- compizconfig/libcompizconfig/tests/compizconfig_test_ccs_mock_backend_conformance.cpp 2012-11-24 10:01:33 +0000
135+++ compizconfig/libcompizconfig/tests/compizconfig_test_ccs_mock_backend_conformance.cpp 2013-07-17 07:55:39 +0000
136@@ -701,11 +701,10 @@
137 case TypeList:
138 ccsSetList (setting,
139 cci::SettingValueListWrapper (ReadListAtKey (plugin, key, setting),
140- cci::Deep,
141- ccsSettingGetInfo (setting)->forList.listType,
142- boost::shared_ptr <CCSSettingInfo> (),
143- boost::shared_ptr <CCSSetting> (setting,
144- boost::bind (doNothingWithCCSSetting, _1))),
145+ cci::Deep,
146+ ccsSettingGetInfo (setting)->forList.listType,
147+ boost::shared_ptr <CCSSetting> (setting,
148+ boost::bind (doNothingWithCCSSetting, _1))),
149 FALSE);
150 break;
151
152@@ -799,11 +798,13 @@
153 ccsGetList (setting, &vList);
154 listCopy = ccsCopyList (vList, setting);
155
156- WriteListAtKey (plugin, key, VariantTypes (boost::make_shared <cci::SettingValueListWrapper> (listCopy,
157- cci::Deep,
158- ccsSettingGetInfo (setting)->forList.listType,
159- boost::shared_ptr <CCSSettingInfo> (),
160- boost::shared_ptr <CCSSetting> (setting, boost::bind (doNothingWithCCSSetting, _1)))));
161+ WriteListAtKey (plugin,
162+ key,
163+ VariantTypes (boost::make_shared <cci::SettingValueListWrapper> (listCopy,
164+ cci::Deep,
165+ ccsSettingGetInfo (setting)->forList.listType,
166+ boost::shared_ptr <CCSSetting> (setting,
167+ boost::bind (doNothingWithCCSSetting, _1)))));
168 break;
169 }
170 default:
171
172=== modified file 'compizconfig/libcompizconfig/tests/compizconfig_test_ccs_object.cpp'
173--- compizconfig/libcompizconfig/tests/compizconfig_test_ccs_object.cpp 2012-11-05 06:57:05 +0000
174+++ compizconfig/libcompizconfig/tests/compizconfig_test_ccs_object.cpp 2013-07-17 07:55:39 +0000
175@@ -13,6 +13,8 @@
176 using ::testing::StrictMock;
177 using ::testing::Invoke;
178
179+class GoogleMockDummy;
180+
181 class CCSObjectTest :
182 public ::testing::Test
183 {
184@@ -23,7 +25,7 @@
185 CCSObject object;
186 };
187
188-typedef void (*dummyFunc) (void);
189+typedef void (*dummyFunc) (GoogleMockDummy *);
190
191 struct DummyInterface
192 {
193@@ -54,11 +56,14 @@
194 MOCK_METHOD1 (freeTestingObjectWrapper, void (TestingObjectWrapper *));
195 public:
196
197- static void thunkDummyFunc () { return _mockDummy.dummyFunc (); }
198- static GoogleMockDummy _mockDummy;
199+ static void thunkDummyFunc (GoogleMockDummy *mock);
200 };
201
202-GoogleMockDummy GoogleMockDummy::_mockDummy;
203+void
204+GoogleMockDummy::thunkDummyFunc (GoogleMockDummy *mock)
205+{
206+ mock->dummyFunc ();
207+}
208
209 const struct DummyInterface SomeDummyInterface =
210 {
211@@ -163,10 +168,11 @@
212 EXPECT_EQ (*((CCSObject *) to)->interface_types, 1);
213
214 const DummyInterface *myDummyInterface = (const DummyInterface *) ccsObjectGetInterface (to, 1);
215-
216- EXPECT_CALL (GoogleMockDummy::_mockDummy, dummyFunc ());
217-
218- (*myDummyInterface->dummy) ();
219+ GoogleMockDummy mockDummy;
220+
221+ EXPECT_CALL (mockDummy, dummyFunc ());
222+
223+ (*myDummyInterface->dummy) (&mockDummy);
224
225 ccsObjectRemoveInterface (to, 1);
226
227@@ -196,7 +202,9 @@
228
229 void ccsFreeTestingObjectWrapper (TestingObjectWrapper *wrapper)
230 {
231- GoogleMockDummy::_mockDummy.freeTestingObjectWrapper (wrapper);
232+ GoogleMockDummy *dummy =
233+ reinterpret_cast <GoogleMockDummy *> (reinterpret_cast <CCSObject *> (ccsObjectGetPrivate (wrapper)));
234+ dummy->freeTestingObjectWrapper (wrapper);
235 }
236
237 #define CCSREF_OBJ(type,dtype) \
238@@ -217,10 +225,13 @@
239 {
240 TestingObjectWrapper *to = (TestingObjectWrapper *) calloc (1, sizeof (TestingObjectWrapper));
241
242+ GoogleMockDummy dummy;
243+
244 ccsObjectInit (to, &ccsDefaultObjectAllocator);
245+ ccsObjectSetPrivate (to, reinterpret_cast <CCSPrivate *> (&dummy));
246 ccsTestingObjectWrapperRef (to);
247
248- EXPECT_CALL (GoogleMockDummy::_mockDummy, freeTestingObjectWrapper (to));
249+ EXPECT_CALL (dummy, freeTestingObjectWrapper (to));
250
251 ccsTestingObjectWrapperUnref (to);
252
253
254=== modified file 'compizconfig/libcompizconfig/tests/compizconfig_test_ccs_setting.cpp'
255--- compizconfig/libcompizconfig/tests/compizconfig_test_ccs_setting.cpp 2013-02-13 01:40:35 +0000
256+++ compizconfig/libcompizconfig/tests/compizconfig_test_ccs_setting.cpp 2013-07-17 07:55:39 +0000
257@@ -766,7 +766,6 @@
258 mWrapper.reset (new cci::SettingValueListWrapper (NULL,
259 cci::Deep,
260 type,
261- info,
262 setting));
263 mWrapper->append (value);
264 }
265@@ -799,7 +798,6 @@
266 mWrapper.reset (new cci::SettingValueListWrapper (ccsCopyList (mRawValueList, setting.get ()),
267 cci::Deep,
268 type,
269- info,
270 setting));
271 }
272
273
274=== modified file 'compizconfig/mocks/libcompizconfig/CMakeLists.txt'
275--- compizconfig/mocks/libcompizconfig/CMakeLists.txt 2013-05-13 13:50:31 +0000
276+++ compizconfig/mocks/libcompizconfig/CMakeLists.txt 2013-07-17 07:55:39 +0000
277@@ -19,6 +19,9 @@
278 add_library (compizconfig_ccs_setting_mock
279 ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_ccs_setting_mock.cpp)
280
281+add_library (compizconfig_ccs_setting_stub
282+ ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_ccs_setting_stub.cpp)
283+
284 add_library (compizconfig_ccs_backend_mock
285 ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_ccs_backend_mock.cpp)
286
287@@ -64,6 +67,13 @@
288 ${LIBCOMPIZCONFIG_LIBRARIES}
289 compizconfig)
290
291+target_link_libraries (compizconfig_ccs_setting_stub
292+ ${GTEST_BOTH_LIBRARIES}
293+ ${GMOCK_LIBRARY}
294+ ${GMOCK_MAIN_LIBRARY}
295+ ${LIBCOMPIZCONFIG_LIBRARIES}
296+ compizconfig)
297+
298 target_link_libraries (compizconfig_ccs_backend_mock
299 ${GTEST_BOTH_LIBRARIES}
300 ${GMOCK_LIBRARY}
301
302=== added file 'compizconfig/mocks/libcompizconfig/compizconfig_ccs_setting_stub.cpp'
303--- compizconfig/mocks/libcompizconfig/compizconfig_ccs_setting_stub.cpp 1970-01-01 00:00:00 +0000
304+++ compizconfig/mocks/libcompizconfig/compizconfig_ccs_setting_stub.cpp 2013-07-17 07:55:39 +0000
305@@ -0,0 +1,425 @@
306+/*
307+ * Compiz configuration system library
308+ *
309+ * Copyright (C) 2013 Sam Spilsbury <smspillaz@gmail.com>.
310+ *
311+ * This library is free software; you can redistribute it and/or
312+ * modify it under the terms of the GNU Lesser General Public
313+ * License as published by the Free Software Foundation; either
314+ * version 2.1 of the License, or (at your option) any later version.
315+
316+ * This library is distributed in the hope that it will be useful,
317+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
318+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
319+ * Lesser General Public License for more details.
320+
321+ * You should have received a copy of the GNU Lesser General Public
322+ * License along with this library; if not, write to the Free Software
323+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
324+ *
325+ * Authored By:
326+ * Sam Spilsbury <smspillaz@gmail.com>
327+ */
328+
329+#include <gtest/gtest.h>
330+#include <gmock/gmock.h>
331+
332+#include <ccs.h>
333+
334+#include "compizconfig_ccs_setting_stub.h"
335+
336+typedef struct _Private
337+{
338+ Bool integrated;
339+ Bool readOnly;
340+ const char *name;
341+ const char *shortDesc;
342+ const char *longDesc;
343+ const char *hints;
344+ const char *group;
345+ const char *subGroup;
346+ CCSSettingType type;
347+ CCSPlugin *parent;
348+ CCSSettingValue *value;
349+ CCSSettingValue *defaultValue;
350+ CCSSettingInfo info;
351+} Private;
352+
353+static Bool ccsStubSettingGetInt (CCSSetting *setting,
354+ int *data)
355+{
356+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asInt;
357+ return TRUE;
358+}
359+
360+static Bool ccsStubSettingGetFloat (CCSSetting *setting,
361+ float *data)
362+{
363+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asFloat;
364+ return TRUE;
365+}
366+
367+static Bool ccsStubSettingGetBool (CCSSetting *setting,
368+ Bool *data)
369+{
370+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asBool;
371+ return TRUE;
372+}
373+
374+static Bool ccsStubSettingGetString (CCSSetting *setting,
375+ const char **data)
376+{
377+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asString;
378+ return TRUE;
379+}
380+
381+static Bool ccsStubSettingGetColor (CCSSetting *setting,
382+ CCSSettingColorValue *data)
383+{
384+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asColor;
385+ return TRUE;
386+}
387+
388+static Bool ccsStubSettingGetMatch (CCSSetting *setting,
389+ const char **data)
390+{
391+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asMatch;
392+ return TRUE;
393+}
394+
395+static Bool ccsStubSettingGetKey (CCSSetting *setting,
396+ CCSSettingKeyValue *data)
397+{
398+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asKey;
399+ return TRUE;
400+}
401+
402+static Bool ccsStubSettingGetButton (CCSSetting *setting,
403+ CCSSettingButtonValue *data)
404+{
405+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asButton;
406+ return TRUE;
407+}
408+
409+static Bool ccsStubSettingGetEdge (CCSSetting *setting,
410+ unsigned int *data)
411+{
412+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asEdge;
413+ return TRUE;
414+}
415+
416+static Bool ccsStubSettingGetBell (CCSSetting *setting,
417+ Bool *data)
418+{
419+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asBell;
420+ return TRUE;
421+}
422+
423+static Bool ccsStubSettingGetList (CCSSetting *setting,
424+ CCSSettingValueList *data)
425+{
426+ *data = ((Private *) ccsObjectGetPrivate (setting))->value->value.asList;
427+ return TRUE;
428+}
429+
430+static CCSSetStatus ccsStubSettingSetInt (CCSSetting *setting,
431+ int data,
432+ Bool processChanged)
433+{
434+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asInt = data;
435+ return SetToNewValue;
436+}
437+
438+static CCSSetStatus ccsStubSettingSetFloat (CCSSetting *setting,
439+ float data,
440+ Bool processChanged)
441+{
442+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asFloat = data;
443+ return SetToNewValue;
444+}
445+
446+static CCSSetStatus ccsStubSettingSetBool (CCSSetting *setting,
447+ Bool data,
448+ Bool processChanged)
449+{
450+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asBool = data;
451+ return SetToNewValue;
452+}
453+
454+static CCSSetStatus ccsStubSettingSetString (CCSSetting *setting,
455+ const char *data,
456+ Bool processChanged)
457+{
458+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asString = (char *) data;
459+ return SetToNewValue;
460+}
461+
462+static CCSSetStatus ccsStubSettingSetColor (CCSSetting *setting,
463+ CCSSettingColorValue data,
464+ Bool processChanged)
465+{
466+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asColor = data;
467+ return SetToNewValue;
468+}
469+
470+static CCSSetStatus ccsStubSettingSetMatch (CCSSetting *setting,
471+ const char *data,
472+ Bool processChanged)
473+{
474+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asMatch = (char *) data;
475+ return SetToNewValue;
476+}
477+
478+static CCSSetStatus ccsStubSettingSetKey (CCSSetting *setting,
479+ CCSSettingKeyValue data,
480+ Bool processChanged)
481+{
482+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asKey = data;
483+ return SetToNewValue;
484+}
485+
486+static CCSSetStatus ccsStubSettingSetButton (CCSSetting *setting,
487+ CCSSettingButtonValue data,
488+ Bool processChanged)
489+{
490+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asButton = data;
491+ return SetToNewValue;
492+}
493+
494+static CCSSetStatus ccsStubSettingSetEdge (CCSSetting *setting,
495+ unsigned int data,
496+ Bool processChanged)
497+{
498+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asEdge = data;
499+ return SetToNewValue;
500+}
501+
502+static CCSSetStatus ccsStubSettingSetBell (CCSSetting *setting,
503+ Bool data,
504+ Bool processChanged)
505+{
506+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asBell = data;
507+ return SetToNewValue;
508+}
509+
510+static CCSSetStatus ccsStubSettingSetList (CCSSetting *setting,
511+ CCSSettingValueList data,
512+ Bool processChanged)
513+{
514+ ((Private *) ccsObjectGetPrivate (setting))->value->value.asList = data;
515+ return SetToNewValue;
516+}
517+
518+static CCSSetStatus ccsStubSettingSetValue (CCSSetting *setting,
519+ CCSSettingValue *data,
520+ Bool processChanged)
521+{
522+ Private *priv = (Private *) ccsObjectGetPrivate (setting);
523+
524+ ccsCopyValueInto (data,
525+ priv->value,
526+ priv->type,
527+ &priv->info);
528+ return SetToNewValue;
529+}
530+
531+static void ccsStubSettingResetToDefault (CCSSetting * setting, Bool processChanged)
532+{
533+}
534+
535+static Bool ccsStubSettingIsIntegrated (CCSSetting *setting)
536+{
537+ return ((Private *) ccsObjectGetPrivate (setting))->integrated;
538+}
539+
540+static Bool ccsStubSettingReadOnly (CCSSetting *setting)
541+{
542+ return ((Private *) ccsObjectGetPrivate (setting))->readOnly;
543+}
544+
545+static const char * ccsStubSettingGetName (CCSSetting *setting)
546+{
547+ return ((Private *) ccsObjectGetPrivate (setting))->name;
548+}
549+
550+static const char * ccsStubSettingGetShortDesc (CCSSetting *setting)
551+{
552+ return ((Private *) ccsObjectGetPrivate (setting))->shortDesc;
553+}
554+
555+static const char * ccsStubSettingGetLongDesc (CCSSetting *setting)
556+{
557+ return ((Private *) ccsObjectGetPrivate (setting))->longDesc;
558+}
559+
560+static CCSSettingType ccsStubSettingGetType (CCSSetting *setting)
561+{
562+ return ((Private *) ccsObjectGetPrivate (setting))->type;
563+}
564+
565+static CCSSettingInfo * ccsStubSettingGetInfo (CCSSetting *setting)
566+{
567+ return &((Private *) ccsObjectGetPrivate (setting))->info;
568+}
569+
570+static const char * ccsStubSettingGetGroup (CCSSetting *setting)
571+{
572+ return ((Private *) ccsObjectGetPrivate (setting))->group;
573+}
574+
575+static const char * ccsStubSettingGetSubGroup (CCSSetting *setting)
576+{
577+ return ((Private *) ccsObjectGetPrivate (setting))->subGroup;
578+}
579+
580+static const char * ccsStubSettingGetHints (CCSSetting *setting)
581+{
582+ return ((Private *) ccsObjectGetPrivate (setting))->hints;
583+}
584+
585+static CCSSettingValue * ccsStubSettingGetDefaultValue (CCSSetting *setting)
586+{
587+ return ((Private *) ccsObjectGetPrivate (setting))->defaultValue;
588+}
589+
590+static CCSSettingValue * ccsStubSettingGetValue (CCSSetting *setting)
591+{
592+ return ((Private *) ccsObjectGetPrivate (setting))->value;
593+}
594+
595+static Bool ccsStubSettingIsDefault (CCSSetting *setting)
596+{
597+ Private *priv = (Private *) ccsObjectGetPrivate (setting);
598+
599+ return ccsCheckValueEq (priv->value,
600+ priv->type,
601+ &priv->info,
602+ priv->defaultValue,
603+ priv->type,
604+ &priv->info);
605+}
606+
607+static CCSPlugin * ccsStubSettingGetParent (CCSSetting *setting)
608+{
609+ return ((Private *) ccsObjectGetPrivate (setting))->parent;
610+}
611+
612+static void * ccsStubSettingGetPrivatePtr (CCSSetting *setting)
613+{
614+ return NULL;
615+}
616+
617+static void ccsStubSettingSetPrivatePtr (CCSSetting *setting, void *ptr)
618+{
619+}
620+
621+static Bool ccsStubSettingIsReadableByBackend (CCSSetting *setting)
622+{
623+ return TRUE;
624+}
625+
626+static void ccsFreeSettingTypeStub (CCSSetting *setting)
627+{
628+ Private *priv = (Private *) ccsObjectGetPrivate (setting);
629+
630+ ccsFreeSettingValueWithType (priv->value, priv->type);
631+ ccsFreeSettingValueWithType (priv->defaultValue, priv->type);
632+ ccsCleanupSettingInfo (&priv->info, priv->type);
633+
634+ ccsObjectFinalize (setting);
635+
636+ free (setting);
637+}
638+
639+static const CCSSettingInterface ccsStubSettingInterface =
640+{
641+ ccsStubSettingGetName,
642+ ccsStubSettingGetShortDesc,
643+ ccsStubSettingGetLongDesc,
644+ ccsStubSettingGetType,
645+ ccsStubSettingGetInfo,
646+ ccsStubSettingGetGroup,
647+ ccsStubSettingGetSubGroup,
648+ ccsStubSettingGetHints,
649+ ccsStubSettingGetDefaultValue,
650+ ccsStubSettingGetValue,
651+ ccsStubSettingIsDefault,
652+ ccsStubSettingGetParent,
653+ ccsStubSettingGetPrivatePtr,
654+ ccsStubSettingSetPrivatePtr,
655+ ccsStubSettingSetInt,
656+ ccsStubSettingSetFloat,
657+ ccsStubSettingSetBool,
658+ ccsStubSettingSetString,
659+ ccsStubSettingSetColor,
660+ ccsStubSettingSetMatch,
661+ ccsStubSettingSetKey,
662+ ccsStubSettingSetButton,
663+ ccsStubSettingSetEdge,
664+ ccsStubSettingSetBell,
665+ ccsStubSettingSetList,
666+ ccsStubSettingSetValue,
667+ ccsStubSettingGetInt,
668+ ccsStubSettingGetFloat,
669+ ccsStubSettingGetBool,
670+ ccsStubSettingGetString,
671+ ccsStubSettingGetColor,
672+ ccsStubSettingGetMatch,
673+ ccsStubSettingGetKey,
674+ ccsStubSettingGetButton,
675+ ccsStubSettingGetEdge,
676+ ccsStubSettingGetBell,
677+ ccsStubSettingGetList,
678+ ccsStubSettingResetToDefault,
679+ ccsStubSettingIsIntegrated,
680+ ccsStubSettingReadOnly,
681+ ccsStubSettingIsReadableByBackend,
682+ ccsFreeSettingTypeStub
683+};
684+
685+CCSSetting *
686+ccsSettingTypeStubNew (CCSSettingType type,
687+ Bool integrated,
688+ Bool readOnly,
689+ const char *name,
690+ const char *shortDesc,
691+ const char *longDesc,
692+ const char *hints,
693+ const char *group,
694+ const char *subGroup,
695+ CCSSettingValue *value,
696+ CCSSettingValue *defaultValue,
697+ CCSSettingInfo *info,
698+ CCSObjectAllocationInterface *ai)
699+{
700+ Private *priv = (Private *) calloc (1, sizeof (Private));
701+ priv->integrated = integrated;
702+ priv->readOnly = readOnly;
703+ priv->name = name;
704+ priv->shortDesc = shortDesc;
705+ priv->longDesc = longDesc;
706+ priv->hints = hints;
707+ priv->group = group;
708+ priv->subGroup = subGroup;
709+ priv->type = type;
710+
711+ priv->value = (CCSSettingValue *) calloc (1, sizeof (CCSSettingValue));
712+ priv->defaultValue = (CCSSettingValue *) calloc (1, sizeof (CCSSettingValue));
713+
714+ if (value)
715+ ccsCopyValueInto (value, priv->value, priv->type, info);
716+ if (defaultValue)
717+ ccsCopyValueInto (defaultValue, priv->defaultValue, priv->type, info);
718+ if (info)
719+ ccsCopyInfo (info, &priv->info, priv->type);
720+
721+ CCSSetting *setting = (CCSSetting *) calloc (1, sizeof (CCSSetting));
722+ ccsObjectInit (setting, ai);
723+ ccsObjectSetPrivate (setting, (CCSPrivate *) priv);
724+ ccsObjectAddInterface (setting,
725+ (CCSInterface *) &ccsStubSettingInterface,
726+ GET_INTERFACE_TYPE (CCSSettingInterface));
727+ ccsSettingRef (setting);
728+
729+ return setting;
730+}
731
732=== added file 'compizconfig/mocks/libcompizconfig/compizconfig_ccs_setting_stub.h'
733--- compizconfig/mocks/libcompizconfig/compizconfig_ccs_setting_stub.h 1970-01-01 00:00:00 +0000
734+++ compizconfig/mocks/libcompizconfig/compizconfig_ccs_setting_stub.h 2013-07-17 07:55:39 +0000
735@@ -0,0 +1,44 @@
736+/*
737+ * Compiz configuration system library
738+ *
739+ * Copyright (C) 2013 Sam Spilsbury <smspillaz@gmail.com>.
740+ *
741+ * This library is free software; you can redistribute it and/or
742+ * modify it under the terms of the GNU Lesser General Public
743+ * License as published by the Free Software Foundation; either
744+ * version 2.1 of the License, or (at your option) any later version.
745+
746+ * This library is distributed in the hope that it will be useful,
747+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
748+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
749+ * Lesser General Public License for more details.
750+
751+ * You should have received a copy of the GNU Lesser General Public
752+ * License along with this library; if not, write to the Free Software
753+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
754+ *
755+ * Authored By:
756+ * Sam Spilsbury <smspillaz@gmail.com>
757+ */
758+
759+#ifndef _COMPIZCONFIG_CCS_SETTING_STUB
760+#define _COMPIZCONFIG_CCS_SETTING_STUB
761+
762+#include <ccs.h>
763+
764+CCSSetting *
765+ccsSettingTypeStubNew (CCSSettingType type,
766+ Bool integrated,
767+ Bool readOnly,
768+ const char *name,
769+ const char *shortDesc,
770+ const char *longDesc,
771+ const char *hints,
772+ const char *group,
773+ const char *subGroup,
774+ CCSSettingValue *value,
775+ CCSSettingValue *defaultValue,
776+ CCSSettingInfo *info,
777+ CCSObjectAllocationInterface *ai);
778+
779+#endif
780
781=== modified file 'compizconfig/tests/CMakeLists.txt'
782--- compizconfig/tests/CMakeLists.txt 2012-09-29 04:40:41 +0000
783+++ compizconfig/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
784@@ -69,4 +69,5 @@
785 compizconfig_ccs_test_value_combinations
786 compizconfig_ccs_setting_value_operators
787 compizconfig_ccs_list_equality
788- compizconfig_ccs_item_in_list_matcher)
789+ compizconfig_ccs_item_in_list_matcher
790+ compizconfig_ccs_setting_stub)
791
792=== modified file 'compizconfig/tests/compizconfig_backend_concept_test.cpp'
793--- compizconfig/tests/compizconfig_backend_concept_test.cpp 2012-09-17 15:39:11 +0000
794+++ compizconfig/tests/compizconfig_backend_concept_test.cpp 2013-07-17 07:55:39 +0000
795@@ -26,6 +26,7 @@
796 #include <gtest_unspecified_bool_type_matcher.h>
797
798 #include <compizconfig_ccs_setting_mock.h>
799+#include <compizconfig_ccs_setting_stub.h>
800
801 #include <boost/function.hpp>
802 #include <boost/bind.hpp>
803@@ -56,19 +57,34 @@
804 CCSSettingType type,
805 cci::ListStorageType storageType)
806 {
807+ CCSSettingInfo listInfo;
808+
809+ listInfo.forList.listType = type;
810+ listInfo.forList.listInfo =
811+ (CCSSettingInfo *) calloc (1, sizeof (CCSSettingInfo));
812+
813 boost::function <void (CCSSetting *)> f (boost::bind (ccsSettingUnref, _1));
814- boost::shared_ptr <CCSSetting> mockSetting (ccsNiceMockSettingNew (), f);
815- NiceMock <CCSSettingGMock> *gmockSetting = reinterpret_cast <NiceMock <CCSSettingGMock> *> (ccsObjectGetPrivate (mockSetting.get ()));
816-
817- ON_CALL (*gmockSetting, getType ()).WillByDefault (Return (TypeList));
818-
819- boost::shared_ptr <CCSSettingInfo> listInfo (new CCSSettingInfo);
820-
821- listInfo->forList.listType = type;
822-
823- ON_CALL (*gmockSetting, getInfo ()).WillByDefault (Return (listInfo.get ()));
824- ON_CALL (*gmockSetting, getDefaultValue ()).WillByDefault (ReturnNull ());
825- return boost::make_shared <cci::SettingValueListWrapper> (c (mockSetting.get ()), storageType, type, listInfo, mockSetting);
826+ boost::shared_ptr <CCSSetting> stubSetting (ccsSettingTypeStubNew (TypeList,
827+ TRUE,
828+ TRUE,
829+ NULL,
830+ NULL,
831+ NULL,
832+ NULL,
833+ NULL,
834+ NULL,
835+ NULL,
836+ NULL,
837+ &listInfo,
838+ &ccsDefaultObjectAllocator),
839+ f);
840+
841+ ccsCleanupSettingInfo (&listInfo, TypeList);
842+
843+ return boost::make_shared <cci::SettingValueListWrapper> (c (stubSetting.get ()),
844+ storageType,
845+ type,
846+ stubSetting);
847 }
848
849 CCSSettingGMock *
850@@ -287,10 +303,9 @@
851 write ();
852
853 EXPECT_THAT (cci::SettingValueListWrapper (env->ReadListAtKey (plugin, key, setting.get ()),
854- cci::Deep,
855- info->forList.listType,
856- boost::shared_ptr <CCSSettingInfo> (),
857- setting),
858+ cci::Deep,
859+ info->forList.listType,
860+ setting),
861 ListEqual (&info->forList, list));
862 }
863
864
865=== modified file 'compizconfig/tests/compizconfig_ccs_list_wrapper.cpp'
866--- compizconfig/tests/compizconfig_ccs_list_wrapper.cpp 2012-09-17 15:39:11 +0000
867+++ compizconfig/tests/compizconfig_ccs_list_wrapper.cpp 2013-07-17 07:55:39 +0000
868@@ -37,12 +37,10 @@
869 public:
870
871 PrivateSettingValueListWrapper (CCSSettingValueList list,
872- cci::ListStorageType storageType,
873- CCSSettingType type,
874- const boost::shared_ptr <CCSSettingInfo> &listInfo,
875- const boost::shared_ptr <CCSSetting> &settingReference) :
876+ cci::ListStorageType storageType,
877+ CCSSettingType type,
878+ const boost::shared_ptr <CCSSetting> &settingReference) :
879 mType (type),
880- mListInfo (listInfo),
881 mSettingReference (settingReference),
882 mListWrapper (list,
883 ccsSettingValueListFree,
884@@ -52,25 +50,22 @@
885 {
886 }
887
888- CCSSettingType mType;
889- boost::shared_ptr <CCSSettingInfo> mListInfo;
890- boost::shared_ptr <CCSSetting> mSettingReference;
891+ CCSSettingType mType;
892+ boost::shared_ptr <CCSSetting> mSettingReference;
893 SettingValueListWrapper::InternalWrapperImpl mListWrapper;
894 };
895 }
896 }
897 }
898
899-cci::SettingValueListWrapper::SettingValueListWrapper (CCSSettingValueList list,
900- cci::ListStorageType storageType,
901- CCSSettingType type,
902- const boost::shared_ptr <CCSSettingInfo> &listInfo,
903- const boost::shared_ptr <CCSSetting> &settingReference) :
904+cci::SettingValueListWrapper::SettingValueListWrapper (CCSSettingValueList list,
905+ cci::ListStorageType storageType,
906+ CCSSettingType type,
907+ const boost::shared_ptr <CCSSetting> &settingReference) :
908 priv (new cci::PrivateSettingValueListWrapper (list,
909- storageType,
910- type,
911- listInfo,
912- settingReference))
913+ storageType,
914+ type,
915+ settingReference))
916 {
917 }
918
919
920=== modified file 'compizconfig/tests/compizconfig_ccs_list_wrapper.h'
921--- compizconfig/tests/compizconfig_ccs_list_wrapper.h 2012-09-22 03:59:35 +0000
922+++ compizconfig/tests/compizconfig_ccs_list_wrapper.h 2013-07-17 07:55:39 +0000
923@@ -136,11 +136,10 @@
924 typedef compiz::config::ListWrapper <CCSSettingValueList, CCSSettingValue *> InternalWrapper;
925 typedef compiz::config::impl::ListWrapper <CCSSettingValueList, CCSSettingValue *> InternalWrapperImpl;
926
927- SettingValueListWrapper (CCSSettingValueList list,
928- ListStorageType storageType,
929- CCSSettingType type,
930- const boost::shared_ptr <CCSSettingInfo> &listInfo,
931- const boost::shared_ptr <CCSSetting> &settingReference);
932+ SettingValueListWrapper (CCSSettingValueList list,
933+ ListStorageType storageType,
934+ CCSSettingType type,
935+ const boost::shared_ptr <CCSSetting> &settingReference);
936
937 CCSSettingType type ();
938
939
940=== modified file 'plugins/composite/src/pixmapbinding/tests/CMakeLists.txt'
941--- plugins/composite/src/pixmapbinding/tests/CMakeLists.txt 2013-07-15 09:48:24 +0000
942+++ plugins/composite/src/pixmapbinding/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
943@@ -1,15 +1,3 @@
944-set (GMOCK_LIBRARY gmock)
945-set (GMOCK_MAIN_LIBRARY gmock_main)
946-
947-if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
948- message ("Google Mock and Google Test not found - cannot build tests!")
949- set (COMPIZ_BUILD_TESTING OFF)
950-endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
951-
952-include_directories (${GTEST_INCLUDE_DIRS})
953-
954-link_directories (${COMPIZ_LIBRARY_DIRS})
955-
956 add_executable (compiz_test_composite_pixmapbinding
957 ${CMAKE_CURRENT_SOURCE_DIR}/test-composite-pixmapbinding.cpp)
958
959
960=== modified file 'plugins/grid/src/grabhandler/tests/CMakeLists.txt'
961--- plugins/grid/src/grabhandler/tests/CMakeLists.txt 2013-07-15 09:48:24 +0000
962+++ plugins/grid/src/grabhandler/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
963@@ -1,15 +1,3 @@
964-set (GMOCK_LIBRARY gmock)
965-set (GMOCK_MAIN_LIBRARY gmock_main)
966-
967-if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
968- message ("Google Mock and Google Test not found - cannot build tests!")
969- set (COMPIZ_BUILD_TESTING OFF)
970-endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
971-
972-include_directories (${GTEST_INCLUDE_DIRS})
973-
974-link_directories (${COMPIZ_LIBRARY_DIRS})
975-
976 add_executable (compiz_test_grid_grabhandler
977 ${CMAKE_CURRENT_SOURCE_DIR}/test-grid-grab-handler.cpp)
978
979
980=== modified file 'plugins/opengl/src/doublebuffer/tests/CMakeLists.txt'
981--- plugins/opengl/src/doublebuffer/tests/CMakeLists.txt 2013-07-15 09:48:24 +0000
982+++ plugins/opengl/src/doublebuffer/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
983@@ -1,15 +1,3 @@
984-set (GMOCK_LIBRARY gmock)
985-set (GMOCK_MAIN_LIBRARY gmock_main)
986-
987-if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
988- message ("Google Mock and Google Test not found - cannot build tests!")
989- set (COMPIZ_BUILD_TESTING OFF)
990-endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
991-
992-include_directories (${GTEST_INCLUDE_DIRS})
993-
994-link_directories (${COMPIZ_LIBRARY_DIRS})
995-
996 add_executable (compiz_test_opengl_double_buffer
997 ${CMAKE_CURRENT_SOURCE_DIR}/test-opengl-double-buffer.cpp)
998
999
1000=== modified file 'plugins/opengl/src/glxtfpbind/tests/CMakeLists.txt'
1001--- plugins/opengl/src/glxtfpbind/tests/CMakeLists.txt 2013-07-15 09:48:24 +0000
1002+++ plugins/opengl/src/glxtfpbind/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
1003@@ -1,15 +1,3 @@
1004-set (GMOCK_LIBRARY gmock)
1005-set (GMOCK_MAIN_LIBRARY gmock_main)
1006-
1007-if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
1008- message ("Google Mock and Google Test not found - cannot build tests!")
1009- set (COMPIZ_BUILD_TESTING OFF)
1010-endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
1011-
1012-include_directories (${GTEST_INCLUDE_DIRS})
1013-
1014-link_directories (${COMPIZ_LIBRARY_DIRS})
1015-
1016 add_executable (compiz_test_opengl_glx_tfp_bind
1017 ${CMAKE_CURRENT_SOURCE_DIR}/test-opengl-glx-tfp-bind.cpp)
1018
1019
1020=== modified file 'plugins/resize/src/logic/tests/CMakeLists.txt'
1021--- plugins/resize/src/logic/tests/CMakeLists.txt 2013-07-15 09:48:24 +0000
1022+++ plugins/resize/src/logic/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
1023@@ -1,15 +1,3 @@
1024-set (GMOCK_LIBRARY gmock)
1025-set (GMOCK_MAIN_LIBRARY gmock_main)
1026-
1027-if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
1028- message ("Google Mock and Google Test not found - cannot build tests!")
1029- set (COMPIZ_BUILD_TESTING OFF)
1030-endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
1031-
1032-include_directories (${GTEST_INCLUDE_DIRS})
1033-
1034-link_directories (${COMPIZ_LIBRARY_DIRS})
1035-
1036 add_executable (compiz_test_resize_logic
1037 test-logic.cpp
1038 resize-options-mock.cpp
1039
1040=== modified file 'plugins/wall/src/offset_movement/tests/CMakeLists.txt'
1041--- plugins/wall/src/offset_movement/tests/CMakeLists.txt 2013-07-15 09:48:24 +0000
1042+++ plugins/wall/src/offset_movement/tests/CMakeLists.txt 2013-07-17 07:55:39 +0000
1043@@ -1,15 +1,3 @@
1044-set (GMOCK_LIBRARY gmock)
1045-set (GMOCK_MAIN_LIBRARY gmock_main)
1046-
1047-if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
1048- message ("Google Mock and Google Test not found - cannot build tests!")
1049- set (COMPIZ_BUILD_TESTING OFF)
1050-endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
1051-
1052-include_directories (${GTEST_INCLUDE_DIRS})
1053-
1054-link_directories (${COMPIZ_LIBRARY_DIRS})
1055-
1056 add_executable (compiz_test_wall_offset_movement
1057 ${CMAKE_CURRENT_SOURCE_DIR}/test-wall-offset-movement.cpp)
1058

Subscribers

People subscribed via source and target branches

to all changes: