aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments/no_config/no_config_environment_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/environments/no_config/no_config_environment_TEST.cc')
-rw-r--r--paludis/environments/no_config/no_config_environment_TEST.cc48
1 files changed, 20 insertions, 28 deletions
diff --git a/paludis/environments/no_config/no_config_environment_TEST.cc b/paludis/environments/no_config/no_config_environment_TEST.cc
index b0a09db07..0da71bafa 100644
--- a/paludis/environments/no_config/no_config_environment_TEST.cc
+++ b/paludis/environments/no_config/no_config_environment_TEST.cc
@@ -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
@@ -17,38 +17,30 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "no_config_environment.hh"
-#include <test/test_runner.hh>
-#include <test/test_framework.hh>
+#include <paludis/environments/no_config/no_config_environment.hh>
+
#include <paludis/util/sequence.hh>
#include <paludis/util/make_named_values.hh>
-using namespace test;
+#include <gtest/gtest.h>
+
using namespace paludis;
-namespace test_cases
+TEST(NoConfigEnvironment, Construction)
{
- struct NoConfigEnvironmentTest : TestCase
- {
- NoConfigEnvironmentTest() : TestCase("no config environment") { }
-
- void run()
- {
- NoConfigEnvironment e(make_named_values<no_config_environment::Params>(
- n::accept_unstable() = false,
- n::disable_metadata_cache() = false,
- n::extra_accept_keywords() = "",
- n::extra_params() = std::shared_ptr<Map<std::string, std::string> >(),
- n::extra_repository_dirs() = std::make_shared<FSPathSequence>(),
- n::master_repository_name() = "",
- n::profiles_if_not_auto() = "",
- n::repository_dir() = FSPath("no_config_environment_TEST_dir/repo"),
- n::repository_type() = no_config_environment::ncer_auto,
- n::write_cache() = FSPath("/var/empty")
- ));
-
- TEST_CHECK(bool(e.package_database()));
- }
- } test_no_config_environment;
+ NoConfigEnvironment e(make_named_values<no_config_environment::Params>(
+ n::accept_unstable() = false,
+ n::disable_metadata_cache() = false,
+ n::extra_accept_keywords() = "",
+ n::extra_params() = std::shared_ptr<Map<std::string, std::string> >(),
+ n::extra_repository_dirs() = std::make_shared<FSPathSequence>(),
+ n::master_repository_name() = "",
+ n::profiles_if_not_auto() = "",
+ n::repository_dir() = FSPath("no_config_environment_TEST_dir/repo"),
+ n::repository_type() = no_config_environment::ncer_auto,
+ n::write_cache() = FSPath("/var/empty")
+ ));
+
+ EXPECT_TRUE(bool(e.package_database()));
}