-
Notifications
You must be signed in to change notification settings - Fork 35
chore: attempt to compare each member #274
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
Conversation
...lin/software/amazon/smithy/swift/codegen/integration/HttpProtocolUnitTestRequestGenerator.kt
Outdated
Show resolved
Hide resolved
...lin/software/amazon/smithy/swift/codegen/integration/HttpProtocolUnitTestRequestGenerator.kt
Show resolved
Hide resolved
kneekey23
left a comment
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.
Everything LGTM just had one question but feel free to just respond and ship if it's not a concern!
| val shape = model.expectShape(member.target.toShapeId()) | ||
| val expectedMemberName = "$expected.${symbolProvider.toMemberName(member)}" | ||
| val actualMemberName = "$actual.${symbolProvider.toMemberName(member)}" | ||
| if (member.isStructureShape) { |
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.
Is this if statement even doing anything? If a member is a struct shape don't we want separate asserts for each prop anyways where it doesn't matter if it's a struct? What if the struct has a double with a nan value? Might be missing something here
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.
My bad, it was a copy and paste of the original implementation.
For now it seems to be working because these structs probably don't seem to have nested members that contain nan's. In the event that we start having protocol tests that do this, protocol codegen tests will fail, and then we'll need to update our logic at that time. Sound like a plan?
Corresponding:
awslabs/aws-sdk-swift#150
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.