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   class ELFReader<64, true>;
     23 } // namespace for mcld
     24 
     25 namespace mcldtest
     26 {
     27 
     28 class ELFReaderTest : public ::testing::Test
     29 {
     30 public:
     31   // Constructor can do set-up work for all test here.
     32   ELFReaderTest();
     33 
     34   // Destructor can do clean-up work that doesn't throw exceptions here.
     35   virtual ~ELFReaderTest();
     36 
     37   // SetUp() will be called immediately before each test.
     38   virtual void SetUp();
     39 
     40   // TearDown() will be called immediately after each test.
     41   virtual void TearDown();
     42 
     43 protected:
     44   mcld::Input* m_pInput;
     45   mcld::LinkerConfig* m_pConfig;
     46   mcld::LinkerScript* m_pScript;
     47   mcld::GNUInfo* m_pInfo;
     48   mcld::GNULDBackend* m_pLDBackend;
     49   mcld::ELFReaderIF* m_pELFReader;
     50   mcld::Module* m_pModule;
     51   mcld::IRBuilder* m_pIRBuilder;
     52   mcld::ELFObjectReader* m_pELFObjReader;
     53 };
     54 
     55 } // namespace of mcldtest
     56 
     57 #endif
     58 
     59