summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ObjectYAML/YAML2ObjTest.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-08-06 13:39:50 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-08-06 13:39:50 +0000
commitfc21bb661f5177eaec4d756b904167be4f0e7dfb (patch)
tree6fc478223b13b8cbcfce97675b4acf2bdfa2f393 /llvm/unittests/ObjectYAML/YAML2ObjTest.cpp
parentbd1721e534ca34b7f50f2d6ab5f979b3a35ff19c (diff)
downloadbcm5719-llvm-fc21bb661f5177eaec4d756b904167be4f0e7dfb.tar.gz
bcm5719-llvm-fc21bb661f5177eaec4d756b904167be4f0e7dfb.zip
Revert "[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests"
This reverts commit r368021, it broke tests. llvm-svn: 368035
Diffstat (limited to 'llvm/unittests/ObjectYAML/YAML2ObjTest.cpp')
-rw-r--r--llvm/unittests/ObjectYAML/YAML2ObjTest.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/llvm/unittests/ObjectYAML/YAML2ObjTest.cpp b/llvm/unittests/ObjectYAML/YAML2ObjTest.cpp
deleted file mode 100644
index 0a383881687..00000000000
--- a/llvm/unittests/ObjectYAML/YAML2ObjTest.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-//===- YAML2ObjTest.cpp --------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ObjectYAML/yaml2obj.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/Object/ObjectFile.h"
-#include "llvm/Support/Error.h"
-#include "llvm/Testing/Support/Error.h"
-#include "gtest/gtest.h"
-
-using namespace llvm;
-using namespace object;
-using namespace yaml;
-
-TEST(yaml2ObjectFile, ELF) {
- SmallString<0> Storage;
- Expected<std::unique_ptr<ObjectFile>> ErrOrObj = yaml2ObjectFile(Storage, R"(
---- !ELF
-FileHeader:
- Class: ELFCLASS64
- Data: ELFDATA2LSB
- Type: ET_REL
- Machine: EM_X86_64)");
-
- ASSERT_THAT_EXPECTED(ErrOrObj, Succeeded());
-
- std::unique_ptr<ObjectFile> ObjFile = std::move(ErrOrObj.get());
-
- ASSERT_TRUE(ObjFile->isELF());
- ASSERT_TRUE(ObjFile->isRelocatableObject());
-}
OpenPOWER on IntegriCloud