Closed atultw closed 2 years ago
lint should pass now
Thanks for your contribution. Can you add some tests?
Added a UUID field to TestCodable
. I figure that's the best way since it already has fields for date and other types.
I copy pasted apple's example UUID from foundation docs for the tests. May want to make it a constant instead. Let me know what you think!
Thanks Jan. Made the changes, tests passing. I put the uuid constant in TestHelpers
, can move it elsewhere if needed
Ok, looking good, just a few lint fixes left.
Tried splitting the lines that were too long into two lines, but that made the test fail. So I disabled the rule at those spots.
I stumbled upon issue #1126 while trying to decode a UUID using codable. As described there, encoding worked fine but decoding treated the field like json.
Added an
else
to cover the UUID case, matching theencode
method functionality.