Home | History | Annotate | Download | only in unittests
      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/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"
     20 
     21 namespace mcld {
     22 template <>
     23 class ELFReader<64, true>;
     24 }  // namespace for mcld
     25 
     26 namespace mcldtest {
     27 
     28 class ELFReaderTest : public ::testing::Test {
     29  public:
     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 
     42  protected:
     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;
     52 };
     53 
     54 }  // namespace of mcldtest
     55 
     56 #endif
     57