[MSF] Move MSF unit tests to their own unittest target.

llvm-svn: 309895
This commit is contained in:
Zachary Turner 2017-08-02 22:26:09 +00:00
parent c3d8eec9e9
commit 018338e503
5 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,4 @@
add_subdirectory(CodeView)
add_subdirectory(DWARF)
add_subdirectory(MSF)
add_subdirectory(PDB)

View File

@ -0,0 +1,14 @@
set(LLVM_LINK_COMPONENTS
DebugInfoMSF
)
set(DebugInfoMSFSources
MappedBlockStreamTest.cpp
MSFBuilderTest.cpp
)
add_llvm_unittest(DebugInfoMSFTests
${DebugInfoMSFSources}
)
target_link_libraries(DebugInfoMSFTests LLVMTestingSupport)

View File

@ -38,7 +38,7 @@ protected:
BumpPtrAllocator Allocator;
};
}
} // namespace
TEST_F(MSFBuilderTest, ValidateSuperBlockAccept) {
// Test that a known good super block passes validation.

View File

@ -1,4 +1,4 @@
//===- llvm/unittest/DebugInfo/PDB/MappedBlockStreamTest.cpp --------------===//
//===- llvm/unittest/DebugInfo/MSF/MappedBlockStreamTest.cpp --------------===//
//
// The LLVM Compiler Infrastructure
//
@ -82,7 +82,6 @@ TEST(MappedBlockStreamTest, NumBlocks) {
F.Allocator);
EXPECT_EQ(F.block_size(), S->getBlockSize());
EXPECT_EQ(F.layout().Blocks.size(), S->getNumBlocks());
}
// Tests that a read which is entirely contained within a single block works
@ -334,7 +333,7 @@ TEST(MappedBlockStreamTest, TestWriteThenRead) {
uint8_t byteArray1[] = {'0', '0'};
ArrayRef<uint8_t> byteArrayRef0(byteArray0);
ArrayRef<uint8_t> byteArrayRef1(byteArray1);
ArrayRef<uint8_t> byteArray[] = { byteArrayRef0, byteArrayRef1 };
ArrayRef<uint8_t> byteArray[] = {byteArrayRef0, byteArrayRef1};
uint32_t intArr0[] = {890723408, 29082234};
uint32_t intArr1[] = {890723408, 29082234};
ArrayRef<uint32_t> intArray[] = {intArr0, intArr1};

View File

@ -6,9 +6,7 @@ set(LLVM_LINK_COMPONENTS
set(DebugInfoPDBSources
HashTableTest.cpp
MappedBlockStreamTest.cpp
StringTableBuilderTest.cpp
MSFBuilderTest.cpp
PDBApiTest.cpp
)