aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-09 10:23:12 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-09 10:23:12 +0000
commit7a2c9e974666881f44406c88189ae546a67ff0b7 (patch)
treef6846da02bf779a262f58e5042f3fa1bbf7415d3 /test
parent7f7c79fcc67df4fae498ca943e36592d3f7a3ad2 (diff)
downloadpaludis-7a2c9e974666881f44406c88189ae546a67ff0b7.tar.gz
paludis-7a2c9e974666881f44406c88189ae546a67ff0b7.tar.xz
Rework Pimp to avoid ImpPtr ickiness
Fixes: ticket:1070
Diffstat (limited to 'test')
-rw-r--r--test/test_framework.cc6
-rw-r--r--test/test_framework.hh14
2 files changed, 12 insertions, 8 deletions
diff --git a/test/test_framework.cc b/test/test_framework.cc
index 0f3264bb7..a6c6ae0ca 100644
--- a/test/test_framework.cc
+++ b/test/test_framework.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -111,7 +111,7 @@ TestMessageSuffix::suffixes()
}
TestMessageSuffix::TestMessageSuffix(const std::string & s, bool write) :
- paludis::Pimp<TestMessageSuffix>()
+ _imp()
{
paludis::Imp<TestMessageSuffix>::suffixes.push_back(s);
if (write)
@@ -144,7 +144,7 @@ namespace paludis
}
TestCase::TestCase(const std::string & our_name) :
- paludis::Pimp<TestCase>(our_name)
+ _imp(our_name)
{
TestCaseList::register_test_case(this);
}
diff --git a/test/test_framework.hh b/test/test_framework.hh
index 18890dc20..14569c1bb 100644
--- a/test/test_framework.hh
+++ b/test/test_framework.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -37,9 +37,11 @@ namespace test
*
* \ingroup grptestframework
*/
- class TestMessageSuffix :
- paludis::Pimp<TestMessageSuffix>
+ class TestMessageSuffix
{
+ private:
+ paludis::Pimp<TestMessageSuffix> _imp;
+
public:
/**
* Constructor.
@@ -62,9 +64,11 @@ namespace test
*
* \ingroup grptestframework
*/
- class TestCase :
- private paludis::Pimp<TestCase>
+ class TestCase
{
+ private:
+ paludis::Pimp<TestCase> _imp;
+
protected:
/**
* Check that a given assertion is true.