1 //===- SymbolTableTest.cpp ------------------------------------------------===// 2 // 3 // The MCLinker Project 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 #include "mcld/LD/SymbolTable.h" 10 #include "SymbolTableTest.h" 11 12 using namespace mcld; 13 using namespace mcldtest; 14 15 // Constructor can do set-up work for all test here. SymbolTableTest()16SymbolTableTest::SymbolTableTest() { 17 // create testee. modify it if need 18 m_pTestee = new SymbolTable<>(m_StrTable); 19 } 20 21 // Destructor can do clean-up work that doesn't throw exceptions here. ~SymbolTableTest()22SymbolTableTest::~SymbolTableTest() { 23 delete m_pTestee; 24 } 25 26 // SetUp() will be called immediately before each test. SetUp()27void SymbolTableTest::SetUp() { 28 } 29 30 // TearDown() will be called immediately after each test. TearDown()31void SymbolTableTest::TearDown() { 32 } 33 34 //==========================================================================// 35 // Testcases TEST_F(SymbolTableTest,init)36TEST_F(SymbolTableTest, init) { 37 mcld::SymbolTable<>::iterator it; 38 it = m_pTestee->begin(); 39 ASSERT_EQ(it, m_pTestee->end()); 40 } 41