diff options
author | Zachary Turner <zturner@google.com> | 2016-07-29 18:38:47 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-07-29 18:38:47 +0000 |
commit | 334aec4dd2de892d081d1aaa0ac54864da43dd58 (patch) | |
tree | 3846e17b7b6fa26c5f6d461a69d701f6afb1829a /llvm/unittests/DebugInfo/PDB/MsfBuilderTest.cpp | |
parent | 1e4426e786451e1972be014c3b974eb961391af7 (diff) | |
download | bcm5719-llvm-334aec4dd2de892d081d1aaa0ac54864da43dd58.tar.gz bcm5719-llvm-334aec4dd2de892d081d1aaa0ac54864da43dd58.zip |
Revert "[msf] Rename Msf to MSF."
This reverts commit 4d1557ffac41e079bcb1abbcf04f512474dcd6fe.
llvm-svn: 277194
Diffstat (limited to 'llvm/unittests/DebugInfo/PDB/MsfBuilderTest.cpp')
-rw-r--r-- | llvm/unittests/DebugInfo/PDB/MsfBuilderTest.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/llvm/unittests/DebugInfo/PDB/MsfBuilderTest.cpp b/llvm/unittests/DebugInfo/PDB/MsfBuilderTest.cpp index 04bd9410306..2f4e9aaa96e 100644 --- a/llvm/unittests/DebugInfo/PDB/MsfBuilderTest.cpp +++ b/llvm/unittests/DebugInfo/PDB/MsfBuilderTest.cpp @@ -1,4 +1,4 @@ -//===- MSFBuilderTest.cpp Tests manipulation of MSF stream metadata ------===// +//===- MsfBuilderTest.cpp Tests manipulation of MSF stream metadata ------===// // // The LLVM Compiler Infrastructure // @@ -9,8 +9,8 @@ #include "ErrorChecking.h" -#include "llvm/DebugInfo/MSF/MSFBuilder.h" -#include "llvm/DebugInfo/MSF/MSFCommon.h" +#include "llvm/DebugInfo/Msf/MsfBuilder.h" +#include "llvm/DebugInfo/Msf/MsfCommon.h" #include "gtest/gtest.h" @@ -18,7 +18,7 @@ using namespace llvm; using namespace llvm::msf; namespace { -class MSFBuilderTest : public testing::Test { +class MsfBuilderTest : public testing::Test { protected: void initializeSimpleSuperBlock(msf::SuperBlock &SB) { initializeSuperBlock(SB); @@ -40,7 +40,7 @@ protected: }; } -TEST_F(MSFBuilderTest, ValidateSuperBlockAccept) { +TEST_F(MsfBuilderTest, ValidateSuperBlockAccept) { // Test that a known good super block passes validation. SuperBlock SB; initializeSuperBlock(SB); @@ -48,7 +48,7 @@ TEST_F(MSFBuilderTest, ValidateSuperBlockAccept) { EXPECT_NO_ERROR(msf::validateSuperBlock(SB)); } -TEST_F(MSFBuilderTest, ValidateSuperBlockReject) { +TEST_F(MsfBuilderTest, ValidateSuperBlockReject) { // Test that various known problems cause a super block to be rejected. SuperBlock SB; initializeSimpleSuperBlock(SB); @@ -75,7 +75,7 @@ TEST_F(MSFBuilderTest, ValidateSuperBlockReject) { EXPECT_ERROR(msf::validateSuperBlock(SB)); } -TEST_F(MSFBuilderTest, TestUsedBlocksMarkedAsUsed) { +TEST_F(MsfBuilderTest, TestUsedBlocksMarkedAsUsed) { // Test that when assigning a stream to a known list of blocks, the blocks // are correctly marked as used after adding, but no other incorrect blocks // are accidentally marked as used. @@ -84,7 +84,7 @@ TEST_F(MSFBuilderTest, TestUsedBlocksMarkedAsUsed) { // Allocate some extra blocks at the end so we can verify that they're free // after the initialization. uint32_t NumBlocks = msf::getMinimumBlockCount() + Blocks.size() + 10; - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096, NumBlocks); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096, NumBlocks); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -100,22 +100,22 @@ TEST_F(MSFBuilderTest, TestUsedBlocksMarkedAsUsed) { } } -TEST_F(MSFBuilderTest, TestAddStreamNoDirectoryBlockIncrease) { +TEST_F(MsfBuilderTest, TestAddStreamNoDirectoryBlockIncrease) { // Test that adding a new stream correctly updates the directory. This only // tests the case where the directory *DOES NOT* grow large enough that it // crosses a Block boundary. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; auto ExpectedL1 = Msf.build(); EXPECT_EXPECTED(ExpectedL1); - MSFLayout &L1 = *ExpectedL1; + MsfLayout &L1 = *ExpectedL1; auto OldDirBlocks = L1.DirectoryBlocks; EXPECT_EQ(1U, OldDirBlocks.size()); - auto ExpectedMsf2 = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf2 = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf2); auto &Msf2 = *ExpectedMsf2; @@ -127,18 +127,18 @@ TEST_F(MSFBuilderTest, TestAddStreamNoDirectoryBlockIncrease) { auto ExpectedL2 = Msf2.build(); EXPECT_EXPECTED(ExpectedL2); - MSFLayout &L2 = *ExpectedL2; + MsfLayout &L2 = *ExpectedL2; auto NewDirBlocks = L2.DirectoryBlocks; EXPECT_EQ(1U, NewDirBlocks.size()); } -TEST_F(MSFBuilderTest, TestAddStreamWithDirectoryBlockIncrease) { +TEST_F(MsfBuilderTest, TestAddStreamWithDirectoryBlockIncrease) { // Test that adding a new stream correctly updates the directory. This only // tests the case where the directory *DOES* grow large enough that it // crosses a Block boundary. This is because the newly added stream occupies // so many Blocks that need to be indexed in the directory that the directory // crosses a Block boundary. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -146,15 +146,15 @@ TEST_F(MSFBuilderTest, TestAddStreamWithDirectoryBlockIncrease) { auto ExpectedL1 = Msf.build(); EXPECT_EXPECTED(ExpectedL1); - MSFLayout &L1 = *ExpectedL1; + MsfLayout &L1 = *ExpectedL1; auto DirBlocks = L1.DirectoryBlocks; EXPECT_EQ(2U, DirBlocks.size()); } -TEST_F(MSFBuilderTest, TestGrowStreamNoBlockIncrease) { +TEST_F(MsfBuilderTest, TestGrowStreamNoBlockIncrease) { // Test growing an existing stream by a value that does not affect the number // of blocks it occupies. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -171,12 +171,12 @@ TEST_F(MSFBuilderTest, TestGrowStreamNoBlockIncrease) { EXPECT_EQ(OldStreamBlocks, NewStreamBlocks); } -TEST_F(MSFBuilderTest, TestGrowStreamWithBlockIncrease) { +TEST_F(MsfBuilderTest, TestGrowStreamWithBlockIncrease) { // Test that growing an existing stream to a value large enough that it causes // the need to allocate new Blocks to the stream correctly updates the // stream's // block list. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -194,10 +194,10 @@ TEST_F(MSFBuilderTest, TestGrowStreamWithBlockIncrease) { EXPECT_NE(NewStreamBlocks[0], NewStreamBlocks[1]); } -TEST_F(MSFBuilderTest, TestShrinkStreamNoBlockDecrease) { +TEST_F(MsfBuilderTest, TestShrinkStreamNoBlockDecrease) { // Test that shrinking an existing stream by a value that does not affect the // number of Blocks it occupies makes no changes to stream's block list. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -214,11 +214,11 @@ TEST_F(MSFBuilderTest, TestShrinkStreamNoBlockDecrease) { EXPECT_EQ(OldStreamBlocks, NewStreamBlocks); } -TEST_F(MSFBuilderTest, TestShrinkStreamWithBlockDecrease) { +TEST_F(MsfBuilderTest, TestShrinkStreamWithBlockDecrease) { // Test that shrinking an existing stream to a value large enough that it // causes the need to deallocate new Blocks to the stream correctly updates // the stream's block list. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -235,10 +235,10 @@ TEST_F(MSFBuilderTest, TestShrinkStreamWithBlockDecrease) { EXPECT_EQ(OldStreamBlocks[0], NewStreamBlocks[0]); } -TEST_F(MSFBuilderTest, TestRejectReusedStreamBlock) { +TEST_F(MsfBuilderTest, TestRejectReusedStreamBlock) { // Test that attempting to add a stream and assigning a block that is already // in use by another stream fails. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -248,10 +248,10 @@ TEST_F(MSFBuilderTest, TestRejectReusedStreamBlock) { EXPECT_ERROR(Msf.addStream(6144, Blocks)); } -TEST_F(MSFBuilderTest, TestBlockCountsWhenAddingStreams) { +TEST_F(MsfBuilderTest, TestBlockCountsWhenAddingStreams) { // Test that when adding multiple streams, the number of used and free Blocks // allocated to the MSF file are as expected. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -269,10 +269,10 @@ TEST_F(MSFBuilderTest, TestBlockCountsWhenAddingStreams) { } } -TEST_F(MSFBuilderTest, BuildMsfLayout) { - // Test that we can generate an MSFLayout structure from a valid layout +TEST_F(MsfBuilderTest, BuildMsfLayout) { + // Test that we can generate an Msf MsfLayout structure from a valid layout // specification. - auto ExpectedMsf = MSFBuilder::create(Allocator, 4096); + auto ExpectedMsf = MsfBuilder::create(Allocator, 4096); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -286,7 +286,7 @@ TEST_F(MSFBuilderTest, BuildMsfLayout) { auto ExpectedLayout = Msf.build(); EXPECT_EXPECTED(ExpectedLayout); - MSFLayout &L = *ExpectedLayout; + MsfLayout &L = *ExpectedLayout; EXPECT_EQ(4096U, L.SB->BlockSize); EXPECT_EQ(ExpectedNumBlocks, L.SB->NumBlocks); @@ -301,8 +301,8 @@ TEST_F(MSFBuilderTest, BuildMsfLayout) { } } -TEST_F(MSFBuilderTest, UseDirectoryBlockHint) { - Expected<MSFBuilder> ExpectedMsf = MSFBuilder::create( +TEST_F(MsfBuilderTest, UseDirectoryBlockHint) { + Expected<MsfBuilder> ExpectedMsf = MsfBuilder::create( Allocator, 4096, msf::getMinimumBlockCount() + 1, false); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -313,7 +313,7 @@ TEST_F(MSFBuilderTest, UseDirectoryBlockHint) { auto ExpectedLayout = Msf.build(); EXPECT_EXPECTED(ExpectedLayout); - MSFLayout &L = *ExpectedLayout; + MsfLayout &L = *ExpectedLayout; EXPECT_EQ(msf::getMinimumBlockCount() + 2, L.SB->NumBlocks); EXPECT_EQ(1U, L.DirectoryBlocks.size()); EXPECT_EQ(1U, L.StreamMap[0].size()); @@ -322,9 +322,9 @@ TEST_F(MSFBuilderTest, UseDirectoryBlockHint) { EXPECT_EQ(B + 2, L.StreamMap[0].front()); } -TEST_F(MSFBuilderTest, DirectoryBlockHintInsufficient) { - Expected<MSFBuilder> ExpectedMsf = - MSFBuilder::create(Allocator, 4096, msf::getMinimumBlockCount() + 2); +TEST_F(MsfBuilderTest, DirectoryBlockHintInsufficient) { + Expected<MsfBuilder> ExpectedMsf = + MsfBuilder::create(Allocator, 4096, msf::getMinimumBlockCount() + 2); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; uint32_t B = msf::getFirstUnreservedBlock(); @@ -335,14 +335,14 @@ TEST_F(MSFBuilderTest, DirectoryBlockHintInsufficient) { auto ExpectedLayout = Msf.build(); EXPECT_EXPECTED(ExpectedLayout); - MSFLayout &L = *ExpectedLayout; + MsfLayout &L = *ExpectedLayout; EXPECT_EQ(2U, L.DirectoryBlocks.size()); EXPECT_EQ(B + 1, L.DirectoryBlocks[0]); } -TEST_F(MSFBuilderTest, DirectoryBlockHintOverestimated) { - Expected<MSFBuilder> ExpectedMsf = - MSFBuilder::create(Allocator, 4096, msf::getMinimumBlockCount() + 2); +TEST_F(MsfBuilderTest, DirectoryBlockHintOverestimated) { + Expected<MsfBuilder> ExpectedMsf = + MsfBuilder::create(Allocator, 4096, msf::getMinimumBlockCount() + 2); EXPECT_EXPECTED(ExpectedMsf); auto &Msf = *ExpectedMsf; @@ -353,7 +353,7 @@ TEST_F(MSFBuilderTest, DirectoryBlockHintOverestimated) { auto ExpectedLayout = Msf.build(); EXPECT_EXPECTED(ExpectedLayout); - MSFLayout &L = *ExpectedLayout; + MsfLayout &L = *ExpectedLayout; EXPECT_EQ(1U, L.DirectoryBlocks.size()); EXPECT_EQ(B + 1, L.DirectoryBlocks[0]); } |