blob: dc522d822f4834f661336fe04c5d307385749fdc [file] [log] [blame]
Shih-wei Liao5460a1f2012-03-16 22:41:16 -07001//===- InputTreeTest.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//===----------------------------------------------------------------------===//
Shih-wei Liao22add6f2012-12-15 17:21:00 -08009#ifndef UNITTESTS_INPUTTREE_TEST_H
10#define UNITTESTS_INPUTTREE_TEST_H
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070011
12#include <gtest.h>
Stephen Hines37b74a32014-11-26 18:48:20 -080013#include "mcld/MC/ContextFactory.h"
14#include "mcld/Support/MemoryAreaFactory.h"
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070015
Shih-wei Liao22add6f2012-12-15 17:21:00 -080016namespace mcld {
17
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070018class InputTree;
19class InputFactory;
Shih-wei Liao22add6f2012-12-15 17:21:00 -080020class InputBuilder;
21class LinkerConfig;
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070022
Shih-wei Liao22add6f2012-12-15 17:21:00 -080023namespace test {
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070024
25/** \class InputTreeTest
Stephen Hines551ae4e2014-04-24 14:41:24 -070026 * \brief
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070027 *
Stephen Hines551ae4e2014-04-24 14:41:24 -070028 * \see InputTree
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070029 */
Stephen Hines37b74a32014-11-26 18:48:20 -080030class InputTreeTest : public ::testing::Test {
31 public:
Shih-wei Liao22add6f2012-12-15 17:21:00 -080032 // Constructor can do set-up work for all test here.
33 InputTreeTest();
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070034
Shih-wei Liao22add6f2012-12-15 17:21:00 -080035 // Destructor can do clean-up work that doesn't throw exceptions here.
36 virtual ~InputTreeTest();
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070037
Shih-wei Liao22add6f2012-12-15 17:21:00 -080038 // SetUp() will be called immediately before each test.
39 virtual void SetUp();
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070040
Shih-wei Liao22add6f2012-12-15 17:21:00 -080041 // TearDown() will be called immediately after each test.
42 virtual void TearDown();
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070043
Stephen Hines37b74a32014-11-26 18:48:20 -080044 protected:
Shih-wei Liao22add6f2012-12-15 17:21:00 -080045 mcld::LinkerConfig* m_pConfig;
46
47 mcld::InputFactory* m_pAlloc;
48 mcld::InputBuilder* m_pBuilder;
49 mcld::MemoryAreaFactory m_MemFactory;
50 mcld::ContextFactory m_ContextFactory;
51
52 mcld::InputTree* m_pTestee;
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070053};
54
Stephen Hines37b74a32014-11-26 18:48:20 -080055} // namespace of test
56} // namespace of mcld
Shih-wei Liao5460a1f2012-03-16 22:41:16 -070057
58#endif