Libhidl: Add a constructor to hidl_array.
Test: Added a test to libhidl native test suite.
Change-Id: I4469200a40b4c05184f39754db6b4e732ae85ccd
Signed-off-by: Sasha Levitskiy <sanek@google.com>
diff --git a/test_main.cpp b/test_main.cpp
index d95488b..f964ce5 100644
--- a/test_main.cpp
+++ b/test_main.cpp
@@ -95,6 +95,14 @@
EXPECT_ARRAYEQ(v3, array, v3.size());
}
+TEST_F(LibHidlTest, ArrayTest) {
+ using android::hardware::hidl_array;
+ int32_t array[] = {5, 6, 7};
+
+ hidl_array<int32_t, 3> ha(array);
+ EXPECT_ARRAYEQ(ha, array, 3);
+}
+
TEST_F(LibHidlTest, TaskRunnerTest) {
using android::hardware::TaskRunner;
TaskRunner tr;