aboutsummaryrefslogtreecommitdiff
path: root/test/test_framework.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-30 22:20:54 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-30 22:20:54 +0000
commite77c92b13aeb4f362aaf999fa65ee2c2bd431181 (patch)
tree173963a9916c417f37872ee634cbbceee41931c7 /test/test_framework.hh
parentda9a5e3d71bd24ac2ec1a8b9c7d0424c2fe84031 (diff)
downloadpaludis-e77c92b13aeb4f362aaf999fa65ee2c2bd431181.tar.gz
paludis-e77c92b13aeb4f362aaf999fa65ee2c2bd431181.tar.xz
Remove some STL includes from the test framework headers
Diffstat (limited to 'test/test_framework.hh')
-rw-r--r--test/test_framework.hh33
1 files changed, 7 insertions, 26 deletions
diff --git a/test/test_framework.hh b/test/test_framework.hh
index 8576fb4b7..3f459c16a 100644
--- a/test/test_framework.hh
+++ b/test/test_framework.hh
@@ -20,10 +20,8 @@
#ifndef PALUDIS_GUARD_TEST_TEST_FRAMEWORK_HH
#define PALUDIS_GUARD_TEST_TEST_FRAMEWORK_HH 1
-#include <list>
-#include <memory>
#include <paludis/util/stringify.hh>
-#include <sstream>
+#include <paludis/util/private_implementation_pattern.hh>
#include <string>
/** \file
@@ -39,11 +37,9 @@ namespace test
*
* \ingroup Test
*/
- class TestMessageSuffix
+ class TestMessageSuffix :
+ paludis::PrivateImplementationPattern<TestMessageSuffix>
{
- private:
- static std::list<std::string> _suffixes;
-
public:
/**
* Constructor.
@@ -53,10 +49,7 @@ namespace test
/**
* Destructor.
*/
- ~TestMessageSuffix()
- {
- _suffixes.pop_back();
- }
+ ~TestMessageSuffix();
/**
* Our suffixes.
@@ -69,12 +62,9 @@ namespace test
*
* \ingroup Test
*/
- class TestCase
+ class TestCase :
+ private paludis::PrivateImplementationPattern<TestCase>
{
- private:
- struct Impl;
- std::auto_ptr<Impl> _impl;
-
protected:
/**
* Check that a given assertion is true.
@@ -176,20 +166,11 @@ namespace test
TestCaseList();
~TestCaseList();
- static std::list<TestCase *> & _get_test_case_list()
- {
- static std::list<TestCase *> l;
- return l;
- }
-
public:
/**
* Register a TestCase instance.
*/
- inline static void register_test_case(TestCase * const test_case)
- {
- _get_test_case_list().push_back(test_case);
- }
+ static void register_test_case(TestCase * const test_case);
/**
* Run all tests.