blob: b36eede0ccddb8d64c76e6cf00aae64313c8c220 [file] [log] [blame]
Stephen Hines6f757552013-03-04 19:51:03 -08001//===- 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 Hines37b74a32014-11-26 18:48:20 -080013#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 Hines6f757552013-03-04 19:51:03 -080020
21namespace mcld {
Stephen Hines37b74a32014-11-26 18:48:20 -080022template <>
23class ELFReader<64, true>;
24} // namespace for mcld
Stephen Hines6f757552013-03-04 19:51:03 -080025
Stephen Hines37b74a32014-11-26 18:48:20 -080026namespace mcldtest {
Stephen Hines6f757552013-03-04 19:51:03 -080027
Stephen Hines37b74a32014-11-26 18:48:20 -080028class ELFReaderTest : public ::testing::Test {
29 public:
Stephen Hines6f757552013-03-04 19:51:03 -080030 // 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 Hines37b74a32014-11-26 18:48:20 -080042 protected:
Stephen Hinesf7ac0f12013-05-03 19:09:24 -070043 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 Hines6f757552013-03-04 19:51:03 -080052};
53
Stephen Hines37b74a32014-11-26 18:48:20 -080054} // namespace of mcldtest
Stephen Hines6f757552013-03-04 19:51:03 -080055
56#endif