]> granicus.if.org Git - llvm/commitdiff
[MSF] Move MSF unit tests to their own unittest target.
authorZachary Turner <zturner@google.com>
Wed, 2 Aug 2017 22:26:09 +0000 (22:26 +0000)
committerZachary Turner <zturner@google.com>
Wed, 2 Aug 2017 22:26:09 +0000 (22:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309895 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/DebugInfo/CMakeLists.txt
unittests/DebugInfo/MSF/CMakeLists.txt [new file with mode: 0644]
unittests/DebugInfo/MSF/MSFBuilderTest.cpp [moved from unittests/DebugInfo/PDB/MSFBuilderTest.cpp with 99% similarity]
unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp [moved from unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp with 99% similarity]
unittests/DebugInfo/PDB/CMakeLists.txt

index e38fff58cae6aa62f8fe8d72e1f92ef86a45fa4d..579fdb202cf4ee50833ba4c209f8f52437fd8b8e 100644 (file)
@@ -1,3 +1,4 @@
 add_subdirectory(CodeView)
 add_subdirectory(DWARF)
+add_subdirectory(MSF)
 add_subdirectory(PDB)
diff --git a/unittests/DebugInfo/MSF/CMakeLists.txt b/unittests/DebugInfo/MSF/CMakeLists.txt
new file mode 100644 (file)
index 0000000..3f5acc2
--- /dev/null
@@ -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)
similarity index 99%
rename from unittests/DebugInfo/PDB/MSFBuilderTest.cpp
rename to unittests/DebugInfo/MSF/MSFBuilderTest.cpp
index 23a15d14f756bf63881ca1d59ff755cc7f16bd0d..4791c982fd86d174600c75a669a6409a1e501074 100644 (file)
@@ -38,7 +38,7 @@ protected:
 
   BumpPtrAllocator Allocator;
 };
-}
+} // namespace
 
 TEST_F(MSFBuilderTest, ValidateSuperBlockAccept) {
   // Test that a known good super block passes validation.
similarity index 99%
rename from unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
rename to unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp
index 59c8c4b714c111989c32c8a8bc43ea8fe0cebc6f..94cd347d09a62c61cca4b98970264c05cefe9661 100644 (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};
index 583b065f464c40466e8f30fcf3d14431e624f8e3..e2db58ff93754e558be71e112777b848b9af8a20 100644 (file)
@@ -6,9 +6,7 @@ set(LLVM_LINK_COMPONENTS
 
 set(DebugInfoPDBSources
   HashTableTest.cpp
-  MappedBlockStreamTest.cpp
   StringTableBuilderTest.cpp
-  MSFBuilderTest.cpp
   PDBApiTest.cpp
   )