~ubuntu-branches/ubuntu/trusty/compiz/trusty

« back to all changes in this revision

Viewing changes to compizconfig/gsettings/tests/test_gsettings_tests.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2013-08-22 06:58:07 UTC
  • mto: This revision was merged to the branch mainline in revision 3352.
  • Revision ID: package-import@ubuntu.com-20130822065807-17nlzez0d30y09so
Tags: upstream-0.9.10+13.10.20130822
ImportĀ upstreamĀ versionĀ 0.9.10+13.10.20130822

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
using ::testing::MatchResultListener;
41
41
using ::testing::AllOf;
42
42
using ::testing::Not;
 
43
using ::testing::NotNull;
43
44
using ::testing::Matcher;
44
45
using ::testing::Eq;
45
46
using ::testing::NiceMock;
272
273
 
273
274
    std::string keyname;
274
275
 
275
 
    for (unsigned int i = 0; i <= OVER_KEY_SIZE - 1; i++)
 
276
    for (unsigned int i = 0; i <= OVER_KEY_SIZE - 1; ++i)
276
277
        keyname.push_back ('a');
277
278
 
278
279
    ASSERT_EQ (keyname.size (), OVER_KEY_SIZE);
290
291
 
291
292
    std::string keyname;
292
293
 
293
 
    for (unsigned int i = 0; i <= UNDER_KEY_SIZE - 1; i++)
 
294
    for (unsigned int i = 0; i <= UNDER_KEY_SIZE - 1; ++i)
294
295
        keyname.push_back ('a');
295
296
 
296
297
    ASSERT_EQ (keyname.size (), UNDER_KEY_SIZE);
338
339
    const unsigned int OVER_KEY_SIZE = MAX_GSETTINGS_KEY_SIZE + 1;
339
340
    std::string keyname;
340
341
 
341
 
    for (unsigned int i = 0; i <= OVER_KEY_SIZE - 1; i++)
 
342
    for (unsigned int i = 0; i <= OVER_KEY_SIZE - 1; ++i)
342
343
        keyname.push_back ('a');
343
344
 
344
345
    ASSERT_EQ (keyname.size (), OVER_KEY_SIZE);
847
848
    CCSSettingList filteredList = filterAllSettingsMatchingType (TypeInt, settingList);
848
849
 
849
850
    /* Needs to be expressed in terms of a boolean expression */
850
 
    ASSERT_TRUE (filteredList);
 
851
    ASSERT_THAT (filteredList, NotNull ());
851
852
    EXPECT_EQ (ccsSettingListLength (filteredList), 1);
852
853
    EXPECT_EQ (filteredList->data, s1);
853
854
    EXPECT_NE (filteredList->data, s2);
876
877
    CCSSettingList filteredList = filterAllSettingsMatchingPartOfStringIgnoringDashesUnderscoresAndCase ("foo-bar-baz",
877
878
                                                                                                         settingList);
878
879
 
879
 
    ASSERT_TRUE (filteredList);
 
880
    ASSERT_THAT (filteredList, NotNull ());
880
881
    ASSERT_EQ (ccsSettingListLength (filteredList), 2);
881
882
    EXPECT_EQ (filteredList->data, s1);
882
883
    EXPECT_NE (filteredList->data, s3);
883
 
    ASSERT_TRUE (filteredList->next);
 
884
    ASSERT_THAT (filteredList->next, NotNull ());
884
885
    EXPECT_EQ (filteredList->next->data, s2);
885
886
    EXPECT_NE (filteredList->data, s3);
886
887
    EXPECT_EQ (NULL, filteredList->next->next);
1066
1067
                GList *iterOther = other;
1067
1068
                GList *iterInternal = mList;
1068
1069
 
1069
 
                for (unsigned int i = 0; i < numInternal; i++)
 
1070
                for (unsigned int i = 0; i < numInternal; ++i)
1070
1071
                {
1071
1072
                    if (static_cast <CCSSettingType> (GPOINTER_TO_INT (iterOther->data)) !=
1072
1073
                        static_cast <CCSSettingType> (GPOINTER_TO_INT (iterInternal->data)))