• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
16 // Constructor can do set-up work for all test here.
SymbolTableTest()17 SymbolTableTest::SymbolTableTest()
18 {
19   // create testee. modify it if need
20   m_pTestee = new SymbolTable<>(m_StrTable);
21 }
22 
23 // Destructor can do clean-up work that doesn't throw exceptions here.
~SymbolTableTest()24 SymbolTableTest::~SymbolTableTest()
25 {
26   delete m_pTestee;
27 }
28 
29 // SetUp() will be called immediately before each test.
SetUp()30 void SymbolTableTest::SetUp()
31 {
32 }
33 
34 // TearDown() will be called immediately after each test.
TearDown()35 void SymbolTableTest::TearDown()
36 {
37 }
38 
39 //==========================================================================//
40 // Testcases
TEST_F(SymbolTableTest,init)41 TEST_F(SymbolTableTest, init) {
42   mcld::SymbolTable<>::iterator it;
43   it = m_pTestee->begin();
44   ASSERT_EQ(it, m_pTestee->end());
45 }
46