projects
/
profile
/
ivi
/
common-api-dbus-runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
289de6a
)
Bugfix in DBusInputStreamTest - &-operator on std::string does not
author
Stefan Laner
<laner@itestra.de>
Tue, 15 Oct 2013 13:43:37 +0000
(15:43 +0200)
committer
Stefan Laner
<laner@itestra.de>
Tue, 15 Oct 2013 13:43:37 +0000
(15:43 +0200)
necessarily return a pointer to the contained c string
src/test/DBusInputStreamTest.cpp
patch
|
blob
|
history
diff --git
a/src/test/DBusInputStreamTest.cpp
b/src/test/DBusInputStreamTest.cpp
index
eaa33c2
..
5f66080
100644
(file)
--- a/
src/test/DBusInputStreamTest.cpp
+++ b/
src/test/DBusInputStreamTest.cpp
@@
-495,7
+495,8
@@
TEST_F(InputStreamTest, ReadsVariantsWithAnArrayOfStrings) {
DBusMessageIter innerArrayIter;
dbus_message_iter_open_container(&subSubIter, DBUS_TYPE_ARRAY, "s", &innerArrayIter);
for (unsigned int i = 0; i < numOfElements; i++) {
- dbus_message_iter_append_basic(&innerArrayIter, DBUS_TYPE_STRING, &testInnerVector[i]);
+ char* testPtr = strdup(testInnerVector[i].c_str());
+ dbus_message_iter_append_basic(&innerArrayIter, DBUS_TYPE_STRING, &testPtr);
}
dbus_message_iter_close_container(&subSubIter, &innerArrayIter);