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
1=== modified file 'compizconfig/gsettings/tests/test_gsettings_tests.cpp'
2--- compizconfig/gsettings/tests/test_gsettings_tests.cpp 2012-11-13 15:51:59 +0000
3+++ compizconfig/gsettings/tests/test_gsettings_tests.cpp 2013-04-25 08:13:42 +0000
4@@ -40,6 +40,7 @@
5 using ::testing::MatchResultListener;
6 using ::testing::AllOf;
7 using ::testing::Not;
8+using ::testing::NotNull;
9 using ::testing::Matcher;
10 using ::testing::Eq;
11 using ::testing::NiceMock;
12@@ -847,7 +848,7 @@
13 CCSSettingList filteredList = filterAllSettingsMatchingType (TypeInt, settingList);
14
15 /* Needs to be expressed in terms of a boolean expression */
16- ASSERT_TRUE (filteredList);
17+ ASSERT_THAT (filteredList, NotNull ());
18 EXPECT_EQ (ccsSettingListLength (filteredList), 1);
19 EXPECT_EQ (filteredList->data, s1);
20 EXPECT_NE (filteredList->data, s2);
21@@ -876,11 +877,11 @@
22 CCSSettingList filteredList = filterAllSettingsMatchingPartOfStringIgnoringDashesUnderscoresAndCase ("foo-bar-baz",
23 settingList);
24
25- ASSERT_TRUE (filteredList);
26+ ASSERT_THAT (filteredList, NotNull ());
27 ASSERT_EQ (ccsSettingListLength (filteredList), 2);
28 EXPECT_EQ (filteredList->data, s1);
29 EXPECT_NE (filteredList->data, s3);
30- ASSERT_TRUE (filteredList->next);
31+ ASSERT_THAT (filteredList->next, NotNull ());
32 EXPECT_EQ (filteredList->next->data, s2);
33 EXPECT_NE (filteredList->data, s3);
34 EXPECT_EQ (NULL, filteredList->next->next);
35
36=== modified file 'compizconfig/tests/compizconfig_backend_concept_test.h'
37--- compizconfig/tests/compizconfig_backend_concept_test.h 2013-03-06 13:44:06 +0000
38+++ compizconfig/tests/compizconfig_backend_concept_test.h 2013-04-25 08:13:42 +0000
39@@ -187,18 +187,19 @@
40 }
41 }
42
43+using ::testing::AtLeast;
44+using ::testing::DoAll;
45 using ::testing::Eq;
46 using ::testing::IsNull;
47-using ::testing::SetArgPointee;
48-using ::testing::DoAll;
49-using ::testing::Return;
50-using ::testing::ReturnNull;
51 using ::testing::MakeMatcher;
52 using ::testing::Matcher;
53 using ::testing::MatcherInterface;
54 using ::testing::MatchResultListener;
55-using ::testing::AtLeast;
56 using ::testing::NiceMock;
57+using ::testing::NotNull;
58+using ::testing::Return;
59+using ::testing::ReturnNull;
60+using ::testing::SetArgPointee;
61
62 namespace cci = compiz::config::impl;
63 namespace cc = compiz::config;
64@@ -350,7 +351,7 @@
65 CCSPluginGMock *gmockPlugin = (CCSPluginGMock *) ccsObjectGetPrivate (plugin.get ());
66
67 ASSERT_FALSE (name.empty ());
68- ASSERT_TRUE (context.get ());
69+ ASSERT_THAT (context.get (), NotNull ());
70
71 ON_CALL (*gmockPlugin, getName ()).WillByDefault (Return ((char *) name.c_str ()));
72 ON_CALL (*gmockPlugin, getContext ()).WillByDefault (Return (context.get ()));
73@@ -369,7 +370,7 @@
74
75 ASSERT_FALSE (name.empty ());
76 ASSERT_NE (type, TypeNum);
77- ASSERT_TRUE (plugin);
78+ ASSERT_THAT (plugin.get (), NotNull ());
79
80 ON_CALL (*gmockSetting, getName ()).WillByDefault (Return ((char *) name.c_str ()));
81 ON_CALL (*gmockSetting, getType ()).WillByDefault (Return (type));

Subscribers

People subscribed via source and target branches

to all changes: