From ed3255672cc1b0395dc20caf518fdbb29fb306e3 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 17 Nov 2017 14:25:32 -0800 Subject: [PATCH] Additional tests for enum iteration. Bug: 68715899 Test: hidl_test Change-Id: I78ca51568a5380839782ead5698f4d0ac0a3a7dd --- tests/foo/1.0/types.hal | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/foo/1.0/types.hal b/tests/foo/1.0/types.hal index 6b4b697489..b358a93d64 100644 --- a/tests/foo/1.0/types.hal +++ b/tests/foo/1.0/types.hal @@ -38,3 +38,30 @@ struct Outer { struct Unrelated { Outer.Inner great; }; + +// structs to test enum iterators in hidl_test +struct EnumIterators { + enum Empty : uint32_t {}; + + enum Parent : uint32_t { + A, + }; + enum EmptyChild : Parent {}; + enum Grandchild : EmptyChild { + B, + }; + + enum SkipsValues : uint32_t { + A = 7, + B, + C = 100, + D, + E + }; + enum MultipleValues : uint32_t { + A = 7, + B = 7, + C = 8, + D = 7, + }; +}; \ No newline at end of file