1//===- FactoriesTest.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 FACTORIES_TEST_H
10#define FACTORIES_TEST_H
11#include <gtest.h>
12#include "mcld/ADT/TreeAllocator.h"
13#include "mcld/MC/MCLDFile.h"
14
15namespace mcldtest {
16
17/** \class FactoriesTest
18 *  \brief Test cases for factories - NodeFactory and MCLDFileFactory.
19 *
20 *  \see Factories
21 */
22class FactoriesTest : public ::testing::Test {
23 public:
24  // Constructor can do set-up work for all test here.
25  FactoriesTest();
26
27  // Destructor can do clean-up work that doesn't throw exceptions here.
28  virtual ~FactoriesTest();
29
30  // SetUp() will be called immediately before each test.
31  virtual void SetUp();
32
33  // TearDown() will be called immediately after each test.
34  virtual void TearDown();
35
36 protected:
37  typedef mcld::NodeFactory<int> NodeAlloc;
38  typedef mcld::MCLDFileFactory FileAlloc;
39
40 protected:
41  NodeAlloc* m_pNodeAlloc;
42  FileAlloc* m_pFileAlloc;
43};
44
45}  // namespace of mcldtest
46
47#endif
48