From 8e237941ef08cf9e1b71e2cb60ee8efeb0b8c8ec Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Mon, 19 Sep 2016 13:59:52 -0700 Subject: [PATCH] Additional test cases to verify multi-dimensional arrays work properly. Bug: 31438033 Change-Id: I1fc58cbbe6f161f7f71a43fa43d743843ba22f76 Test: run updated "hidl_test" and "hidl_test_java" --- tests/baz/1.0/IBase.hal | 1 + tests/foo/1.0/IFoo.hal | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/tests/baz/1.0/IBase.hal b/tests/baz/1.0/IBase.hal index ee51eb2346..eb870139df 100644 --- a/tests/baz/1.0/IBase.hal +++ b/tests/baz/1.0/IBase.hal @@ -43,4 +43,5 @@ interface IBase { someMethodWithFooVectors(vec fooInput) generates (vec fooOutput); transpose(StringMatrix5x3 in) generates (StringMatrix3x5 out); + transpose2(ThreeStrings[5] in) generates (FiveStrings[3] out); }; diff --git a/tests/foo/1.0/IFoo.hal b/tests/foo/1.0/IFoo.hal index 01d64707e4..a073e54fb5 100644 --- a/tests/foo/1.0/IFoo.hal +++ b/tests/foo/1.0/IFoo.hal @@ -61,6 +61,17 @@ interface IFoo { ThreeQuuxes[5] quuxMatrix; }; + typedef string[3] ThreeStrings; + typedef string[5] FiveStrings; + + struct StringMatrix3x5 { + FiveStrings[3] s; + }; + + struct StringMatrix5x3 { + ThreeStrings[5] s; + }; + doThis(float param); doThatAndReturnSomething(int64_t param) generates (int32_t result); doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something); @@ -81,4 +92,7 @@ interface IFoo { transposeMe(FiveFloats[3] in) generates (ThreeFloats[5] out); callingDrWho(MultiDimensional in) generates (MultiDimensional out); + + transpose(StringMatrix5x3 in) generates (StringMatrix3x5 out); + transpose2(ThreeStrings[5] in) generates (FiveStrings[3] out); };