1 //===- FactoriesTest.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 FACTORIES_TEST_H 10 #define FACTORIES_TEST_H 11 #include <gtest.h> 12 #include "mcld/ADT/TreeAllocator.h" 13 #include "mcld/MC/MCLDFile.h" 14 15 namespace mcldtest 16 { 17 18 /** \class FactoriesTest 19 * \brief Test cases for factories - NodeFactory and MCLDFileFactory. 20 * 21 * \see Factories 22 */ 23 class FactoriesTest : public ::testing::Test 24 { 25 public: 26 // Constructor can do set-up work for all test here. 27 FactoriesTest(); 28 29 // Destructor can do clean-up work that doesn't throw exceptions here. 30 virtual ~FactoriesTest(); 31 32 // SetUp() will be called immediately before each test. 33 virtual void SetUp(); 34 35 // TearDown() will be called immediately after each test. 36 virtual void TearDown(); 37 38 protected: 39 typedef mcld::NodeFactory<int> NodeAlloc; 40 typedef mcld::MCLDFileFactory FileAlloc; 41 protected: 42 NodeAlloc* m_pNodeAlloc; 43 FileAlloc *m_pFileAlloc; 44 }; 45 46 } // namespace of mcldtest 47 48 #endif 49 50