summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-12-19 03:44:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-12-19 03:44:13 +0000
commit2ad4cf54ee097fe6bfdb2e6593bf3db1895951cd (patch)
tree5613e620a14d00bafea4ddb849715bd11c808e63 /unittests
parent5b6af7163d0a76864bed610c4e884aeffa16b302 (diff)
downloadllvm-2ad4cf54ee097fe6bfdb2e6593bf3db1895951cd.tar.gz
llvm-2ad4cf54ee097fe6bfdb2e6593bf3db1895951cd.tar.bz2
llvm-2ad4cf54ee097fe6bfdb2e6593bf3db1895951cd.tar.xz
No point in having a "#if 0"ed unittest.
It is also not clear what the value of the test was. The API is used from existing tools and can (and is) tested with lit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp55
-rw-r--r--unittests/ArchiveFileDescriptor/CMakeLists.txt8
-rw-r--r--unittests/ArchiveFileDescriptor/Makefile15
-rw-r--r--unittests/CMakeLists.txt1
-rw-r--r--unittests/Makefile2
5 files changed, 1 insertions, 80 deletions
diff --git a/unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp b/unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp
deleted file mode 100644
index 1cafa248fe..0000000000
--- a/unittests/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//===- llvm/unittest/ArchiveFileDescriptor/ArchiveFileDescriptor.cpp ------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Object/Archive.h"
-#include "llvm/Object/ObjectFile.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "gtest/gtest.h"
-
-using namespace llvm;
-using namespace llvm::object;
-
-static void failIfError(error_code EC) {
- if (!EC)
- return;
-
- errs() << "ERROR: " << EC.message() << "\n";
- exit(1);
-}
-
-TEST(ArchiveFileDescriptor, Test1) {
-#if 0 // FIXME: It may be reverted.
- int FD;
-
- error_code EC = sys::fs::openFileForRead("ArchiveFileDescriptor", FD);
- failIfError(EC);
-
- OwningPtr<MemoryBuffer> MemoryBuffer;
- EC = MemoryBuffer::getOpenFile(FD, "Dummy Filename",
- MemoryBuffer,
- /* FileSize */ -1,
- /* RequiresNullTerminator */ false);
- failIfError(EC);
-
- // Attempt to open the binary.
- OwningPtr<Binary> Binary;
- EC = createBinary(MemoryBuffer.take(), Binary);
- failIfError(EC);
-
- if (Archive *Arc = dyn_cast<Archive>(Binary.get())) {
- (void)Arc;
- errs() << "ERROR: Loaded archive, was expecting object file\n";
- } else if (ObjectFile *Obj = dyn_cast<ObjectFile>(Binary.get())) {
- (void)Obj;
- } else {
- outs() << "ERROR: Unknown file type\n";
- exit(1);
- }
-#endif
-}
diff --git a/unittests/ArchiveFileDescriptor/CMakeLists.txt b/unittests/ArchiveFileDescriptor/CMakeLists.txt
deleted file mode 100644
index ef26fbfa26..0000000000
--- a/unittests/ArchiveFileDescriptor/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-set(LLVM_LINK_COMPONENTS
- Object
- Support
- )
-
-add_llvm_unittest(ArchiveFileDescriptorTests
- ArchiveFileDescriptor.cpp
- )
diff --git a/unittests/ArchiveFileDescriptor/Makefile b/unittests/ArchiveFileDescriptor/Makefile
deleted file mode 100644
index 460b86c0a0..0000000000
--- a/unittests/ArchiveFileDescriptor/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-##===- unittests/ArchiveFileDescriptor/Makefile ------------*- Makefile -*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-
-LEVEL = ../..
-TESTNAME = ArchiveFileDescriptor
-LINK_COMPONENTS := object
-
-include $(LEVEL)/Makefile.config
-include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt
index 9857e787ee..52702ba23a 100644
--- a/unittests/CMakeLists.txt
+++ b/unittests/CMakeLists.txt
@@ -7,7 +7,6 @@ endfunction()
add_subdirectory(ADT)
add_subdirectory(Analysis)
-add_subdirectory(ArchiveFileDescriptor)
add_subdirectory(Bitcode)
add_subdirectory(CodeGen)
add_subdirectory(DebugInfo)
diff --git a/unittests/Makefile b/unittests/Makefile
index d80cab2621..bea39c52fb 100644
--- a/unittests/Makefile
+++ b/unittests/Makefile
@@ -9,7 +9,7 @@
LEVEL = ..
-PARALLEL_DIRS = ADT Analysis ArchiveFileDescriptor Bitcode CodeGen DebugInfo \
+PARALLEL_DIRS = ADT Analysis Bitcode CodeGen DebugInfo \
ExecutionEngine IR MC Object Option Support Transforms
include $(LEVEL)/Makefile.common