IOT-2539 Remove conversion-null warnings 35/22835/2
authorGeorge Nash <george.nash@intel.com>
Fri, 13 Oct 2017 20:40:28 +0000 (13:40 -0700)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tue, 17 Oct 2017 05:11:16 +0000 (05:11 +0000)
For some reason using EXPECT_EQ or ASSERT_EQ
converts boolean values to char* which results in
the conversion-null warnings.

Places where EXPECT_EQ or ASSERT_EQ were using a
boolean result for the value was replaced with
ASSERT_TRUE, ASSERT_FALSE, EXPECT_TRUE or
EXPECT_FALSE as needed.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I9604b6a7f64545e468430cfdb597eaf18e444580
Signed-off-by: George Nash <george.nash@intel.com>
resource/csdk/stack/test/cbortests.cpp
resource/provisioning/unittests/OCProvisioningTest.cpp

index 55e1a4c..3aa1b39 100644 (file)
@@ -419,8 +419,7 @@ TEST(CborEmptyArrayTest, EmptyArrayArraySetGetTest)
     size_t dimensions_out[MAX_REP_ARRAY_DEPTH] = {0};
 
     ///TODO: Change Assert to true after fixing OCRepPayloadGetIntArray behaviour
-    ASSERT_EQ(false, OCRepPayloadGetIntArray(payload_in, "quakedata",
-                &quakedata_out, dimensions_out));
+    ASSERT_FALSE(OCRepPayloadGetIntArray(payload_in, "quakedata", &quakedata_out, dimensions_out));
 
     ASSERT_TRUE(quakedata_out == NULL);
 
index b000d1d..e8e1db4 100644 (file)
@@ -166,13 +166,13 @@ namespace OCProvisioningTest
     TEST(isMOTEnabledTest, isMOTEnabledWithoutDeviceInst)
     {
         OCSecureResource device;
-        EXPECT_EQ(false, device.isMOTEnabled());
+        EXPECT_FALSE(device.isMOTEnabled());
     }
 
     TEST(isMOTSupportedTest, isMOTSupportedWithoutDeviceInst)
     {
         OCSecureResource device;
-        EXPECT_EQ(false, device.isMOTSupported());
+        EXPECT_FALSE(device.isMOTSupported());
     }
 
     TEST(getMOTMethodTest, getMOTMethodNullOxM)