aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-20 16:45:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-20 16:45:26 +0000
commitc7f24ea9d1f387ea28b6f69b3daab22217e2673f (patch)
tree466d1f07582820e0d0699f35d39ac8ef975f65b7
parent8af939d947bff1f900f8211b05bcf2eb459616de (diff)
downloadpaludis-c7f24ea9d1f387ea28b6f69b3daab22217e2673f.tar.gz
paludis-c7f24ea9d1f387ea28b6f69b3daab22217e2673f.tar.xz
gtest more
-rw-r--r--paludis/util/files.m42
-rw-r--r--paludis/util/mutex_TEST.cc25
2 files changed, 9 insertions, 18 deletions
diff --git a/paludis/util/files.m4 b/paludis/util/files.m4
index 4924f17..c890832 100644
--- a/paludis/util/files.m4
+++ b/paludis/util/files.m4
@@ -53,7 +53,7 @@ add(`make_shared_copy', `hh', `fwd')
add(`map', `hh', `fwd', `impl', `cc')
add(`member_iterator', `hh', `fwd', `impl', `test')
add(`md5', `hh', `cc', `test')
-add(`mutex', `hh', `cc', `fwd', `test')
+add(`mutex', `hh', `cc', `fwd', `gtest')
add(`named_value', `hh', `cc', `fwd')
add(`no_type', `hh')
add(`operators', `hh')
diff --git a/paludis/util/mutex_TEST.cc b/paludis/util/mutex_TEST.cc
index afd1e3c..1131ef3 100644
--- a/paludis/util/mutex_TEST.cc
+++ b/paludis/util/mutex_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007 Ciaran McCreesh
+ * Copyright (c) 2007, 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
@@ -17,25 +17,16 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "mutex.hh"
-#include <test/test_framework.hh>
-#include <test/test_runner.hh>
+#include <paludis/util/mutex.hh>
+
+#include <gtest/gtest.h>
using namespace paludis;
-using namespace test;
-namespace test_cases
+TEST(Mutex, Lock)
{
- struct LockTest : TestCase
- {
- LockTest() : TestCase("lock") { }
-
- void run()
- {
- Mutex m;
- Lock l(m);
- TEST_CHECK(true);
- }
- } test_lock;
+ Mutex m;
+ Lock l(m);
+ SUCCEED();
}