diff options
author | Stephen Hines <srhines@google.com> | 2014-04-24 14:41:24 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-04-24 15:22:31 -0700 |
commit | 551ae4ebd3e9d137ea668fb83ae4a55b8cfba451 (patch) | |
tree | c4ea60679a6fe2630e21bf6d46177b2c4fcab33b /unittests | |
parent | 334c6f83c1265eabd58ac7c8b860898038831eab (diff) | |
download | mclinker-551ae4ebd3e9d137ea668fb83ae4a55b8cfba451.tar.gz |
Update MCLinker for LLVM 3.5.
Change-Id: Ib07513d0eb2f8b7d3516a7dd8823f98820943cc9
Diffstat (limited to 'unittests')
27 files changed, 67 insertions, 67 deletions
diff --git a/unittests/BinTreeTest.h b/unittests/BinTreeTest.h index 3e8fab4..7f4a7f7 100644 --- a/unittests/BinTreeTest.h +++ b/unittests/BinTreeTest.h @@ -25,7 +25,7 @@ namespace mcldtest /** \class BinTreeTest * \brief Make sure the interface of BinTree , such as insert , traversal , etc.. * - * \see BinTree + * \see BinTree */ class BinTreeTest : public ::testing::Test { diff --git a/unittests/DirIteratorTest.h b/unittests/DirIteratorTest.h index 1f6e616..ea6aaf7 100644 --- a/unittests/DirIteratorTest.h +++ b/unittests/DirIteratorTest.h @@ -24,9 +24,9 @@ namespace mcldtest { /** \class DirIteratorTest - * \brief + * \brief * - * \see DirIterator + * \see DirIterator */ class DirIteratorTest : public ::testing::Test { diff --git a/unittests/FactoriesTest.h b/unittests/FactoriesTest.h index ee7badf..484b801 100644 --- a/unittests/FactoriesTest.h +++ b/unittests/FactoriesTest.h @@ -18,7 +18,7 @@ namespace mcldtest /** \class FactoriesTest * \brief Test cases for factories - NodeFactory and MCLDFileFactory. * - * \see Factories + * \see Factories */ class FactoriesTest : public ::testing::Test { diff --git a/unittests/FileHandleTest.h b/unittests/FileHandleTest.h index 88e2653..45d4ab1 100644 --- a/unittests/FileHandleTest.h +++ b/unittests/FileHandleTest.h @@ -21,9 +21,9 @@ namespace mcldtest { /** \class FileHandleTest - * \brief + * \brief * - * \see FileHandle + * \see FileHandle */ class FileHandleTest : public ::testing::Test { diff --git a/unittests/FragmentRefTest.h b/unittests/FragmentRefTest.h index 340bd77..17de587 100644 --- a/unittests/FragmentRefTest.h +++ b/unittests/FragmentRefTest.h @@ -24,7 +24,7 @@ namespace mcldtest /** \class FragmentRefTest * \brief Reference Test * - * \see FragmentRef + * \see FragmentRef */ class FragmentRefTest : public ::testing::Test { diff --git a/unittests/FragmentTest.cpp b/unittests/FragmentTest.cpp index 43f51b6..273c98d 100644 --- a/unittests/FragmentTest.cpp +++ b/unittests/FragmentTest.cpp @@ -38,7 +38,7 @@ void FragmentTest::TearDown() //===----------------------------------------------------------------------===// // Testcases - + TEST_F( FragmentTest, Fragment_constructor ) { LDSection* test = LDSection::Create("test", LDFileFormat::Null, 0, 0); SectionData* s = SectionData::Create(*test); @@ -58,7 +58,7 @@ TEST_F( FragmentTest, Fragment_trivial_function ) { LDSection* test = LDSection::Create("test", LDFileFormat::Null, 0, 0); SectionData* s = SectionData::Create(*test); Fragment* f = new Fragment(Fragment::Alignment, s); - + EXPECT_TRUE(Fragment::Alignment == f->getKind()); f->setOffset(5566); @@ -66,7 +66,7 @@ TEST_F( FragmentTest, Fragment_trivial_function ) { //always return true EXPECT_TRUE(f->classof(new Fragment(Fragment::Region, s)) ); - + LDSection::Destroy(test); // SectionData::Destroy(s); } diff --git a/unittests/FragmentTest.h b/unittests/FragmentTest.h index 84ac7b7..8c1489c 100644 --- a/unittests/FragmentTest.h +++ b/unittests/FragmentTest.h @@ -23,7 +23,7 @@ namespace mcldtest /** \class FragmentTest * \brief Unit test for mcld::Fragment. * - * \see Fragment + * \see Fragment */ class FragmentTest : public ::testing::Test { diff --git a/unittests/GraphTest.cpp b/unittests/GraphTest.cpp index 38fc0d4..0c97567 100644 --- a/unittests/GraphTest.cpp +++ b/unittests/GraphTest.cpp @@ -237,7 +237,7 @@ TEST_F(GraphTest, list_digraph_add_n_erase_arcs_1) ListDigraph::Arc* a3 = graph.addArc(*u3, *u1); graph.erase(*a2); - + ASSERT_TRUE(u1 == a1->source && u2 == a1->target); ASSERT_TRUE(u3 == a3->source && u1 == a3->target); @@ -265,7 +265,7 @@ TEST_F(GraphTest, list_digraph_add_n_erase_arcs_2) ListDigraph::Arc* a3 = graph.addArc(*u3, *u1); graph.erase(*a1); - + ASSERT_TRUE(u2 == a2->source && u3 == a2->target); ASSERT_TRUE(u3 == a3->source && u1 == a3->target); @@ -292,7 +292,7 @@ TEST_F(GraphTest, list_digraph_add_n_erase_arcs_3) ListDigraph::Arc* a3 = graph.addArc(*u3, *u1); graph.erase(*a3); - + ASSERT_TRUE(u1 == a1->source && u2 == a1->target); ASSERT_TRUE(u2 == a2->source && u3 == a2->target); diff --git a/unittests/HashTableTest.h b/unittests/HashTableTest.h index 4bf2c50..c07c991 100644 --- a/unittests/HashTableTest.h +++ b/unittests/HashTableTest.h @@ -18,7 +18,7 @@ namespace mcldtest /** \class HashTableTest * \brief Testcase for HashTable * - * \see HashTable + * \see HashTable */ class HashTableTest : public ::testing::Test { diff --git a/unittests/InputTreeTest.cpp b/unittests/InputTreeTest.cpp index 1b1e061..6af81d8 100644 --- a/unittests/InputTreeTest.cpp +++ b/unittests/InputTreeTest.cpp @@ -31,7 +31,7 @@ InputTreeTest::InputTreeTest() m_pAlloc = new mcld::InputFactory(10, *m_pConfig); m_pBuilder = new mcld::InputBuilder(*m_pConfig, *m_pAlloc, - m_ContextFactory, + m_ContextFactory, m_MemFactory, false); m_pTestee = new mcld::InputTree(); @@ -74,7 +74,7 @@ TEST_F( InputTreeTest, Basic_operation ) { (*action)->activate(*m_pBuilder); delete *action; } - + InputTree::iterator node = m_pTestee->root(); InputTree::const_iterator const_node = node; --node; @@ -104,13 +104,13 @@ TEST_F( InputTreeTest, Basic_operation ) { TEST_F( InputTreeTest, forLoop_TEST ) { InputTree::iterator node = m_pTestee->root(); - + Input* input = m_pAlloc->produce("FileSpec", "path1"); m_pTestee->insert<InputTree::Inclusive>(node, *input); InputTree::const_iterator const_node = node; --node; - for(int i=0 ; i<100 ; ++i) + for(int i=0 ; i<100 ; ++i) { Input* input = m_pAlloc->produce("FileSpec", "path1"); m_pTestee->insert<InputTree::Inclusive>(node, *input); @@ -129,9 +129,9 @@ TEST_F( InputTreeTest, forLoop_TEST ) { } TEST_F( InputTreeTest, Nesting_Case ) { - InputTree::iterator node = m_pTestee->root(); + InputTree::iterator node = m_pTestee->root(); - for(int i=0 ; i<50 ; ++i) + for(int i=0 ; i<50 ; ++i) { m_pTestee->enterGroup(node, InputTree::Downward); --node; @@ -140,7 +140,7 @@ TEST_F( InputTreeTest, Nesting_Case ) { m_pTestee->insert(node, InputTree::Afterward, *input); ++node; } - + ASSERT_FALSE(node.isRoot()); ASSERT_FALSE(isGroup(node)); ASSERT_FALSE(m_pAlloc->empty()); @@ -150,8 +150,8 @@ TEST_F( InputTreeTest, Nesting_Case ) { TEST_F( InputTreeTest, DFSIterator_BasicTraversal) { - - InputTree::iterator node = m_pTestee->root(); + + InputTree::iterator node = m_pTestee->root(); Input* input = m_pAlloc->produce("111", "/"); m_pTestee->insert<InputTree::Inclusive>(node, *input); node.move<InputTree::Inclusive>(); @@ -166,8 +166,8 @@ TEST_F( InputTreeTest, DFSIterator_BasicTraversal) input = m_pAlloc->produce("8", "/"); m_pTestee->insert<InputTree::Positional>(node, *input); - InputTree::dfs_iterator dfs_it = m_pTestee->dfs_begin(); - InputTree::dfs_iterator dfs_end = m_pTestee->dfs_end(); + InputTree::dfs_iterator dfs_it = m_pTestee->dfs_begin(); + InputTree::dfs_iterator dfs_end = m_pTestee->dfs_end(); ASSERT_STREQ("111", (*dfs_it)->name().c_str()); ++dfs_it; ASSERT_STREQ("7", (**dfs_it).name().c_str()); diff --git a/unittests/InputTreeTest.h b/unittests/InputTreeTest.h index c0f59a7..31be6fd 100644 --- a/unittests/InputTreeTest.h +++ b/unittests/InputTreeTest.h @@ -23,9 +23,9 @@ class LinkerConfig; namespace test { /** \class InputTreeTest - * \brief + * \brief * - * \see InputTree + * \see InputTree */ class InputTreeTest : public ::testing::Test { diff --git a/unittests/LinearAllocatorTest.h b/unittests/LinearAllocatorTest.h index a6be2b7..24b8715 100644 --- a/unittests/LinearAllocatorTest.h +++ b/unittests/LinearAllocatorTest.h @@ -18,7 +18,7 @@ namespace mcldtest /** \class LinearAllocatorTest * \brief The testcase for LinearAllocator * - * \see LinearAllocator + * \see LinearAllocator */ class LinearAllocatorTest : public ::testing::Test { diff --git a/unittests/LinkerTest.cpp b/unittests/LinkerTest.cpp index 479bbb9..f9d3224 100644 --- a/unittests/LinkerTest.cpp +++ b/unittests/LinkerTest.cpp @@ -430,7 +430,7 @@ TEST_F( LinkerTest, plasma_object) { builder.AddSymbol(*input, "Output/gotplt.bc", ResolveInfo::File, ResolveInfo::Define, ResolveInfo::Local, 0); - /// 2: 00000000 0 SECTION LOCAL DEFAULT 1 + /// 2: 00000000 0 SECTION LOCAL DEFAULT 1 builder.AddSymbol(*input, ".text", ResolveInfo::Section, ResolveInfo::Define, ResolveInfo::Local, 0, 0x0, text); @@ -438,11 +438,11 @@ TEST_F( LinkerTest, plasma_object) { builder.AddSymbol(*input, ".data", ResolveInfo::Section, ResolveInfo::Define, ResolveInfo::Local, 0, 0x0, data); - /// 4: 00000000 0 SECTION LOCAL DEFAULT 4 + /// 4: 00000000 0 SECTION LOCAL DEFAULT 4 builder.AddSymbol(*input, ".bss", ResolveInfo::Section, ResolveInfo::Define, ResolveInfo::Local, 0, 0x0, bss); - /// 5: 00000000 0 SECTION LOCAL DEFAULT 5 + /// 5: 00000000 0 SECTION LOCAL DEFAULT 5 builder.AddSymbol(*input, ".ARM.attributes", ResolveInfo::Section, ResolveInfo::Define, ResolveInfo::Local, 0, 0x0, attr); diff --git a/unittests/MCRegionFragmentTest.h b/unittests/MCRegionFragmentTest.h index 15434fd..3d1dab8 100644 --- a/unittests/MCRegionFragmentTest.h +++ b/unittests/MCRegionFragmentTest.h @@ -24,7 +24,7 @@ namespace mcldtest /** \class MCRegionFragmentTest * \brief The testcase of MCRegionFragment. * - * \see MCRegionFragment + * \see MCRegionFragment */ class MCRegionFragmentTest : public ::testing::Test { diff --git a/unittests/NamePoolTest.h b/unittests/NamePoolTest.h index 12103e0..2e4a494 100644 --- a/unittests/NamePoolTest.h +++ b/unittests/NamePoolTest.h @@ -21,9 +21,9 @@ namespace mcldtest { /** \class NamePoolTest - * \brief + * \brief * - * \see NamePool + * \see NamePool */ class NamePoolTest : public ::testing::Test { diff --git a/unittests/PathSetTest.h b/unittests/PathSetTest.h index d64b2a8..23a2dbf 100644 --- a/unittests/PathSetTest.h +++ b/unittests/PathSetTest.h @@ -23,7 +23,7 @@ namespace mcldtest /** \class PathSetTest * \brief The testcase of PathSet * - * \see PathSet + * \see PathSet */ class PathSetTest : public ::testing::Test { diff --git a/unittests/PathTest.h b/unittests/PathTest.h index 968ce0e..417a07f 100644 --- a/unittests/PathTest.h +++ b/unittests/PathTest.h @@ -18,7 +18,7 @@ namespace mcldtest /** \class PathTest * \brief a testcase for mcld::Path and its non-member funtions. * - * \see Path + * \see Path */ class PathTest : public ::testing::Test { diff --git a/unittests/RTLinearAllocatorTest.h b/unittests/RTLinearAllocatorTest.h index d58442a..3ba0cd9 100644 --- a/unittests/RTLinearAllocatorTest.h +++ b/unittests/RTLinearAllocatorTest.h @@ -16,9 +16,9 @@ namespace mcldtest { /** \class RTLinearAllocatorTest - * \brief + * \brief * - * \see RTLinearAllocator + * \see RTLinearAllocator */ class RTLinearAllocatorTest : public ::testing::Test { diff --git a/unittests/SectionDataTest.cpp b/unittests/SectionDataTest.cpp index dfabc15..6a7e366 100644 --- a/unittests/SectionDataTest.cpp +++ b/unittests/SectionDataTest.cpp @@ -39,14 +39,14 @@ void SectionDataTest::TearDown() //===----------------------------------------------------------------------===// // Testcases //===----------------------------------------------------------------------===// - + TEST_F( SectionDataTest, constructor_and_trivial_func ) { LDSection* test = LDSection::Create("test", LDFileFormat::Null, 0, 0); - + SectionData* s = SectionData::Create(*test); EXPECT_TRUE(s->getSection().name() == "test" && \ s->getSection().kind() == LDFileFormat::Null); - + LDSection::Destroy(test); } diff --git a/unittests/StaticResolverTest.cpp b/unittests/StaticResolverTest.cpp index eb3accc..a474cdd 100644 --- a/unittests/StaticResolverTest.cpp +++ b/unittests/StaticResolverTest.cpp @@ -67,7 +67,7 @@ TEST_F( StaticResolverTest, MDEF ) { TEST_F( StaticResolverTest, DynDefAfterDynUndef ) { ResolveInfo* old_sym = ResolveInfo::Create("abc"); ResolveInfo* new_sym = ResolveInfo::Create("abc"); - + new_sym->setBinding(ResolveInfo::Global); old_sym->setBinding(ResolveInfo::Global); new_sym->setDesc(ResolveInfo::Undefined); @@ -94,7 +94,7 @@ TEST_F( StaticResolverTest, DynDefAfterDynUndef ) { TEST_F( StaticResolverTest, DynDefAfterDynDef ) { ResolveInfo* old_sym = ResolveInfo::Create("abc"); ResolveInfo* new_sym = ResolveInfo::Create("abc"); - + new_sym->setBinding(ResolveInfo::Global); old_sym->setBinding(ResolveInfo::Global); new_sym->setDesc(ResolveInfo::Define); @@ -121,7 +121,7 @@ TEST_F( StaticResolverTest, DynDefAfterDynDef ) { TEST_F( StaticResolverTest, DynUndefAfterDynUndef ) { ResolveInfo* old_sym = ResolveInfo::Create("abc"); ResolveInfo* new_sym = ResolveInfo::Create("abc"); - + new_sym->setBinding(ResolveInfo::Global); old_sym->setBinding(ResolveInfo::Global); new_sym->setDesc(ResolveInfo::Undefined); @@ -149,7 +149,7 @@ TEST_F( StaticResolverTest, OverrideWeakByGlobal ) { ResolveInfo* old_sym = ResolveInfo::Create("abc"); ResolveInfo* new_sym = ResolveInfo::Create("abc"); - + new_sym->setBinding(ResolveInfo::Global); old_sym->setBinding(ResolveInfo::Weak); new_sym->setSize(0); @@ -170,7 +170,7 @@ TEST_F( StaticResolverTest, OverrideWeakByGlobal ) TEST_F( StaticResolverTest, DynWeakAfterDynDef ) { ResolveInfo* old_sym = ResolveInfo::Create("abc"); ResolveInfo* new_sym = ResolveInfo::Create("abc"); - + old_sym->setBinding(ResolveInfo::Weak); new_sym->setBinding(ResolveInfo::Global); @@ -200,7 +200,7 @@ TEST_F( StaticResolverTest, MarkByBiggerCommon ) { ResolveInfo* old_sym = ResolveInfo::Create("abc"); ResolveInfo* new_sym = ResolveInfo::Create("abc"); - + new_sym->setDesc(ResolveInfo::Common); old_sym->setDesc(ResolveInfo::Common); new_sym->setSize(999); @@ -222,7 +222,7 @@ TEST_F( StaticResolverTest, OverrideByBiggerCommon ) { ResolveInfo* old_sym = ResolveInfo::Create("abc"); ResolveInfo* new_sym = ResolveInfo::Create("abc"); - + new_sym->setDesc(ResolveInfo::Common); old_sym->setDesc(ResolveInfo::Common); old_sym->setBinding(ResolveInfo::Weak); @@ -247,7 +247,7 @@ TEST_F( StaticResolverTest, OverrideCommonByDefine) { ResolveInfo* old_sym = ResolveInfo::Create("abc"); ResolveInfo* new_sym = ResolveInfo::Create("abc"); - + old_sym->setDesc(ResolveInfo::Common); old_sym->setSize(0); @@ -270,7 +270,7 @@ TEST_F( StaticResolverTest, OverrideCommonByDefine) TEST_F( StaticResolverTest, SetUpDesc) { ResolveInfo* sym = ResolveInfo::Create("abc"); - + sym->setIsSymbol(true); // ASSERT_FALSE( sym->isSymbol() ); @@ -370,7 +370,7 @@ TEST_F( StaticResolverTest, SetUpDesc) TEST_F( StaticResolverTest, SetUpBinding) { ResolveInfo* sym = ResolveInfo::Create("abc"); - + sym->setIsSymbol(true); // ASSERT_FALSE( sym->isSymbol() ); diff --git a/unittests/StaticResolverTest.h b/unittests/StaticResolverTest.h index 89157f0..c6f0699 100644 --- a/unittests/StaticResolverTest.h +++ b/unittests/StaticResolverTest.h @@ -26,7 +26,7 @@ namespace mcldtest /** \class StaticResolverTest * \brief The testcases for static resolver * - * \see StaticResolver + * \see StaticResolver */ class StaticResolverTest : public ::testing::Test { diff --git a/unittests/StringTableTest.h b/unittests/StringTableTest.h index 0b397e8..60d7f00 100644 --- a/unittests/StringTableTest.h +++ b/unittests/StringTableTest.h @@ -21,9 +21,9 @@ namespace mcldtest { /** \class StringTableTest - * \brief + * \brief * - * \see StringTable + * \see StringTable */ class StringTableTest : public ::testing::Test { diff --git a/unittests/SymbolCategoryTest.h b/unittests/SymbolCategoryTest.h index ff5f1a6..a7109ed 100644 --- a/unittests/SymbolCategoryTest.h +++ b/unittests/SymbolCategoryTest.h @@ -23,7 +23,7 @@ namespace mcldtest /** \class SymbolCategoryTest * \brief The testcases of symbol category. * - * \see SymbolCategory + * \see SymbolCategory */ class SymbolCategoryTest : public ::testing::Test { diff --git a/unittests/SymbolTableTest.h b/unittests/SymbolTableTest.h index 9076ac9..39e8751 100644 --- a/unittests/SymbolTableTest.h +++ b/unittests/SymbolTableTest.h @@ -21,9 +21,9 @@ namespace mcldtest { /** \class SymbolTableTest - * \brief + * \brief * - * \see SymbolTable + * \see SymbolTable */ class SymbolTableTest : public ::testing::Test { diff --git a/unittests/TargetMachineTest.h b/unittests/TargetMachineTest.h index 3f77da7..88a44dc 100644 --- a/unittests/TargetMachineTest.h +++ b/unittests/TargetMachineTest.h @@ -15,9 +15,9 @@ namespace mcldTEST { /** \class TargetMachineTest - * \brief + * \brief * - * \see TargetMachine + * \see TargetMachine */ class TargetMachineTest : public ::testing::Test { diff --git a/unittests/UniqueGCFactoryBaseTest.cpp b/unittests/UniqueGCFactoryBaseTest.cpp index 45a2aca..a6f7289 100644 --- a/unittests/UniqueGCFactoryBaseTest.cpp +++ b/unittests/UniqueGCFactoryBaseTest.cpp @@ -42,7 +42,7 @@ void UniqueGCFactoryBaseTest::TearDown() // Testcases // TEST_F( UniqueGCFactoryBaseTest, number_constructor ) { - ContextFactory *contextFactory = new ContextFactory(10); + ContextFactory *contextFactory = new ContextFactory(10); contextFactory->produce("/"); contextFactory->produce("ab/c"); ASSERT_TRUE( 2 == contextFactory->size()); @@ -50,7 +50,7 @@ TEST_F( UniqueGCFactoryBaseTest, number_constructor ) { } TEST_F( UniqueGCFactoryBaseTest, unique_produce ) { - ContextFactory *contextFactory = new ContextFactory(10); + ContextFactory *contextFactory = new ContextFactory(10); LDContext* context1 = contextFactory->produce("/"); contextFactory->produce("ab/c"); ASSERT_TRUE( 2 == contextFactory->size()); @@ -60,7 +60,7 @@ TEST_F( UniqueGCFactoryBaseTest, unique_produce ) { } TEST_F( UniqueGCFactoryBaseTest, unique_produce2 ) { - ContextFactory *contextFactory = new ContextFactory(10); + ContextFactory *contextFactory = new ContextFactory(10); LDContext* context1 = contextFactory->produce("abc/def"); contextFactory->produce("ab/c"); ASSERT_TRUE( 2 == contextFactory->size()); @@ -72,7 +72,7 @@ TEST_F( UniqueGCFactoryBaseTest, unique_produce2 ) { TEST_F( UniqueGCFactoryBaseTest, iterator ) { sys::fs::Path path1(TOPDIR), path2(TOPDIR); - path1.append("unittests/test1.txt"); + path1.append("unittests/test.txt"); path2.append("unittests/test2.txt"); MemoryAreaFactory* memFactory = new MemoryAreaFactory(10); @@ -81,7 +81,7 @@ TEST_F( UniqueGCFactoryBaseTest, iterator ) ASSERT_NE( area1, area2); MemoryArea* area3 = memFactory->produce(path1, FileHandle::ReadOnly); - + ASSERT_EQ(area1, area3); ASSERT_FALSE( memFactory->empty()); ASSERT_TRUE( 2 == memFactory->size()); diff --git a/unittests/test3.txt b/unittests/test3.txt index 2689bfd..0b4a379 100644 --- a/unittests/test3.txt +++ b/unittests/test3.txt @@ -5,12 +5,12 @@ HELLOopyright (C@@1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |