aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_repository_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/e_repository_TEST.cc')
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc78
1 files changed, 0 insertions, 78 deletions
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 24eef92f8..b1c81d50b 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -640,84 +640,6 @@ TEST(ERepository, ProfileMasks)
}
}
-TEST(ERepository, Virtuals)
-{
- TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
- keys->insert("format", "e");
- keys->insert("names_cache", "/var/empty");
- keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "repo15"));
- keys->insert("profiles", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "repo15/profiles/profile"));
- keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
- std::shared_ptr<ERepository> repo(std::static_pointer_cast<ERepository>(ERepository::repository_factory_create(&env,
- std::bind(from_keys, keys, std::placeholders::_1))));
- env.add_repository(1, repo);
-
- bool has_one(false), has_two(false);
- int count(0);
-
- std::shared_ptr<const RepositoryVirtualsInterface::VirtualsSequence> seq(repo->virtual_packages());
- for (RepositoryVirtualsInterface::VirtualsSequence::ConstIterator it(seq->begin()),
- it_end(seq->end()); it_end != it; ++it, ++count)
- if ("virtual/one" == stringify(it->virtual_name()))
- {
- has_one = true;
- EXPECT_EQ("cat-one/pkg-one", stringify(*it->provided_by_spec()));
- }
- else
- {
- EXPECT_EQ("virtual/two", stringify(it->virtual_name()));
- has_two = true;
- EXPECT_EQ("cat-two/pkg-two", stringify(*it->provided_by_spec()));
- }
-
- EXPECT_TRUE(has_one);
- EXPECT_TRUE(has_two);
- EXPECT_EQ(2, count);
-}
-
-TEST(ERepository, MoreVirtuals)
-{
- TestEnvironment env;
- std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>());
- keys->insert("format", "e");
- keys->insert("names_cache", "/var/empty");
- keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "repo15"));
- keys->insert("profiles", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "repo15/profiles/profile/subprofile"));
- keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_dir" / "build"));
- std::shared_ptr<ERepository> repo(std::static_pointer_cast<ERepository>(ERepository::repository_factory_create(&env,
- std::bind(from_keys, keys, std::placeholders::_1))));
- env.add_repository(1, repo);
-
- bool has_one(false), has_two(false), has_three(false);
- int count(0);
-
- std::shared_ptr<const RepositoryVirtualsInterface::VirtualsSequence> seq(repo->virtual_packages());
- for (RepositoryVirtualsInterface::VirtualsSequence::ConstIterator it(seq->begin()),
- it_end(seq->end()); it_end != it; ++it, ++count)
- if ("virtual/one" == stringify(it->virtual_name()))
- {
- has_one = true;
- EXPECT_EQ("cat-two/pkg-two", stringify(*it->provided_by_spec()));
- }
- else if ("virtual/two" == stringify(it->virtual_name()))
- {
- has_two = true;
- EXPECT_EQ("cat-one/pkg-one", stringify(*it->provided_by_spec()));
- }
- else
- {
- EXPECT_EQ("virtual/three", stringify(it->virtual_name()));
- has_three = true;
- EXPECT_EQ("cat-three/pkg-three", stringify(*it->provided_by_spec()));
- }
-
- EXPECT_TRUE(has_one);
- EXPECT_TRUE(has_two);
- EXPECT_TRUE(has_three);
- EXPECT_EQ(3, count);
-}
-
TEST(ERepository, Manifest)
{
TestEnvironment env;