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