diff options
Diffstat (limited to 'test/main.cpp')
-rw-r--r-- | test/main.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/main.cpp b/test/main.cpp index 8dc5ddb..42932e5 100644 --- a/test/main.cpp +++ b/test/main.cpp | |||
@@ -304,6 +304,28 @@ TEST_F(LibVintfTest, HalManifestOptional) { | |||
304 | "</manifest>")); | 304 | "</manifest>")); |
305 | } | 305 | } |
306 | 306 | ||
307 | TEST_F(LibVintfTest, HalManifestNative) { | ||
308 | HalManifest vm; | ||
309 | EXPECT_TRUE(gHalManifestConverter(&vm, | ||
310 | "<manifest version=\"1.0\" type=\"device\">" | ||
311 | " <hal format=\"native\">" | ||
312 | " <name>foo</name>" | ||
313 | " <version>1.0</version>" | ||
314 | " </hal>" | ||
315 | "</manifest>")) | ||
316 | << gHalManifestConverter.lastError(); | ||
317 | EXPECT_FALSE(gHalManifestConverter(&vm, | ||
318 | "<manifest version=\"1.0\" type=\"device\">" | ||
319 | " <hal format=\"native\">" | ||
320 | " <name>foo</name>" | ||
321 | " <version>1.0</version>" | ||
322 | " <transport>hwbinder</transport>" | ||
323 | " </hal>" | ||
324 | "</manifest>")); | ||
325 | EXPECT_TRUE(gHalManifestConverter.lastError().find( | ||
326 | "Native HAL 'foo' should not have <transport> defined") != std::string::npos); | ||
327 | } | ||
328 | |||
307 | TEST_F(LibVintfTest, HalManifestDuplicate) { | 329 | TEST_F(LibVintfTest, HalManifestDuplicate) { |
308 | HalManifest vm; | 330 | HalManifest vm; |
309 | EXPECT_FALSE(gHalManifestConverter(&vm, | 331 | EXPECT_FALSE(gHalManifestConverter(&vm, |