Lines Matching refs:vm
52 bool add(HalManifest &vm, ManifestHal &&hal) { in add()
53 return vm.add(std::move(hal)); in add()
75 const ManifestHal *getAnyHal(HalManifest &vm, const std::string &name) { in getAnyHal()
76 return vm.getAnyHal(name); in getAnyHal()
81 ConstMultiMapValueIterable<std::string, ManifestHal> getHals(HalManifest &vm) { in getHals()
82 return vm.getHals(); in getHals()
98 HalManifest vm; in testDeviceManifest() local
99 vm.mType = SchemaType::DEVICE; in testDeviceManifest()
100 vm.device.mSepolicyVersion = {25, 0}; in testDeviceManifest()
101 vm.add(ManifestHal{ in testDeviceManifest()
111 vm.add(ManifestHal{ in testDeviceManifest()
121 return vm; in testDeviceManifest()
124 HalManifest vm; in testFrameworkManfiest() local
125 vm.mType = SchemaType::FRAMEWORK; in testFrameworkManfiest()
126 vm.add(ManifestHal{ in testFrameworkManfiest()
141 vm.framework.mVndks = { std::move(vndk2505), std::move(vndk2513) }; in testFrameworkManfiest()
143 return vm; in testFrameworkManfiest()
168 HalManifest vm = testDeviceManifest(); in TEST_F() local
169 EXPECT_EQ(dump(vm), "hidl/android.hardware.camera/hwbinder/2.0:" in TEST_F()
183 HalManifest vm = testDeviceManifest(); in TEST_F() local
184 EXPECT_EQ(Transport::HWBINDER, vm.getTransport("android.hardware.camera", in TEST_F()
189 HalManifest vm = testDeviceManifest(); in TEST_F() local
190 std::string xml = gHalManifestConverter(vm); in TEST_F()
222 EXPECT_EQ(vm, vm2); in TEST_F()
226 HalManifest vm = testFrameworkManfiest(); in TEST_F() local
227 std::string xml = gHalManifestConverter(vm); in TEST_F()
253 EXPECT_EQ(vm, vm2); in TEST_F()
257 HalManifest vm; in TEST_F() local
258 EXPECT_TRUE(gHalManifestConverter(&vm, in TEST_F()
260 EXPECT_TRUE(gHalManifestConverter(&vm, in TEST_F()
268 EXPECT_FALSE(gHalManifestConverter(&vm, in TEST_F()
278 HalManifest vm; in TEST_F() local
279 EXPECT_FALSE(gHalManifestConverter(&vm, in TEST_F()
289 EXPECT_FALSE(gHalManifestConverter(&vm, in TEST_F()
306 HalManifest vm; in TEST_F() local
307 EXPECT_TRUE(gHalManifestConverter(&vm, in TEST_F()
329 vm.getTransport("android.hidl.manager", {2, 1}, "IServiceManager", "default")); in TEST_F()
331 vm.getTransport("android.hidl.manager", {2, 0}, "IServiceManager", "default")); in TEST_F()
333 vm.getTransport("android.hidl.manager", {2, 2}, "IServiceManager", "default")); in TEST_F()
335 vm.getTransport("android.hidl.manager", {1, 0}, "IServiceManager", "default")); in TEST_F()
339 HalManifest vm = testDeviceManifest(); in TEST_F() local
340 EXPECT_EQ(vm.getInstances("android.hardware.camera", "ICamera"), in TEST_F()
342 EXPECT_EQ(vm.getInstances("android.hardware.camera", "IBetterCamera"), in TEST_F()
344 EXPECT_EQ(vm.getInstances("android.hardware.camera", "INotExist"), in TEST_F()
346 EXPECT_EQ(vm.getInstances("android.hardware.nfc", "INfc"), in TEST_F()
349 EXPECT_TRUE(vm.hasInstance("android.hardware.camera", "ICamera", "default")); in TEST_F()
350 EXPECT_TRUE(vm.hasInstance("android.hardware.camera", "ICamera", "legacy/0")); in TEST_F()
351 EXPECT_TRUE(vm.hasInstance("android.hardware.camera", "IBetterCamera", "camera")); in TEST_F()
352 EXPECT_TRUE(vm.hasInstance("android.hardware.nfc", "INfc", "default")); in TEST_F()
354 EXPECT_FALSE(vm.hasInstance("android.hardware.camera", "INotExist", "default")); in TEST_F()
355 EXPECT_FALSE(vm.hasInstance("android.hardware.camera", "ICamera", "notexist")); in TEST_F()
356 EXPECT_FALSE(vm.hasInstance("android.hardware.camera", "IBetterCamera", "default")); in TEST_F()
357 EXPECT_FALSE(vm.hasInstance("android.hardware.camera", "INotExist", "notexist")); in TEST_F()
358 EXPECT_FALSE(vm.hasInstance("android.hardware.nfc", "INfc", "notexist")); in TEST_F()
600 HalManifest vm = testDeviceManifest(); in TEST_F() local
601 EXPECT_EQ(vm.getHalNames(), std::set<std::string>( in TEST_F()
606 HalManifest vm = testDeviceManifest(); in TEST_F() local
607 EXPECT_EQ(vm.getInterfaceNames("android.hardware.camera"), in TEST_F()
609 EXPECT_EQ(vm.getInterfaceNames("android.hardware.nfc"), in TEST_F()
614 HalManifest vm = testDeviceManifest(); in TEST_F() local
615 EXPECT_NE(getAnyHal(vm, "android.hardware.camera"), nullptr); in TEST_F()
616 EXPECT_EQ(getAnyHal(vm, "non-existent"), nullptr); in TEST_F()
620 for (const auto &hal : getHals(vm)) { in TEST_F()