summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot2018-01-24 02:23:14 -0600
committerandroid-build-team Robot2018-01-24 02:23:14 -0600
commit8495faa84e01d388bc778c2abfebaa0e1172380a (patch)
tree7ac190957493e7dae76be5548c5bd8f8031bac7e
parentc7d0e50a2ced8dc02f99f1d19a3df4d09386e4fa (diff)
parent10368a76ea52f06bffd9669104823422d713f200 (diff)
downloadplatform-system-libvintf-8495faa84e01d388bc778c2abfebaa0e1172380a.tar.gz
platform-system-libvintf-8495faa84e01d388bc778c2abfebaa0e1172380a.tar.xz
platform-system-libvintf-8495faa84e01d388bc778c2abfebaa0e1172380a.zip
Snap for 4562879 from 10368a76ea52f06bffd9669104823422d713f200 to pi-release
Change-Id: I60b69b62f27904476f49fedff6fb68b7616949a3
-rw-r--r--test/LibVintfTest.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/LibVintfTest.cpp b/test/LibVintfTest.cpp
index e934360..d705243 100644
--- a/test/LibVintfTest.cpp
+++ b/test/LibVintfTest.cpp
@@ -232,6 +232,33 @@ TEST_F(LibVintfTest, GetTransport) {
232 {2, 0}, "ICamera", "default")); 232 {2, 0}, "ICamera", "default"));
233} 233}
234 234
235TEST_F(LibVintfTest, FutureManifestCompatible) {
236 HalManifest expectedManifest;
237 expectedManifest.add(ManifestHal{.format = HalFormat::HIDL,
238 .name = "android.hardware.foo",
239 .versions = {Version(1, 0)},
240 .transportArch = {Transport::HWBINDER, Arch::ARCH_EMPTY},
241 .interfaces = {
242 {"IFoo", {"IFoo", {"default"}}},
243 }});
244 std::string manifestXml =
245 "<manifest version=\"1.0\" type=\"device\" might_add=\"true\">\n"
246 " <hal format=\"hidl\" attribuet_might_be_added=\"value\">\n"
247 " <name>android.hardware.foo</name>\n"
248 " <transport>hwbinder</transport>\n"
249 " <version>1.0</version>\n"
250 " <interface>\n"
251 " <name>IFoo</name>\n"
252 " <instance>default</instance>\n"
253 " </interface>\n"
254 " </hal>\n"
255 " <tag_might_be_added/>\n"
256 "</manifest>\n";
257 HalManifest manifest;
258 EXPECT_TRUE(gHalManifestConverter(&manifest, manifestXml));
259 EXPECT_EQ(expectedManifest, manifest);
260}
261
235TEST_F(LibVintfTest, HalManifestConverter) { 262TEST_F(LibVintfTest, HalManifestConverter) {
236 HalManifest vm = testDeviceManifest(); 263 HalManifest vm = testDeviceManifest();
237 std::string xml = gHalManifestConverter(vm); 264 std::string xml = gHalManifestConverter(vm);