Shih-wei Liao | 5460a1f | 2012-03-16 22:41:16 -0700 | [diff] [blame] | 1 | //===- UniqueGCFactoryBaseTest.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 UNIQUE_GCFACTORYBASE_TEST_H |
| 10 | #define UNIQUE_GCFACTORYBASE_TEST_H |
| 11 | |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 12 | #include "mcld/Support/UniqueGCFactory.h" |
| 13 | #include "mcld/LinkerConfig.h" |
| 14 | #include "mcld/LD/DiagnosticPrinter.h" |
Shih-wei Liao | 5460a1f | 2012-03-16 22:41:16 -0700 | [diff] [blame] | 15 | #include <gtest.h> |
| 16 | |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 17 | namespace mcldtest { |
Shih-wei Liao | 5460a1f | 2012-03-16 22:41:16 -0700 | [diff] [blame] | 18 | |
| 19 | /** \class UniqueGCFactoryBaseTest |
| 20 | * - check the unique of key. |
| 21 | * - make sure the key associates with the same storage of value. |
| 22 | * - check if all functions in the GCFactoryBase are available. |
| 23 | */ |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 24 | class UniqueGCFactoryBaseTest : public ::testing::Test { |
| 25 | public: |
Shih-wei Liao | 22add6f | 2012-12-15 17:21:00 -0800 | [diff] [blame] | 26 | // Constructor can do set-up work for all test here. |
| 27 | UniqueGCFactoryBaseTest(); |
Shih-wei Liao | 5460a1f | 2012-03-16 22:41:16 -0700 | [diff] [blame] | 28 | |
Shih-wei Liao | 22add6f | 2012-12-15 17:21:00 -0800 | [diff] [blame] | 29 | // Destructor can do clean-up work that doesn't throw exceptions here. |
| 30 | virtual ~UniqueGCFactoryBaseTest(); |
Shih-wei Liao | 5460a1f | 2012-03-16 22:41:16 -0700 | [diff] [blame] | 31 | |
Shih-wei Liao | 22add6f | 2012-12-15 17:21:00 -0800 | [diff] [blame] | 32 | // SetUp() will be called immediately before each test. |
| 33 | virtual void SetUp(); |
Shih-wei Liao | 5460a1f | 2012-03-16 22:41:16 -0700 | [diff] [blame] | 34 | |
Shih-wei Liao | 22add6f | 2012-12-15 17:21:00 -0800 | [diff] [blame] | 35 | // TearDown() will be called immediately after each test. |
| 36 | virtual void TearDown(); |
Zonr Chang | affc150 | 2012-07-16 14:28:23 +0800 | [diff] [blame] | 37 | |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 38 | private: |
Shih-wei Liao | 22add6f | 2012-12-15 17:21:00 -0800 | [diff] [blame] | 39 | mcld::LinkerConfig* m_pConfig; |
Shih-wei Liao | 5460a1f | 2012-03-16 22:41:16 -0700 | [diff] [blame] | 40 | }; |
| 41 | |
Stephen Hines | 37b74a3 | 2014-11-26 18:48:20 -0800 | [diff] [blame] | 42 | } // namespace of mcldtest |
Shih-wei Liao | 5460a1f | 2012-03-16 22:41:16 -0700 | [diff] [blame] | 43 | |
| 44 | #endif |