Merge lp:~compiz-team/compiz/compiz.fix_1063617.9.1 into lp:compiz/0.9.9

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp:~compiz-team/compiz/compiz.fix_1063617.9.1
Merge into: lp:compiz/0.9.9
Prerequisite: lp:~compiz-team/compiz/compiz.fix_1063617.8
Diff against target: 585 lines (+272/-76)
1 file modified
compizconfig/libcompizconfig/tests/compizconfig_test_ccs_setting.cpp (+272/-76)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.fix_1063617.9.1
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Compiz Maintainers Pending
Review via email: mp+136857@code.launchpad.net

This proposal has been superseded by a proposal from 2013-02-12.

Commit message

Also allow the tests to run through ccsSetValue

Description of the change

Also allow the tests to run through ccsSetValue (increases coverage)

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

Your commit message needs fixing here ^^

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
3515. By Sam Spilsbury

Merge lp:compiz

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
3516. By Sam Spilsbury

The failure tests pass NULL through CopyRawValue - allow that and just return
NULL as the copy

3517. By Sam Spilsbury

Small typo fix

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'compizconfig/libcompizconfig/tests/compizconfig_test_ccs_setting.cpp'
--- compizconfig/libcompizconfig/tests/compizconfig_test_ccs_setting.cpp 2012-12-12 08:54:11 +0000
+++ compizconfig/libcompizconfig/tests/compizconfig_test_ccs_setting.cpp 2013-02-12 02:35:26 +0000
@@ -18,6 +18,8 @@
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19*/19*/
2020
21#include <tr1/tuple>
22
21#include <gtest/gtest.h>23#include <gtest/gtest.h>
22#include <gmock/gmock.h>24#include <gmock/gmock.h>
2325
@@ -45,6 +47,7 @@
45using ::testing::Invoke;47using ::testing::Invoke;
46using ::testing::ReturnNull;48using ::testing::ReturnNull;
47using ::testing::Values;49using ::testing::Values;
50using ::testing::Combine;
4851
49TEST(CCSSettingTest, TestMock)52TEST(CCSSettingTest, TestMock)
50{53{
@@ -732,7 +735,17 @@
732735
733 private:736 private:
734737
735 const cci::SettingValueListWrapper::Ptr &738 virtual const cci::SettingValueListWrapper::Ptr &
739 SetupWrapper (CCSSettingType type,
740 const CCSSettingInfoPtr &info) = 0;
741};
742
743class ListValueContainerFromChildValueBase :
744 public ListValueContainerBase
745{
746 private:
747
748 virtual const cci::SettingValueListWrapper::Ptr &
736 SetupWrapper (CCSSettingType type,749 SetupWrapper (CCSSettingType type,
737 const CCSSettingInfoPtr &info)750 const CCSSettingInfoPtr &info)
738 {751 {
@@ -757,13 +770,45 @@
757 virtual CCSSettingValue * GetValueForListWrapper () = 0;770 virtual CCSSettingValue * GetValueForListWrapper () = 0;
758};771};
759772
773class ListValueContainerFromList :
774 public ListValueContainerBase
775{
776 public:
777
778 ListValueContainerFromList (CCSSettingValueList rawValueList) :
779 mRawValueList (rawValueList)
780 {
781 }
782
783 private:
784
785 const cci::SettingValueListWrapper::Ptr &
786 SetupWrapper (CCSSettingType type,
787 const CCSSettingInfoPtr &info)
788 {
789 if (!mWrapper)
790 {
791 const CCSSettingPtr &setting (mContainedValueGenerator.GetSetting (type, info));
792 mWrapper.reset (new cci::SettingValueListWrapper (ccsCopyList (mRawValueList, setting.get ()),
793 cci::Deep,
794 type,
795 info,
796 setting));
797 }
798
799 return mWrapper;
800 }
801
802 CCSSettingValueList mRawValueList;
803};
804
760template <typename SettingValueType>805template <typename SettingValueType>
761class ListValueContainer :806class ChildValueListValueContainer :
762 public ListValueContainerBase807 public ListValueContainerFromChildValueBase
763{808{
764 public:809 public:
765810
766 ListValueContainer (const SettingValueType &value) :811 ChildValueListValueContainer (const SettingValueType &value) :
767 mRawChildValue (value)812 mRawChildValue (value)
768 {813 {
769 }814 }
@@ -782,8 +827,136 @@
782typename ValueContainer <CCSSettingValueList>::Ptr827typename ValueContainer <CCSSettingValueList>::Ptr
783ContainList (const SettingValueType &value)828ContainList (const SettingValueType &value)
784{829{
785 return boost::make_shared <ListValueContainer <SettingValueType> > (value);830 return boost::make_shared <ChildValueListValueContainer <SettingValueType> > (value);
786}831}
832
833typename ValueContainer <CCSSettingValueList>::Ptr
834ContainPrexistingList (const CCSSettingValueList &value)
835{
836 return boost::make_shared <ListValueContainerFromList> (value);
837}
838
839template <typename SettingValueType>
840struct SettingMutators
841{
842 typedef CCSSetStatus (*SetFunction) (CCSSetting *setting,
843 SettingValueType data,
844 Bool);
845 typedef Bool (*GetFunction) (CCSSetting *setting,
846 SettingValueType *);
847};
848
849typedef enum _SetMethod
850{
851 ThroughRaw,
852 ThroughValue
853} SetMethod;
854
855template <typename SettingValueType>
856CCSSetStatus performRawSet (const SettingValueType &rawValue,
857 const CCSSettingPtr &setting,
858 typename SettingMutators<SettingValueType>::SetFunction setFunction)
859{
860 return (*setFunction) (setting.get (), rawValue, FALSE);
861}
862
863template <typename SettingValueType>
864class RawValueContainmentPacker
865{
866 public:
867
868 RawValueContainmentPacker (const SettingValueType &value) :
869 mValue (value)
870 {
871 }
872
873 typename ValueContainer <SettingValueType>::Ptr
874 operator () ()
875 {
876 return ContainNormal (mValue);
877 }
878
879 private:
880
881 const SettingValueType &mValue;
882};
883
884template <>
885class RawValueContainmentPacker <CCSSettingValueList>
886{
887 public:
888
889 RawValueContainmentPacker (const CCSSettingValueList &value) :
890 mValue (value)
891 {
892 }
893
894 typename ValueContainer <CCSSettingValueList>::Ptr
895 operator () ()
896 {
897 return ContainPrexistingList (mValue);
898 }
899
900 private:
901
902 const CCSSettingValueList &mValue;
903};
904
905template <typename SettingValueType>
906typename ValueContainer <SettingValueType>::Ptr
907ContainRawValue (const SettingValueType &value)
908{
909 return RawValueContainmentPacker <SettingValueType> (value) ();
910}
911
912template <typename SettingValueType>
913CCSSetStatus performValueSet (const SettingValueType &rawValue,
914 const CCSSettingInfoPtr &info,
915 CCSSettingType type,
916 const CCSSettingPtr &setting)
917{
918 typename ValueContainer <SettingValueType>::Ptr container (ContainRawValue (rawValue));
919 const CCSSettingValuePtr &value (container->getContainedValue (type,
920 info));
921
922 return ccsSetValue (setting.get (), value.get (), FALSE);
923}
924
925template <typename SettingValueType>
926CCSSetStatus performSet (const SettingValueType &rawValue,
927 const CCSSettingPtr &setting,
928 const CCSSettingInfoPtr &info,
929 CCSSettingType type,
930 typename SettingMutators<SettingValueType>::SetFunction setFunction,
931 SetMethod method)
932{
933 /* XXX:
934 * This is really bad design because it effectively involves runtime
935 * switching on types. Unfortunately, there doesn't seem to be a better
936 * way to do this that's not hugely verbose - injecting the method
937 * as a class or a function would mean that we'd have to expose
938 * template parameters to areas where we can't do that because we
939 * want the tests to run once for ccsSetValue and once for
940 * ccsSet* . If we did that, we'd have to either write the tests
941 * twice, or write the INSTANTIATE_TEST_CASE_P sections twice and
942 * both are 200+ lines of copy-and-paste as opposed to this type-switch
943 * here
944 */
945 switch (method)
946 {
947 case ThroughRaw:
948 return performRawSet (rawValue, setting, setFunction);
949 break;
950 case ThroughValue:
951 return performValueSet (rawValue, info, type, setting);
952 break;
953 default:
954 throw std::runtime_error ("called PerfomSet with unknown SetMethod");
955 }
956
957 throw std::runtime_error ("Unreachable");
958}
959
787960
788class SetParam961class SetParam
789{962{
@@ -798,10 +971,10 @@
798 virtual void TearDownSetting () = 0;971 virtual void TearDownSetting () = 0;
799 virtual CCSSettingType GetSettingType () = 0;972 virtual CCSSettingType GetSettingType () = 0;
800 virtual void SetUpParam (const CCSSettingPtr &) = 0;973 virtual void SetUpParam (const CCSSettingPtr &) = 0;
801 virtual CCSSetStatus setWithInvalidType () = 0;974 virtual CCSSetStatus setWithInvalidType (SetMethod) = 0;
802 virtual CCSSetStatus setToFailValue () = 0;975 virtual CCSSetStatus setToFailValue (SetMethod) = 0;
803 virtual CCSSetStatus setToNonDefaultValue () = 0;976 virtual CCSSetStatus setToNonDefaultValue (SetMethod) = 0;
804 virtual CCSSetStatus setToDefaultValue () = 0;977 virtual CCSSetStatus setToDefaultValue (SetMethod) = 0;
805};978};
806979
807void stubInitInfo (CCSSettingType type,980void stubInitInfo (CCSSettingType type,
@@ -871,16 +1044,6 @@
871 CCSSettingValue *mValue;1044 CCSSettingValue *mValue;
872};1045};
8731046
874template <typename SettingValueType>
875struct SettingMutators
876{
877 typedef CCSSetStatus (*SetFunction) (CCSSetting *setting,
878 SettingValueType data,
879 Bool);
880 typedef Bool (*GetFunction) (CCSSetting *setting,
881 SettingValueType *);
882};
883
884class InternalSetParam :1047class InternalSetParam :
885 public SetParam1048 public SetParam
886{1049{
@@ -895,8 +1058,6 @@
8951058
896 virtual void TearDownSetting ()1059 virtual void TearDownSetting ()
897 {1060 {
898 if (mSetting)
899 setToDefaultValue ();
900 }1061 }
9011062
902 void InitDefaultsForSetting (const SetUpSettingFunc &func)1063 void InitDefaultsForSetting (const SetUpSettingFunc &func)
@@ -944,7 +1105,7 @@
944 GET_INTERFACE_TYPE (CCSSettingInterface));1105 GET_INTERFACE_TYPE (CCSSettingInterface));
945 }1106 }
9461107
947 virtual CCSSetStatus setToFailValue ()1108 virtual CCSSetStatus setToFailValue (SetMethod method)
948 {1109 {
949 return SetFailed;1110 return SetFailed;
950 }1111 }
@@ -961,6 +1122,8 @@
961 CCSSettingType mType;1122 CCSSettingType mType;
962 CCSSettingPtr mSetting;1123 CCSSettingPtr mSetting;
9631124
1125 CCSSettingInterface tmpSettingInterface;
1126
964 private:1127 private:
9651128
966 static const CCSSettingType incorrectSettingType = TypeNum;1129 static const CCSSettingType incorrectSettingType = TypeNum;
@@ -1034,26 +1197,25 @@
1034 TakeReferenceToCreatedSetting (setting);1197 TakeReferenceToCreatedSetting (setting);
1035 }1198 }
10361199
1037 virtual CCSSetStatus setWithInvalidType ()1200 virtual CCSSetStatus setWithInvalidType (SetMethod method)
1038 {1201 {
1039 /* Temporarily redirect the setting interface to1202 /* Temporarily redirect the setting interface to
1040 * our own with an overloaded settingGetType function */1203 * our own with an overloaded settingGetType function */
1041
1042 const CCSSettingInterface *iface = RedirectSettingInterface ();1204 const CCSSettingInterface *iface = RedirectSettingInterface ();
1043 CCSSetStatus ret = (*mSetFunction) (mSetting.get (), mNonDefaultValue, FALSE);1205 CCSSetStatus ret = performSet (mNonDefaultValue, mSetting, mInfo, mType, mSetFunction, method);
1044 RestoreSettingInterface (iface);1206 RestoreSettingInterface (iface);
10451207
1046 return ret;1208 return ret;
1047 }1209 }
10481210
1049 virtual CCSSetStatus setToNonDefaultValue ()1211 virtual CCSSetStatus setToNonDefaultValue (SetMethod method)
1050 {1212 {
1051 return (*mSetFunction) (mSetting.get (), mNonDefaultValue, FALSE);1213 return performSet (mNonDefaultValue, mSetting, mInfo, mType, mSetFunction, method);
1052 }1214 }
10531215
1054 virtual CCSSetStatus setToDefaultValue ()1216 virtual CCSSetStatus setToDefaultValue (SetMethod method)
1055 {1217 {
1056 return (*mSetFunction) (mSetting.get (), mDefaultValue, FALSE);1218 return performSet (mDefaultValue, mSetting, mInfo, mType, mSetFunction, method);
1057 }1219 }
10581220
1059 private:1221 private:
@@ -1073,14 +1235,17 @@
1073 protected:1235 protected:
10741236
1075 SetWithDisallowedValueBase (const CCSSettingPtr &setting,1237 SetWithDisallowedValueBase (const CCSSettingPtr &setting,
1076 const CCSSettingInfoPtr &info) :1238 const CCSSettingInfoPtr &info,
1239 CCSSettingType type) :
1077 mSetting (setting),1240 mSetting (setting),
1078 mInfo (info)1241 mInfo (info),
1242 mType (type)
1079 {1243 {
1080 }1244 }
10811245
1082 CCSSettingPtr mSetting;1246 CCSSettingPtr mSetting;
1083 CCSSettingInfoPtr mInfo;1247 CCSSettingInfoPtr mInfo;
1248 CCSSettingType mType;
1084};1249};
10851250
1086template <typename SettingValueType>1251template <typename SettingValueType>
@@ -1093,8 +1258,9 @@
10931258
1094 SetWithDisallowedValueTemplatedBase (SetFunction setFunction,1259 SetWithDisallowedValueTemplatedBase (SetFunction setFunction,
1095 const CCSSettingPtr &setting,1260 const CCSSettingPtr &setting,
1096 const CCSSettingInfoPtr &info) :1261 const CCSSettingInfoPtr &info,
1097 SetWithDisallowedValueBase (setting, info),1262 CCSSettingType type) :
1263 SetWithDisallowedValueBase (setting, info, type),
1098 mSetFunction (setFunction)1264 mSetFunction (setFunction)
1099 {1265 {
1100 }1266 }
@@ -1112,12 +1278,13 @@
11121278
1113 SetWithDisallowedValue (SetFunction setFunction,1279 SetWithDisallowedValue (SetFunction setFunction,
1114 const CCSSettingPtr &setting,1280 const CCSSettingPtr &setting,
1115 const CCSSettingInfoPtr &info) :1281 const CCSSettingInfoPtr &info,
1116 SetWithDisallowedValueTemplatedBase <SettingValueType> (setFunction, setting, info)1282 CCSSettingType type) :
1283 SetWithDisallowedValueTemplatedBase <SettingValueType> (setFunction, setting, info, type)
1117 {1284 {
1118 }1285 }
11191286
1120 CCSSetStatus operator () ()1287 CCSSetStatus operator () (SetMethod method)
1121 {1288 {
1122 return SetFailed;1289 return SetFailed;
1123 }1290 }
@@ -1134,16 +1301,20 @@
11341301
1135 SetWithDisallowedValue (SetFunction setFunction,1302 SetWithDisallowedValue (SetFunction setFunction,
1136 const CCSSettingPtr &setting,1303 const CCSSettingPtr &setting,
1137 const CCSSettingInfoPtr &info) :1304 const CCSSettingInfoPtr &info,
1138 SetWithDisallowedValueTemplatedBase <int> (setFunction, setting, info)1305 CCSSettingType type) :
1306 SetWithDisallowedValueTemplatedBase <int> (setFunction, setting, info, type)
1139 {1307 {
1140 }1308 }
11411309
1142 CCSSetStatus operator () ()1310 CCSSetStatus operator () (SetMethod method)
1143 {1311 {
1144 return (*Parent::mSetFunction) (Parent::mSetting.get (),1312 return performSet <int> (Parent::mInfo->forInt.min - 1,
1145 Parent::mInfo->forInt.min - 1,1313 Parent::mSetting,
1146 FALSE);1314 Parent::mInfo,
1315 Parent::mType,
1316 Parent::mSetFunction,
1317 method);
1147 }1318 }
1148};1319};
11491320
@@ -1158,16 +1329,20 @@
11581329
1159 SetWithDisallowedValue (SetFunction setFunction,1330 SetWithDisallowedValue (SetFunction setFunction,
1160 const CCSSettingPtr &setting,1331 const CCSSettingPtr &setting,
1161 const CCSSettingInfoPtr &info) :1332 const CCSSettingInfoPtr &info,
1162 SetWithDisallowedValueTemplatedBase <float> (setFunction, setting, info)1333 CCSSettingType type) :
1334 SetWithDisallowedValueTemplatedBase <float> (setFunction, setting, info, type)
1163 {1335 {
1164 }1336 }
11651337
1166 CCSSetStatus operator () ()1338 CCSSetStatus operator () (SetMethod method)
1167 {1339 {
1168 return (*Parent::mSetFunction) (Parent::mSetting.get (),1340 return performSet <float> (Parent::mInfo->forFloat.min - 1.0f,
1169 Parent::mInfo->forFloat.min - 1,1341 Parent::mSetting,
1170 FALSE);1342 Parent::mInfo,
1343 Parent::mType,
1344 Parent::mSetFunction,
1345 method);
1171 }1346 }
1172};1347};
11731348
@@ -1182,16 +1357,20 @@
11821357
1183 SetWithDisallowedValue (SetFunction setFunction,1358 SetWithDisallowedValue (SetFunction setFunction,
1184 const CCSSettingPtr &setting,1359 const CCSSettingPtr &setting,
1185 const CCSSettingInfoPtr &info) :1360 const CCSSettingInfoPtr &info,
1186 SetWithDisallowedValueTemplatedBase <const char *> (setFunction, setting, info)1361 CCSSettingType type) :
1362 SetWithDisallowedValueTemplatedBase <const char *> (setFunction, setting, info, type)
1187 {1363 {
1188 }1364 }
11891365
1190 CCSSetStatus operator () ()1366 CCSSetStatus operator () (SetMethod method)
1191 {1367 {
1192 return (*Parent::mSetFunction) (Parent::mSetting.get (),1368 return performSet <const char *> (NULL,
1193 NULL,1369 Parent::mSetting,
1194 FALSE);1370 Parent::mInfo,
1371 Parent::mType,
1372 Parent::mSetFunction,
1373 method);
1195 }1374 }
1196};1375};
11971376
@@ -1221,12 +1400,13 @@
1221 {1400 {
1222 }1401 }
12231402
1224 virtual CCSSetStatus setToFailValue ()1403 virtual CCSSetStatus setToFailValue (SetMethod method)
1225 {1404 {
1226 typedef TypedSetParam <SettingValueType> Parent;1405 typedef TypedSetParam <SettingValueType> Parent;
1227 return SetWithDisallowedValue <SettingValueType> (Parent::mSetFunction,1406 return SetWithDisallowedValue <SettingValueType> (Parent::mSetFunction,
1228 Parent::mSetting,1407 Parent::mSetting,
1229 Parent::mInfo) ();1408 Parent::mInfo,
1409 Parent::mType) (method);
1230 }1410 }
1231};1411};
12321412
@@ -1264,27 +1444,41 @@
1264 changeTo);1444 changeTo);
1265}1445}
12661446
1447typedef std::tr1::tuple <SetParam::Ptr,
1448 SetMethod> SettingDefaultImplSetParamType;
1449
1267class SettingDefaultImplSet :1450class SettingDefaultImplSet :
1268 public CCSSettingDefaultImplTest,1451 public CCSSettingDefaultImplTest,
1269 public WithParamInterface <SetParam::Ptr>1452 public WithParamInterface <SettingDefaultImplSetParamType>
1270{1453{
1271 public:1454 public:
12721455
1456 SettingDefaultImplSet () :
1457 setHarness (std::tr1::get <0> (GetParam ())),
1458 setMethod (std::tr1::get <1> (GetParam ()))
1459 {
1460 }
1461
1273 virtual void SetUp ()1462 virtual void SetUp ()
1274 {1463 {
1275 GetParam ()->SetUpSetting (boost::bind (&CCSSettingDefaultImplTest::SetUpSetting, this, _1));1464 setHarness->SetUpSetting (boost::bind (&CCSSettingDefaultImplTest::SetUpSetting, this, _1));
1276 GetParam ()->SetUpParam (setting);1465 setHarness->SetUpParam (setting);
1277 }1466 }
12781467
1279 virtual void TearDown ()1468 virtual void TearDown ()
1280 {1469 {
1281 GetParam ()->TearDownSetting ();1470 setHarness->TearDownSetting ();
1282 }1471 }
12831472
1284 CCSSettingType GetSettingType ()1473 CCSSettingType GetSettingType ()
1285 {1474 {
1286 return GetParam ()->GetSettingType ();1475 return setHarness->GetSettingType ();
1287 }1476 }
1477
1478 protected:
1479
1480 SetParam::Ptr setHarness;
1481 SetMethod setMethod;
1288};1482};
12891483
1290class SettingDefaulImplSetFailure :1484class SettingDefaulImplSetFailure :
@@ -1302,41 +1496,41 @@
13021496
1303TEST_P (SettingDefaultImplSet, WithInvalidType)1497TEST_P (SettingDefaultImplSet, WithInvalidType)
1304{1498{
1305 EXPECT_EQ (SetFailed, GetParam ()->setWithInvalidType ());1499 EXPECT_EQ (SetFailed, setHarness->setWithInvalidType (setMethod));
1306}1500}
13071501
1308TEST_P (SettingDefaultImplSet, ToNewValue)1502TEST_P (SettingDefaultImplSet, ToNewValue)
1309{1503{
1310 EXPECT_EQ (SetToNewValue, GetParam ()->setToNonDefaultValue ());1504 EXPECT_EQ (SetToNewValue, setHarness->setToNonDefaultValue (setMethod));
1311}1505}
13121506
1313TEST_P (SettingDefaultImplSet, ToSameValue)1507TEST_P (SettingDefaultImplSet, ToSameValue)
1314{1508{
1315 EXPECT_EQ (SetToNewValue, GetParam ()->setToNonDefaultValue ());1509 EXPECT_EQ (SetToNewValue, setHarness->setToNonDefaultValue (setMethod));
1316 EXPECT_EQ (SetToSameValue, GetParam ()->setToNonDefaultValue ());1510 EXPECT_EQ (SetToSameValue, setHarness->setToNonDefaultValue (setMethod));
1317}1511}
13181512
1319TEST_P (SettingDefaultImplSet, ToDefaultValue)1513TEST_P (SettingDefaultImplSet, ToDefaultValue)
1320{1514{
1321 EXPECT_EQ (SetToNewValue, GetParam ()->setToNonDefaultValue ());1515 EXPECT_EQ (SetToNewValue, setHarness->setToNonDefaultValue (setMethod));
1322 EXPECT_EQ (SetToDefault, GetParam ()->setToDefaultValue ());1516 EXPECT_EQ (SetToDefault, setHarness->setToDefaultValue (setMethod));
1323}1517}
13241518
1325TEST_P (SettingDefaultImplSet, IsDefaultValue)1519TEST_P (SettingDefaultImplSet, IsDefaultValue)
1326{1520{
1327 EXPECT_EQ (SetToNewValue, GetParam ()->setToNonDefaultValue ());1521 EXPECT_EQ (SetToNewValue, setHarness->setToNonDefaultValue (setMethod));
1328 EXPECT_EQ (SetToDefault, GetParam ()->setToDefaultValue ());1522 EXPECT_EQ (SetToDefault, setHarness->setToDefaultValue (setMethod));
1329 EXPECT_EQ (SetIsDefault, GetParam ()->setToDefaultValue ());1523 EXPECT_EQ (SetIsDefault, setHarness->setToDefaultValue (setMethod));
1330}1524}
13311525
1332TEST_P (SettingDefaulImplSetFailure, ToFailValue)1526TEST_P (SettingDefaulImplSetFailure, ToFailValue)
1333{1527{
1334 EXPECT_EQ (SetFailed, GetParam ()->setToFailValue ());1528 EXPECT_EQ (SetFailed, setHarness->setToFailValue (setMethod));
1335}1529}
13361530
1337#define VALUE_TEST INSTANTIATE_TEST_CASE_P1531#define VALUE_TEST INSTANTIATE_TEST_CASE_P
13381532
1339VALUE_TEST (SetSemantics, SettingDefaulImplSetFailure,1533VALUE_TEST (SetSemantics, SettingDefaulImplSetFailure, Combine (
1340 Values (FailSParam <int> (ContainNormal (INTEGER_DEFAULT_VALUE),1534 Values (FailSParam <int> (ContainNormal (INTEGER_DEFAULT_VALUE),
1341 TypeInt,1535 TypeInt,
1342 ccsSetInt,1536 ccsSetInt,
@@ -1364,9 +1558,10 @@
1364 ccsGetMatch,1558 ccsGetMatch,
1365 AutoDestroyInfo (getGenericInfo (TypeMatch),1559 AutoDestroyInfo (getGenericInfo (TypeMatch),
1366 TypeMatch),1560 TypeMatch),
1367 ContainNormal (MATCH_VALUE))));1561 ContainNormal (MATCH_VALUE))),
1562 Values (ThroughRaw, ThroughValue)));
13681563
1369VALUE_TEST (SetSemantics, SettingDefaultImplSet,1564VALUE_TEST (SetSemantics, SettingDefaultImplSet, Combine (
1370 Values (SParam <int> (ContainNormal (INTEGER_DEFAULT_VALUE),1565 Values (SParam <int> (ContainNormal (INTEGER_DEFAULT_VALUE),
1371 TypeInt,1566 TypeInt,
1372 ccsSetInt,1567 ccsSetInt,
@@ -1506,4 +1701,5 @@
1506 ccsGetList,1701 ccsGetList,
1507 getListInfo (TypeBell,1702 getListInfo (TypeBell,
1508 getActionInfo (TypeBell)),1703 getActionInfo (TypeBell)),
1509 ContainList (BELL_VALUE))));1704 ContainList (BELL_VALUE))),
1705 Values (ThroughRaw, ThroughValue)));

Subscribers

People subscribed via source and target branches