summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-05-24 14:37:46 +0300
committerTor Lillqvist <tml@collabora.com>2021-06-09 13:53:49 +0200
commitf0a8d47aecf42b64f576601a947b1904b78b94de (patch)
tree8173d1e8fcbb2d4c5ad408e83129966a990f4dd5
parentAdd the possibility to include a set of arguments in Trace Events (diff)
downloadcore-f0a8d47aecf42b64f576601a947b1904b78b94de.tar.gz
core-f0a8d47aecf42b64f576601a947b1904b78b94de.zip
Fix syntax error in the "arguments" of a TraceEvent
Change-Id: I68f94311d3e0527955b6ad8d5b49e4e564329e1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116054 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116848 Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--comphelper/qa/unit/test_traceevent.cxx6
-rw-r--r--include/comphelper/traceevent.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx
index 37855b82d5d4..b6be38f02ca8 100644
--- a/comphelper/qa/unit/test_traceevent.cxx
+++ b/comphelper/qa/unit/test_traceevent.cxx
@@ -151,12 +151,12 @@ void TestTraceEvent::test()
CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async2.5\",\"ph\":\"b\",\"id\":1,"));
CPPUNIT_ASSERT(aEvents[2].startsWith("{\"name\":\"block2\",\"ph\":\"X\","));
CPPUNIT_ASSERT(aEvents[3].startsWith(
- "{\"name\":\"async3\",\"ph\":\"b\",\"id\":2,\"args\":{\"foo\",\"bar\",\"tem\",\"42\"},"));
+ "{\"name\":\"async3\",\"ph\":\"b\",\"id\":2,\"args\":{\"foo\":\"bar\",\"tem\":\"42\"},"));
CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"async4in3\",\"ph\":\"b\",\"id\":2,"));
CPPUNIT_ASSERT(aEvents[5].startsWith("{\"name\":\"block3\",\"ph\":\"X\","));
CPPUNIT_ASSERT(aEvents[6].startsWith("{\"name\":\"async2.5\",\"ph\":\"e\",\"id\":1,"));
CPPUNIT_ASSERT(aEvents[7].startsWith(
- "{\"name:\"instant2\",\"ph\":\"i\",\"args\":{\"foo2\",\"bar2\",\"tem2\",\"42\"},"));
+ "{\"name:\"instant2\",\"ph\":\"i\",\"args\":{\"foo2\":\"bar2\",\"tem2\":\"42\"},"));
CPPUNIT_ASSERT(aEvents[8].startsWith("{\"name\":\"async5in4\",\"ph\":\"b\",\"id\":2,"));
CPPUNIT_ASSERT(aEvents[9].startsWith("{\"name\":\"async6in5\",\"ph\":\"b\",\"id\":2,"));
CPPUNIT_ASSERT(aEvents[10].startsWith("{\"name\":\"async6in5\",\"ph\":\"e\",\"id\":2,"));
@@ -166,7 +166,7 @@ void TestTraceEvent::test()
CPPUNIT_ASSERT(aEvents[14].startsWith("{\"name\":\"async4in3\",\"ph\":\"e\",\"id\":2,"));
CPPUNIT_ASSERT(aEvents[15].startsWith("{\"name\":\"async7in3\",\"ph\":\"e\",\"id\":2,"));
CPPUNIT_ASSERT(aEvents[16].startsWith(
- "{\"name\":\"async3\",\"ph\":\"e\",\"id\":2,\"args\":{\"foo\",\"bar\",\"tem\",\"42\"},"));
+ "{\"name\":\"async3\",\"ph\":\"e\",\"id\":2,\"args\":{\"foo\":\"bar\",\"tem\":\"42\"},"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(TestTraceEvent);
diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx
index 73c87e3767ac..6e614ec0552e 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -69,7 +69,7 @@ protected:
sResult.append(',');
sResult.append('"');
sResult.append(i.first);
- sResult.append("\",\"");
+ sResult.append("\":\"");
sResult.append(i.second);
sResult.append('"');
first = false;