Fix for Jira [IOT-1424]
authorVeeraj Khokale <veeraj.sk@samsung.com>
Mon, 10 Oct 2016 08:34:54 +0000 (14:04 +0530)
committerAshok Babu Channa <ashok.channa@samsung.com>
Mon, 10 Oct 2016 11:35:06 +0000 (11:35 +0000)
Modified unit test to pass mutable string to CHPGetOCContentType().

Change-Id: Ic0ea5704ddff20dc67086296e54775ef8d677d69
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13013
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
service/coap-http-proxy/unittests/CoAPHttpUnitTest.cpp

index d59d7ce..3fa714f 100644 (file)
@@ -103,7 +103,8 @@ TEST_F(CoApHttpTest, CHPGetOCContentType)
 {
     HttpResponse_t httpResponse;
     //char *httpContentType = "OC_FORMAT_CBOR";
-    char *httpContentType = "CBOR_CONTENT_TYPE";
+    char httpContentType[64];
+    strcpy(httpContentType, "application/cbor");
     EXPECT_EQ(OC_FORMAT_CBOR, (CHPGetOCContentType(httpContentType)));
 }