-
Notifications
You must be signed in to change notification settings - Fork 147
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
Fix YAMLDecoder
's handling when decoding empty strings into optional types
#351
Changes from all commits
0de508f
89679a2
3aaed24
94ad299
108a304
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ class NodeTests: XCTestCase { | |
let scalarFloat: Node = "1.0" | ||
XCTAssertEqual(scalarFloat.float, 1.0) | ||
|
||
let scalarNull: Node = "null" | ||
let scalarNull = Node("null", .implicit, .plain) | ||
XCTAssertEqual(scalarNull.null, NSNull()) | ||
Comment on lines
-62
to
63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to make this change here since the construct method will no longer construct Have I missed anything here, is that ok? I'm not familiar how this is used elsewhere but I think its ok? Do we have to worry about styles like This is the only thing that makes me wonder if the patch should have been inside Let me know if there are better tests I can add to verify this. |
||
|
||
let scalarInt: Node = "1" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before the change to
NSNull.construct(yaml:)
, these tests passed anyway. This is because of other stuff that is done when callingYams.load_all(yaml:)
. I just made the changes here anyway to highlight the expectation incase things change in the future.