diff options
-rw-r--r-- | clang-tools-extra/unittests/clangd/JSONExprTests.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang-tools-extra/unittests/clangd/JSONExprTests.cpp b/clang-tools-extra/unittests/clangd/JSONExprTests.cpp index a05b7f8486f..a95b4b0c6ce 100644 --- a/clang-tools-extra/unittests/clangd/JSONExprTests.cpp +++ b/clang-tools-extra/unittests/clangd/JSONExprTests.cpp @@ -67,9 +67,11 @@ TEST(JSONExprTests, Escaping) { '\x7f', // Delete is not escaped. '\xce', '\x94', // Non-ASCII UTF-8 is not escaped. }; - EXPECT_EQ(R"("\u0000\u0008\u000c\r\n\tS\"\\)" - "\x7f\xCE\x94\"", - s(test)); + + std::string teststring = R"("\u0000\u0008\u000c\r\n\tS\"\\)" + "\x7f\xCE\x94\""; + + EXPECT_EQ(teststring, s(test)); EXPECT_EQ(R"({"object keys are\nescaped":true})", s(obj{{"object keys are\nescaped", true}})); |