-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Decoding of Nested Arrays of Enums #126
Test Decoding of Nested Arrays of Enums #126
Conversation
@MaxDesiatov, were you able to take a look at this? Thanks! |
@bwetherfield I'm sorry for the delay, it's in my queue now! |
Hi @bwetherfield, I had a quick look and I'm a bit confused by the test case decoding initializer. At a first glance it looks like exactly something that auto-synthesized initializer would do, but if I remove it ( |
Hi @MaxDesiatov ! From what I understand the |
Hey @bwetherfield, I again apologize for the delay, August and September turned out to be months with some crazy workload. It looks like the easiest fix is to add an intermediate I'm going to merge the PR when CI passes, but if there's anything else missing, please feel free to submit new issues/PRs. |
Add `NestedChoiceArrayTest` based on the code shared in CoreOffice#122.
Add `NestedChoiceArrayTest` based on the code shared in CoreOffice#122.
I believe the structure in issue #122 provides the right use case for a
nestedUnkeyedContainer
(for keyChapters
). As such I add a test case with the full proposed usage and a fix forXMLKeyedDecodingContainer.nestedUnkeyedContainer
on the implementation side that allows the decoding of wrapped arrays ofenum
types.The key lines on the user-side are within the
Decodable
implementation forBook
, with decoding initializer using nesting syntax as follows:Book
is defined as follows, wrapping an array of theenum
typeChapter
.More info on how the
enum
type gets decoded from XML choice elements can be found in #119.