commit | b725d679b19a1a5e74e30666450832469bc35cbd | [log] [tgz] |
---|---|---|
author | Yifan Hong <elsk@google.com> | Mon Oct 10 10:14:15 2016 -0700 |
committer | Yifan Hong <elsk@google.com> | Tue Oct 11 10:51:56 2016 -0700 |
tree | d18725778884834995e79a8b40e29fe473f65741 | |
parent | 58593994ad4c2c7cedaeb4cab650bc00a08abaac [diff] |
hidl_test: add test for null native handle. Test: hidl_test Bug: 30814137 Change-Id: I05cf44418c7fcac891d5072b150706f04ada3b31
diff --git a/test/main.cpp b/test/main.cpp index 2f6680f..88a6ee8 100644 --- a/test/main.cpp +++ b/test/main.cpp
@@ -1458,6 +1458,11 @@ })); } +TEST_F(HidlTest, FooNullNativeHandleTest) { + Abc xyz; + xyz.z = nullptr; + EXPECT_FAIL(foo->haveATypeFromAnotherFile(xyz)); +} TEST_F(HidlTest, FooNonNullCallbackTest) { hidl_array<hidl_string, 5, 3> in;