Clean unittest query building slightly 99/21699/2
authorMats Wichmann <mats@linux.com>
Thu, 20 Jul 2017 13:40:34 +0000 (07:40 -0600)
committerPhil Coval <philippe.coval@osg.samsung.com>
Thu, 10 Aug 2017 13:39:03 +0000 (13:39 +0000)
commit64b3296442214899bbec92384bbf76421edda819
tree70e9a1de7f0e02b90a644f953f5d66e897cd4f8c
parent0d609e1639ca9bf4a08e6cf765e17ad5d6e36bda
Clean unittest query building slightly

In two unit tests a string used to build another string,
and thus read-only, is marked const.

In one instance, for consistency the malloc/strcpy sequence to
build the actual query is replaced with the single strdup call used
elsewhere.

In one instance the declaration of a query string is moved to
where it is used.

Change-Id: Iddc0317d446b5bdc099e0045eba4bb1c87062640
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21699
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
service/notification/unittest/NSProviderTest2.cpp
service/resource-encapsulation/src/serverBuilder/unittests/RCSResourceObjectTest.cpp