From bce6f27dd44f12939f20a4b2bfa18e0e7d3f9d60 Mon Sep 17 00:00:00 2001 From: dota17 Date: Wed, 8 Jul 2020 10:03:56 +0800 Subject: [PATCH] update the string data. --- test/integration/emitter_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/emitter_test.cpp b/test/integration/emitter_test.cpp index 33c6166..0c28dea 100644 --- a/test/integration/emitter_test.cpp +++ b/test/integration/emitter_test.cpp @@ -266,8 +266,8 @@ TEST_F(EmitterTest, SimpleLongKey) { } TEST_F(EmitterTest, SingleLongKey) { - const std::string& shortKey = std::string(1024, 'a'); - const std::string& longKey = std::string(1025, 'a'); + const std::string shortKey(1024, 'a'); + const std::string longKey(1025, 'a'); out << BeginMap; out << Key << "age"; out << Value << "24";