aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/unpackaged/installed_repository_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/unpackaged/installed_repository_TEST.cc')
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc204
1 files changed, 102 insertions, 102 deletions
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index 1efb700..3c44058 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010 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
@@ -104,9 +104,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo1")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo1"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root")
)));
env.package_database()->add_repository(1, repo);
@@ -127,9 +127,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo1")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo1"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root")
)));
env.package_database()->add_repository(1, repo);
@@ -181,9 +181,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo1")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo1"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root")
)));
env.package_database()->add_repository(1, repo);
@@ -211,9 +211,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo1")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo1"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root")
)));
env.package_database()->add_repository(1, repo);
@@ -246,9 +246,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo2")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root2"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo2"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root2")
)));
env.package_database()->add_repository(1, repo);
@@ -265,11 +265,11 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::All())]->begin());
UninstallAction action(make_named_values<UninstallActionOptions>(
- value_for<n::config_protect>(""),
- value_for<n::if_for_install_id>(make_null_shared_ptr()),
- value_for<n::ignore_for_unmerge>(&ignore_nothing),
- value_for<n::is_overwrite>(false),
- value_for<n::make_output_manager>(&make_standard_output_manager)
+ n::config_protect() = "",
+ n::if_for_install_id() = make_null_shared_ptr(),
+ n::ignore_for_unmerge() = &ignore_nothing,
+ n::is_overwrite() = false,
+ n::make_output_manager() = &make_standard_output_manager
));
id->perform_action(action);
@@ -302,9 +302,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo3")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root3"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo3"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root3")
)));
env.package_database()->add_repository(1, repo);
@@ -320,11 +320,11 @@ namespace test_cases
&env, UserPackageDepSpecOptions()), MatchPackageOptions()))]->begin());
UninstallAction action(make_named_values<UninstallActionOptions>(
- value_for<n::config_protect>(""),
- value_for<n::if_for_install_id>(make_null_shared_ptr()),
- value_for<n::ignore_for_unmerge>(&ignore_nothing),
- value_for<n::is_overwrite>(false),
- value_for<n::make_output_manager>(&make_standard_output_manager)
+ n::config_protect() = "",
+ n::if_for_install_id() = make_null_shared_ptr(),
+ n::ignore_for_unmerge() = &ignore_nothing,
+ n::is_overwrite() = false,
+ n::make_output_manager() = &make_standard_output_manager
));
id->perform_action(action);
@@ -357,9 +357,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo4"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root4")
)));
env.package_database()->add_repository(1, repo);
@@ -376,25 +376,25 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo4"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root4")
)));
env.package_database()->add_repository(0, repo);
std::tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
- value_for<n::build_dependencies>(""),
- value_for<n::description>(""),
- value_for<n::environment>(&env),
- value_for<n::install_under>(FSEntry("/")),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/src4a")),
- value_for<n::name>(QualifiedPackageName("cat/pkg4a")),
- value_for<n::rewrite_ids_over_to_root>(-1),
- value_for<n::run_dependencies>(""),
- value_for<n::slot>(SlotName("foo")),
- value_for<n::version>(VersionSpec("1.0", VersionSpecOptions()))
+ n::build_dependencies() = "",
+ n::description() = "",
+ n::environment() = &env,
+ n::install_under() = FSEntry("/"),
+ n::location() = FSEntry("installed_repository_TEST_dir/src4a"),
+ n::name() = QualifiedPackageName("cat/pkg4a"),
+ n::rewrite_ids_over_to_root() = -1,
+ n::run_dependencies() = "",
+ n::slot() = SlotName("foo"),
+ n::version() = VersionSpec("1.0", VersionSpecOptions())
)));
env.package_database()->add_repository(1, source_repo);
@@ -407,11 +407,11 @@ namespace test_cases
TEST_CHECK(! FSEntry("installed_repository_TEST_dir/root4/dir").exists());
InstallAction action(make_named_values<InstallActionOptions>(
- value_for<n::destination>(repo),
- value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
- value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::want_phase>(&want_all_phases)
+ n::destination() = repo,
+ n::make_output_manager() = &make_standard_output_manager,
+ n::perform_uninstall() = &cannot_uninstall,
+ n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::want_phase() = &want_all_phases
));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
@@ -434,25 +434,25 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo4"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root4")
)));
env.package_database()->add_repository(0, repo);
std::tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
- value_for<n::build_dependencies>(""),
- value_for<n::description>(""),
- value_for<n::environment>(&env),
- value_for<n::install_under>(FSEntry("/")),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/src4b1")),
- value_for<n::name>(QualifiedPackageName("cat/pkg4b")),
- value_for<n::rewrite_ids_over_to_root>(-1),
- value_for<n::run_dependencies>(""),
- value_for<n::slot>(SlotName("foo")),
- value_for<n::version>(VersionSpec("1.0", VersionSpecOptions()))
+ n::build_dependencies() = "",
+ n::description() = "",
+ n::environment() = &env,
+ n::install_under() = FSEntry("/"),
+ n::location() = FSEntry("installed_repository_TEST_dir/src4b1"),
+ n::name() = QualifiedPackageName("cat/pkg4b"),
+ n::rewrite_ids_over_to_root() = -1,
+ n::run_dependencies() = "",
+ n::slot() = SlotName("foo"),
+ n::version() = VersionSpec("1.0", VersionSpecOptions())
)));
env.package_database()->add_repository(1, source_repo);
@@ -464,11 +464,11 @@ namespace test_cases
}
InstallAction action(make_named_values<InstallActionOptions>(
- value_for<n::destination>(repo),
- value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
- value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::want_phase>(&want_all_phases)
+ n::destination() = repo,
+ n::make_output_manager() = &make_standard_output_manager,
+ n::perform_uninstall() = &cannot_uninstall,
+ n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::want_phase() = &want_all_phases
));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
@@ -494,25 +494,25 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo4"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root4")
)));
env.package_database()->add_repository(0, repo);
std::tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
make_named_values<unpackaged_repositories::UnpackagedRepositoryParams>(
- value_for<n::build_dependencies>(""),
- value_for<n::description>(""),
- value_for<n::environment>(&env),
- value_for<n::install_under>(FSEntry("/")),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/src4b2")),
- value_for<n::name>(QualifiedPackageName("cat/pkg4b")),
- value_for<n::rewrite_ids_over_to_root>(-1),
- value_for<n::run_dependencies>(""),
- value_for<n::slot>(SlotName("foo")),
- value_for<n::version>(VersionSpec("1.0", VersionSpecOptions()))
+ n::build_dependencies() = "",
+ n::description() = "",
+ n::environment() = &env,
+ n::install_under() = FSEntry("/"),
+ n::location() = FSEntry("installed_repository_TEST_dir/src4b2"),
+ n::name() = QualifiedPackageName("cat/pkg4b"),
+ n::rewrite_ids_over_to_root() = -1,
+ n::run_dependencies() = "",
+ n::slot() = SlotName("foo"),
+ n::version() = VersionSpec("1.0", VersionSpecOptions())
)));
env.package_database()->add_repository(1, source_repo);
@@ -524,11 +524,11 @@ namespace test_cases
}
InstallAction action(make_named_values<InstallActionOptions>(
- value_for<n::destination>(repo),
- value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
- value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::want_phase>(&want_all_phases)
+ n::destination() = repo,
+ n::make_output_manager() = &make_standard_output_manager,
+ n::perform_uninstall() = &cannot_uninstall,
+ n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::want_phase() = &want_all_phases
));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
@@ -554,9 +554,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo4"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root4")
)));
env.package_database()->add_repository(0, repo);
@@ -568,11 +568,11 @@ namespace test_cases
}
UninstallAction action(make_named_values<UninstallActionOptions>(
- value_for<n::config_protect>(""),
- value_for<n::if_for_install_id>(make_null_shared_ptr()),
- value_for<n::ignore_for_unmerge>(&ignore_nothing),
- value_for<n::is_overwrite>(false),
- value_for<n::make_output_manager>(&make_standard_output_manager)
+ n::config_protect() = "",
+ n::if_for_install_id() = make_null_shared_ptr(),
+ n::ignore_for_unmerge() = &ignore_nothing,
+ n::is_overwrite() = false,
+ n::make_output_manager() = &make_standard_output_manager
));
(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/pkg4a",
@@ -600,9 +600,9 @@ namespace test_cases
std::tr1::shared_ptr<Repository> repo(new InstalledUnpackagedRepository(
RepositoryName("installed-unpackaged"),
make_named_values<unpackaged_repositories::InstalledUnpackagedRepositoryParams>(
- value_for<n::environment>(&env),
- value_for<n::location>(FSEntry("installed_repository_TEST_dir/repo4")),
- value_for<n::root>(FSEntry("installed_repository_TEST_dir/root4"))
+ n::environment() = &env,
+ n::location() = FSEntry("installed_repository_TEST_dir/repo4"),
+ n::root() = FSEntry("installed_repository_TEST_dir/root4")
)));
env.package_database()->add_repository(0, repo);
@@ -614,11 +614,11 @@ namespace test_cases
}
UninstallAction action(make_named_values<UninstallActionOptions>(
- value_for<n::config_protect>(""),
- value_for<n::if_for_install_id>(make_null_shared_ptr()),
- value_for<n::ignore_for_unmerge>(&ignore_nothing),
- value_for<n::is_overwrite>(false),
- value_for<n::make_output_manager>(&make_standard_output_manager)
+ n::config_protect() = "",
+ n::if_for_install_id() = make_null_shared_ptr(),
+ n::ignore_for_unmerge() = &ignore_nothing,
+ n::is_overwrite() = false,
+ n::make_output_manager() = &make_standard_output_manager
));
(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/pkg4b",