diff options
author | Steven Moreland | 2018-10-11 16:23:27 -0500 |
---|---|---|
committer | Gerrit Code Review | 2018-10-11 16:23:27 -0500 |
commit | 17c437eac177fc47e5315d0e5e1e162a4dc9ecf8 (patch) | |
tree | 6e1ee95b4ff5a3254790d9412a935956b05aac75 /tests | |
parent | 76c45692bf79861eac818c1406d56648b7912f0f (diff) | |
parent | dec5272582ace2253090f29a5b3c8734d5b19234 (diff) | |
download | platform-hardware-interfaces-17c437eac177fc47e5315d0e5e1e162a4dc9ecf8.tar.gz platform-hardware-interfaces-17c437eac177fc47e5315d0e5e1e162a4dc9ecf8.tar.xz platform-hardware-interfaces-17c437eac177fc47e5315d0e5e1e162a4dc9ecf8.zip |
Merge "Add monostate to optional safe unions."
Diffstat (limited to 'tests')
-rw-r--r-- | tests/safeunion/1.0/Android.bp | 1 | ||||
-rw-r--r-- | tests/safeunion/1.0/ISafeUnion.hal | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/safeunion/1.0/Android.bp b/tests/safeunion/1.0/Android.bp index ede84018..87edd537 100644 --- a/tests/safeunion/1.0/Android.bp +++ b/tests/safeunion/1.0/Android.bp | |||
@@ -9,6 +9,7 @@ hidl_interface { | |||
9 | ], | 9 | ], |
10 | interfaces: [ | 10 | interfaces: [ |
11 | "android.hidl.base@1.0", | 11 | "android.hidl.base@1.0", |
12 | "android.hidl.safe_union@1.0", | ||
12 | ], | 13 | ], |
13 | gen_java: true, | 14 | gen_java: true, |
14 | } | 15 | } |
diff --git a/tests/safeunion/1.0/ISafeUnion.hal b/tests/safeunion/1.0/ISafeUnion.hal index f48248b5..58c08c61 100644 --- a/tests/safeunion/1.0/ISafeUnion.hal +++ b/tests/safeunion/1.0/ISafeUnion.hal | |||
@@ -18,6 +18,8 @@ package android.hardware.tests.safeunion@1.0; | |||
18 | 18 | ||
19 | import IOtherInterface; | 19 | import IOtherInterface; |
20 | 20 | ||
21 | import android.hidl.safe_union@1.0::Monostate; | ||
22 | |||
21 | interface ISafeUnion { | 23 | interface ISafeUnion { |
22 | 24 | ||
23 | enum BitField : uint8_t { | 25 | enum BitField : uint8_t { |
@@ -33,14 +35,15 @@ interface ISafeUnion { | |||
33 | string j3; | 35 | string j3; |
34 | }; | 36 | }; |
35 | 37 | ||
36 | safe_union EmptySafeUnion { | ||
37 | }; | ||
38 | |||
39 | safe_union SmallSafeUnion { | 38 | safe_union SmallSafeUnion { |
39 | Monostate noinit; | ||
40 | |||
40 | uint8_t a; | 41 | uint8_t a; |
41 | }; | 42 | }; |
42 | 43 | ||
43 | safe_union LargeSafeUnion { | 44 | safe_union LargeSafeUnion { |
45 | Monostate noinit; | ||
46 | |||
44 | int8_t a; | 47 | int8_t a; |
45 | uint16_t b; | 48 | uint16_t b; |
46 | int32_t c; | 49 | int32_t c; |
@@ -66,6 +69,8 @@ interface ISafeUnion { | |||
66 | }; | 69 | }; |
67 | 70 | ||
68 | safe_union InterfaceTypeSafeUnion { | 71 | safe_union InterfaceTypeSafeUnion { |
72 | Monostate noinit; | ||
73 | |||
69 | uint32_t a; | 74 | uint32_t a; |
70 | int8_t[7] b; | 75 | int8_t[7] b; |
71 | IOtherInterface c; | 76 | IOtherInterface c; |
@@ -76,6 +81,8 @@ interface ISafeUnion { | |||
76 | }; | 81 | }; |
77 | 82 | ||
78 | safe_union HandleTypeSafeUnion { | 83 | safe_union HandleTypeSafeUnion { |
84 | Monostate noinit; | ||
85 | |||
79 | handle a; | 86 | handle a; |
80 | handle[5] b; | 87 | handle[5] b; |
81 | vec<handle> c; | 88 | vec<handle> c; |