summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Core/StructuredDataTest.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-06-27 10:45:31 +0000
committerPavel Labath <labath@google.com>2017-06-27 10:45:31 +0000
commitf2a8bccf8542c3d561e4537b67901ecdb74f4a29 (patch)
treecf9ff85b7940e2ffa53ee8503d20201185343e24 /lldb/unittests/Core/StructuredDataTest.cpp
parent6a391bbf40efb013ac4a5fced7318614a967786a (diff)
downloadbcm5719-llvm-f2a8bccf8542c3d561e4537b67901ecdb74f4a29.tar.gz
bcm5719-llvm-f2a8bccf8542c3d561e4537b67901ecdb74f4a29.zip
Move StructuredData from Core to Utility
Summary: It had a dependency on StringConvert and file reading code, which is not in Utility. I've replaced that code by equivalent llvm operations. I've added a unit test to demonstrate that parsing a file still works. Reviewers: zturner, jingham Subscribers: kubamracek, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D34625 llvm-svn: 306394
Diffstat (limited to 'lldb/unittests/Core/StructuredDataTest.cpp')
-rw-r--r--lldb/unittests/Core/StructuredDataTest.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/lldb/unittests/Core/StructuredDataTest.cpp b/lldb/unittests/Core/StructuredDataTest.cpp
deleted file mode 100644
index cdcf3236cd7..00000000000
--- a/lldb/unittests/Core/StructuredDataTest.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- StructuredDataTest.cpp ----------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "gtest/gtest.h"
-
-#include "lldb/Core/StructuredData.h"
-#include "lldb/Utility/StreamString.h"
-
-#include "llvm/BinaryFormat/MachO.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-TEST(StructuredDataTest, StringDump) {
- std::pair<llvm::StringRef, llvm::StringRef> TestCases[] = {
- { R"(asdfg)", R"("asdfg")" },
- { R"(as"df)", R"("as\"df")" },
- { R"(as\df)", R"("as\\df")" },
- };
- for(auto P : TestCases) {
- StreamString S;
- const bool pretty_print = false;
- StructuredData::String(P.first).Dump(S, pretty_print);
- EXPECT_EQ(P.second, S.GetString());
- }
-}
OpenPOWER on IntegriCloud