aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/thread_TEST.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-20 13:26:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-20 16:20:41 +0000
commit03cf08854d9c1afcf5ad004e32d73411555237a3 (patch)
tree1397d3fe626c948f3e0446113506c3b723851194 /paludis/util/thread_TEST.cc
parentf8beb74bec8aab4eb0202872f91eddf0f38b8802 (diff)
downloadpaludis-03cf08854d9c1afcf5ad004e32d73411555237a3.tar.gz
paludis-03cf08854d9c1afcf5ad004e32d73411555237a3.tar.xz
gtest more
Diffstat (limited to 'paludis/util/thread_TEST.cc')
-rw-r--r--paludis/util/thread_TEST.cc26
1 files changed, 9 insertions, 17 deletions
diff --git a/paludis/util/thread_TEST.cc b/paludis/util/thread_TEST.cc
index 355e5ac4a..daf233655 100644
--- a/paludis/util/thread_TEST.cc
+++ b/paludis/util/thread_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 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
@@ -18,11 +18,11 @@
*/
#include <paludis/util/thread.hh>
-#include <test/test_runner.hh>
-#include <test/test_framework.hh>
+
#include <time.h>
-using namespace test;
+#include <gtest/gtest.h>
+
using namespace paludis;
namespace
@@ -33,20 +33,12 @@ namespace
}
}
-namespace test_cases
+TEST(Thread, Works)
{
- struct ThreadTest : TestCase
+ bool x(false);
{
- ThreadTest() : TestCase("thread") { }
-
- void run()
- {
- bool x(false);
- {
- Thread t(std::bind(&make_true, std::ref(x)));
- }
- TEST_CHECK(x);
- }
- } test_thread;
+ Thread t(std::bind(&make_true, std::ref(x)));
+ }
+ EXPECT_TRUE(x);
}