Merge lp:~compiz-team/compiz/compiz.fix_1172601 into lp:compiz/0.9.10

Proposed by Sam Spilsbury
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3669
Merged at revision: 3671
Proposed branch: lp:~compiz-team/compiz/compiz.fix_1172601
Merge into: lp:compiz/0.9.10
Diff against target: 81 lines (+12/-10)
2 files modified
compizconfig/gsettings/tests/test_gsettings_tests.cpp (+4/-3)
compizconfig/tests/compizconfig_backend_concept_test.h (+8/-7)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.fix_1172601
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
MC Return Approve
Compiz Maintainers Pending
Review via email: mp+160811@code.launchpad.net

Commit message

Explicitly check if the smart pointers are null rather than converting
implicitly to bool as boost 1.53 now marks the bool operator as explicit

(LP: #1172601)

Description of the change

Explicitly check if the smart pointers are null rather than converting
implicitly to bool as boost 1.53 now marks the bool operator as explicit

(LP: #1172601)

To post a comment you must log in.
Revision history for this message
MC Return (mc-return) wrote :

I am not sure if I can test this until this has landed:
https://code.launchpad.net/~compiz-team/compiz/compiz.fix_1171364/+merge/160792

Revision history for this message
MC Return (mc-return) wrote :

...and this MP here is rebased on lp:compiz.

Revision history for this message
MC Return (mc-return) wrote :

...but from looking at the diff this LGTM.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'compizconfig/gsettings/tests/test_gsettings_tests.cpp'
--- compizconfig/gsettings/tests/test_gsettings_tests.cpp 2012-11-13 15:51:59 +0000
+++ compizconfig/gsettings/tests/test_gsettings_tests.cpp 2013-04-25 08:13:42 +0000
@@ -40,6 +40,7 @@
40using ::testing::MatchResultListener;40using ::testing::MatchResultListener;
41using ::testing::AllOf;41using ::testing::AllOf;
42using ::testing::Not;42using ::testing::Not;
43using ::testing::NotNull;
43using ::testing::Matcher;44using ::testing::Matcher;
44using ::testing::Eq;45using ::testing::Eq;
45using ::testing::NiceMock;46using ::testing::NiceMock;
@@ -847,7 +848,7 @@
847 CCSSettingList filteredList = filterAllSettingsMatchingType (TypeInt, settingList);848 CCSSettingList filteredList = filterAllSettingsMatchingType (TypeInt, settingList);
848849
849 /* Needs to be expressed in terms of a boolean expression */850 /* Needs to be expressed in terms of a boolean expression */
850 ASSERT_TRUE (filteredList);851 ASSERT_THAT (filteredList, NotNull ());
851 EXPECT_EQ (ccsSettingListLength (filteredList), 1);852 EXPECT_EQ (ccsSettingListLength (filteredList), 1);
852 EXPECT_EQ (filteredList->data, s1);853 EXPECT_EQ (filteredList->data, s1);
853 EXPECT_NE (filteredList->data, s2);854 EXPECT_NE (filteredList->data, s2);
@@ -876,11 +877,11 @@
876 CCSSettingList filteredList = filterAllSettingsMatchingPartOfStringIgnoringDashesUnderscoresAndCase ("foo-bar-baz",877 CCSSettingList filteredList = filterAllSettingsMatchingPartOfStringIgnoringDashesUnderscoresAndCase ("foo-bar-baz",
877 settingList);878 settingList);
878879
879 ASSERT_TRUE (filteredList);880 ASSERT_THAT (filteredList, NotNull ());
880 ASSERT_EQ (ccsSettingListLength (filteredList), 2);881 ASSERT_EQ (ccsSettingListLength (filteredList), 2);
881 EXPECT_EQ (filteredList->data, s1);882 EXPECT_EQ (filteredList->data, s1);
882 EXPECT_NE (filteredList->data, s3);883 EXPECT_NE (filteredList->data, s3);
883 ASSERT_TRUE (filteredList->next);884 ASSERT_THAT (filteredList->next, NotNull ());
884 EXPECT_EQ (filteredList->next->data, s2);885 EXPECT_EQ (filteredList->next->data, s2);
885 EXPECT_NE (filteredList->data, s3);886 EXPECT_NE (filteredList->data, s3);
886 EXPECT_EQ (NULL, filteredList->next->next);887 EXPECT_EQ (NULL, filteredList->next->next);
887888
=== modified file 'compizconfig/tests/compizconfig_backend_concept_test.h'
--- compizconfig/tests/compizconfig_backend_concept_test.h 2013-03-06 13:44:06 +0000
+++ compizconfig/tests/compizconfig_backend_concept_test.h 2013-04-25 08:13:42 +0000
@@ -187,18 +187,19 @@
187 }187 }
188}188}
189189
190using ::testing::AtLeast;
191using ::testing::DoAll;
190using ::testing::Eq;192using ::testing::Eq;
191using ::testing::IsNull;193using ::testing::IsNull;
192using ::testing::SetArgPointee;
193using ::testing::DoAll;
194using ::testing::Return;
195using ::testing::ReturnNull;
196using ::testing::MakeMatcher;194using ::testing::MakeMatcher;
197using ::testing::Matcher;195using ::testing::Matcher;
198using ::testing::MatcherInterface;196using ::testing::MatcherInterface;
199using ::testing::MatchResultListener;197using ::testing::MatchResultListener;
200using ::testing::AtLeast;
201using ::testing::NiceMock;198using ::testing::NiceMock;
199using ::testing::NotNull;
200using ::testing::Return;
201using ::testing::ReturnNull;
202using ::testing::SetArgPointee;
202203
203namespace cci = compiz::config::impl;204namespace cci = compiz::config::impl;
204namespace cc = compiz::config;205namespace cc = compiz::config;
@@ -350,7 +351,7 @@
350 CCSPluginGMock *gmockPlugin = (CCSPluginGMock *) ccsObjectGetPrivate (plugin.get ());351 CCSPluginGMock *gmockPlugin = (CCSPluginGMock *) ccsObjectGetPrivate (plugin.get ());
351352
352 ASSERT_FALSE (name.empty ());353 ASSERT_FALSE (name.empty ());
353 ASSERT_TRUE (context.get ());354 ASSERT_THAT (context.get (), NotNull ());
354355
355 ON_CALL (*gmockPlugin, getName ()).WillByDefault (Return ((char *) name.c_str ()));356 ON_CALL (*gmockPlugin, getName ()).WillByDefault (Return ((char *) name.c_str ()));
356 ON_CALL (*gmockPlugin, getContext ()).WillByDefault (Return (context.get ()));357 ON_CALL (*gmockPlugin, getContext ()).WillByDefault (Return (context.get ()));
@@ -369,7 +370,7 @@
369370
370 ASSERT_FALSE (name.empty ());371 ASSERT_FALSE (name.empty ());
371 ASSERT_NE (type, TypeNum);372 ASSERT_NE (type, TypeNum);
372 ASSERT_TRUE (plugin);373 ASSERT_THAT (plugin.get (), NotNull ());
373374
374 ON_CALL (*gmockSetting, getName ()).WillByDefault (Return ((char *) name.c_str ()));375 ON_CALL (*gmockSetting, getName ()).WillByDefault (Return ((char *) name.c_str ()));
375 ON_CALL (*gmockSetting, getType ()).WillByDefault (Return (type));376 ON_CALL (*gmockSetting, getType ()).WillByDefault (Return (type));

Subscribers

People subscribed via source and target branches

to all changes: