diff options
author | Steven Moreland | 2017-11-17 16:25:32 -0600 |
---|---|---|
committer | Steven Moreland | 2017-11-17 16:25:32 -0600 |
commit | ed3255672cc1b0395dc20caf518fdbb29fb306e3 (patch) | |
tree | 3a72bb285e236ded3f4c972de8101cd1e854ac41 /tests | |
parent | ae6b2a5f1ec56c4d68aac10062ccb74e4df730ac (diff) | |
download | platform-hardware-interfaces-ed3255672cc1b0395dc20caf518fdbb29fb306e3.tar.gz platform-hardware-interfaces-ed3255672cc1b0395dc20caf518fdbb29fb306e3.tar.xz platform-hardware-interfaces-ed3255672cc1b0395dc20caf518fdbb29fb306e3.zip |
Additional tests for enum iteration.
Bug: 68715899
Test: hidl_test
Change-Id: I78ca51568a5380839782ead5698f4d0ac0a3a7dd
Diffstat (limited to 'tests')
-rw-r--r-- | tests/foo/1.0/types.hal | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/foo/1.0/types.hal b/tests/foo/1.0/types.hal index 6b4b6974..b358a93d 100644 --- a/tests/foo/1.0/types.hal +++ b/tests/foo/1.0/types.hal | |||
@@ -38,3 +38,30 @@ struct Outer { | |||
38 | struct Unrelated { | 38 | struct Unrelated { |
39 | Outer.Inner great; | 39 | Outer.Inner great; |
40 | }; | 40 | }; |
41 | |||
42 | // structs to test enum iterators in hidl_test | ||
43 | struct EnumIterators { | ||
44 | enum Empty : uint32_t {}; | ||
45 | |||
46 | enum Parent : uint32_t { | ||
47 | A, | ||
48 | }; | ||
49 | enum EmptyChild : Parent {}; | ||
50 | enum Grandchild : EmptyChild { | ||
51 | B, | ||
52 | }; | ||
53 | |||
54 | enum SkipsValues : uint32_t { | ||
55 | A = 7, | ||
56 | B, | ||
57 | C = 100, | ||
58 | D, | ||
59 | E | ||
60 | }; | ||
61 | enum MultipleValues : uint32_t { | ||
62 | A = 7, | ||
63 | B = 7, | ||
64 | C = 8, | ||
65 | D = 7, | ||
66 | }; | ||
67 | }; \ No newline at end of file | ||