FactoriesTest.h revision 5460a1f25d9ddecb5c70667267d66d51af177a99
15460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao//===- FactoriesTest.h ----------------------------------------------------===//
25460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao//
35460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao//                     The MCLinker Project
45460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao//
55460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao// This file is distributed under the University of Illinois Open Source
65460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao// License. See LICENSE.TXT for details.
75460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao//
85460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao//===----------------------------------------------------------------------===//
95460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao#ifndef FACTORIES_TEST_H
105460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao#define FACTORIES_TEST_H
115460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao#include <gtest.h>
125460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao#include "mcld/ADT/TreeAllocator.h"
135460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao#include "mcld/MC/MCLDFile.h"
145460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
155460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liaonamespace mcldtest
165460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao{
175460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
185460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao/** \class FactoriesTest
195460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao *  \brief Test cases for factories - NodeFactory and MCLDFileFactory.
205460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao *
215460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao *  \see Factories
225460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao */
235460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liaoclass FactoriesTest : public ::testing::Test
245460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao{
255460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liaopublic:
265460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	// Constructor can do set-up work for all test here.
275460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	FactoriesTest();
285460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
295460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	// Destructor can do clean-up work that doesn't throw exceptions here.
305460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	virtual ~FactoriesTest();
315460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
325460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	// SetUp() will be called immediately before each test.
335460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	virtual void SetUp();
345460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
355460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	// TearDown() will be called immediately after each test.
365460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	virtual void TearDown();
375460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
385460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liaoprotected:
395460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	typedef mcld::NodeFactory<int> NodeAlloc;
405460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	typedef mcld::MCLDFileFactory FileAlloc;
415460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liaoprotected:
425460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	NodeAlloc* m_pNodeAlloc;
435460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao	FileAlloc *m_pFileAlloc;
445460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao};
455460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
465460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao} // namespace of mcldtest
475460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
485460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao#endif
495460a1f25d9ddecb5c70667267d66d51af177a99Shih-wei Liao
50