• Home
  • Raw
  • Download

Lines Matching refs:db

83 size_t CountPackages(const MountedApexDatabase& db) {  in CountPackages()  argument
85 db.ForallMountedApexes([&ret](const std::string& a ATTRIBUTE_UNUSED, in CountPackages()
91 bool Contains(const MountedApexDatabase& db, const std::string& package, in Contains() argument
95 db.ForallMountedApexes([&](const std::string& p, const MountedApexData& d, in Contains()
105 bool ContainsPackage(const MountedApexDatabase& db, const std::string& package, in ContainsPackage() argument
109 db.ForallMountedApexes( in ContainsPackage()
126 MountedApexDatabase db; in TEST() local
127 ASSERT_EQ(CountPackages(db), 0u); in TEST()
129 db.AddMountedApex(kPackage, false, kLoopName, kPath, kMountPoint, in TEST()
132 Contains(db, kPackage, kLoopName, kPath, kMountPoint, kDeviceName)); in TEST()
133 ASSERT_TRUE(ContainsPackage(db, kPackage, kLoopName, kPath, kMountPoint, in TEST()
136 db.RemoveMountedApex(kPackage, kPath); in TEST()
138 Contains(db, kPackage, kLoopName, kPath, kMountPoint, kDeviceName)); in TEST()
139 EXPECT_FALSE(ContainsPackage(db, kPackage, kLoopName, kPath, kMountPoint, in TEST()
151 MountedApexDatabase db; in TEST() local
152 ASSERT_EQ(CountPackages(db), 0u); in TEST()
155 db.AddMountedApex(kPackage[i], false, kLoopName[i], kPath[i], in TEST()
159 ASSERT_EQ(CountPackages(db), 4u); in TEST()
161 ASSERT_TRUE(Contains(db, kPackage[i], kLoopName[i], kPath[i], in TEST()
163 ASSERT_TRUE(ContainsPackage(db, kPackage[i], kLoopName[i], kPath[i], in TEST()
167 db.RemoveMountedApex(kPackage[0], kPath[0]); in TEST()
168 EXPECT_FALSE(Contains(db, kPackage[0], kLoopName[0], kPath[0], kMountPoint[0], in TEST()
170 EXPECT_FALSE(ContainsPackage(db, kPackage[0], kLoopName[0], kPath[0], in TEST()
172 EXPECT_TRUE(Contains(db, kPackage[1], kLoopName[1], kPath[1], kMountPoint[1], in TEST()
174 EXPECT_TRUE(ContainsPackage(db, kPackage[1], kLoopName[1], kPath[1], in TEST()
176 EXPECT_TRUE(Contains(db, kPackage[2], kLoopName[2], kPath[2], kMountPoint[2], in TEST()
178 EXPECT_TRUE(ContainsPackage(db, kPackage[2], kLoopName[2], kPath[2], in TEST()
180 EXPECT_TRUE(Contains(db, kPackage[3], kLoopName[3], kPath[3], kMountPoint[3], in TEST()
182 EXPECT_TRUE(ContainsPackage(db, kPackage[3], kLoopName[3], kPath[3], in TEST()
194 MountedApexDatabase db; in TEST()
195 db.AddMountedApex("package", false, "loop", "path", "mount", "dm"); in TEST()
196 db.AddMountedApex("package2", false, "loop", "path2", "mount2", "dm2"); in TEST()
204 MountedApexDatabase db; in TEST()
205 db.AddMountedApex("package", false, "loop", "path", "mount", "dm"); in TEST()
206 db.AddMountedApex("package2", false, "loop2", "path2", "mount2", "dm"); in TEST()