Stephen Hines | 6f75755 | 2013-03-04 19:51:03 -0800 | [diff] [blame] | 1 | //===- ELFReaderTest.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 MCLD_ELFREADER_TEST_H |
| 10 | #define MCLD_ELFREADER_TEST_H |
| 11 | |
| 12 | #include <gtest.h> |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 13 | #include "mcld/LinkerConfig.h" |
| 14 | #include "mcld/LinkerScript.h" |
| 15 | #include "mcld/LD/ELFReaderIf.h" |
| 16 | #include "mcld/LD/ELFReader.h" |
| 17 | #include "mcld/LD/ELFObjectReader.h" |
| 18 | #include "mcld/Target/GNULDBackend.h" |
| 19 | #include "mcld/MC/InputBuilder.h" |
Stephen Hines | 6f75755 | 2013-03-04 19:51:03 -0800 | [diff] [blame] | 20 | |
| 21 | namespace mcld { |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 22 | template <> |
| 23 | class ELFReader<64, true>; |
| 24 | } // namespace for mcld |
Stephen Hines | 6f75755 | 2013-03-04 19:51:03 -0800 | [diff] [blame] | 25 | |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 26 | namespace mcldtest { |
Stephen Hines | 6f75755 | 2013-03-04 19:51:03 -0800 | [diff] [blame] | 27 | |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 28 | class ELFReaderTest : public ::testing::Test { |
| 29 | public: |
Stephen Hines | 6f75755 | 2013-03-04 19:51:03 -0800 | [diff] [blame] | 30 | // Constructor can do set-up work for all test here. |
| 31 | ELFReaderTest(); |
| 32 | |
| 33 | // Destructor can do clean-up work that doesn't throw exceptions here. |
| 34 | virtual ~ELFReaderTest(); |
| 35 | |
| 36 | // SetUp() will be called immediately before each test. |
| 37 | virtual void SetUp(); |
| 38 | |
| 39 | // TearDown() will be called immediately after each test. |
| 40 | virtual void TearDown(); |
| 41 | |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 42 | protected: |
Stephen Hines | f7ac0f1 | 2013-05-03 19:09:24 -0700 | [diff] [blame] | 43 | mcld::Input* m_pInput; |
| 44 | mcld::LinkerConfig* m_pConfig; |
| 45 | mcld::LinkerScript* m_pScript; |
| 46 | mcld::GNUInfo* m_pInfo; |
| 47 | mcld::GNULDBackend* m_pLDBackend; |
| 48 | mcld::ELFReaderIF* m_pELFReader; |
| 49 | mcld::Module* m_pModule; |
| 50 | mcld::IRBuilder* m_pIRBuilder; |
| 51 | mcld::ELFObjectReader* m_pELFObjReader; |
Stephen Hines | 6f75755 | 2013-03-04 19:51:03 -0800 | [diff] [blame] | 52 | }; |
| 53 | |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 54 | } // namespace of mcldtest |
Stephen Hines | 6f75755 | 2013-03-04 19:51:03 -0800 | [diff] [blame] | 55 | |
| 56 | #endif |