1 //===- InputTreeTest.h ----------------------------------------------------===// 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 #ifndef UNITTESTS_INPUTTREE_TEST_H 10 #define UNITTESTS_INPUTTREE_TEST_H 11 12 #include <gtest.h> 13 #include <mcld/MC/ContextFactory.h> 14 #include <mcld/Support/MemoryAreaFactory.h> 15 16 namespace mcld { 17 18 class InputTree; 19 class InputFactory; 20 class InputBuilder; 21 class LinkerConfig; 22 23 namespace test { 24 25 /** \class InputTreeTest 26 * \brief 27 * 28 * \see InputTree 29 */ 30 class InputTreeTest : public ::testing::Test 31 { 32 public: 33 // Constructor can do set-up work for all test here. 34 InputTreeTest(); 35 36 // Destructor can do clean-up work that doesn't throw exceptions here. 37 virtual ~InputTreeTest(); 38 39 // SetUp() will be called immediately before each test. 40 virtual void SetUp(); 41 42 // TearDown() will be called immediately after each test. 43 virtual void TearDown(); 44 45 protected: 46 mcld::LinkerConfig* m_pConfig; 47 48 mcld::InputFactory* m_pAlloc; 49 mcld::InputBuilder* m_pBuilder; 50 mcld::MemoryAreaFactory m_MemFactory; 51 mcld::ContextFactory m_ContextFactory; 52 53 mcld::InputTree* m_pTestee; 54 }; 55 56 } // namespace of test 57 } // namespace of mcld 58 59 #endif 60 61