ELFReaderTest.h revision 6f75755c9204b1d8817ae5a65a2f7e5af0ec3f70
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> 13#include <mcld/LinkerConfig.h> 14#include <mcld/LD/ELFReaderIf.h> 15#include <mcld/LD/ELFReader.h> 16#include <mcld/LD/ELFObjectReader.h> 17#include <mcld/Target/GNULDBackend.h> 18#include <mcld/MC/InputBuilder.h> 19 20namespace mcld { 21 class ELFReader<64, true>; 22} // namespace for mcld 23 24namespace mcldtest 25{ 26 27class ELFReaderTest : public ::testing::Test 28{ 29public: 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 42protected: 43 mcld::Input *m_pInput; 44 mcld::LinkerConfig *m_pConfig; 45 mcld::GNUInfo *m_pInfo; 46 mcld::GNULDBackend *m_pLDBackend; 47 mcld::ELFReaderIF *m_pELFReader; 48 mcld::Module *m_pModule; 49 mcld::IRBuilder *m_pIRBuilder; 50 mcld::ELFObjectReader *m_pELFObjReader; 51}; 52 53} // namespace of mcldtest 54 55#endif 56 57