Skip to content
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

issue#196 Updating comparison report for non-equivalent struct #199

Merged
merged 2 commits into from
Sep 1, 2020

Conversation

cheqianh
Copy link
Contributor

@cheqianh cheqianh commented Aug 30, 2020

Description

Worked on issue #196.

For comparing struct, we write CONTAINER_START event for lhs/rhs in comparison report if we can't find a key-value pair of the first struct in the second struct.

What I did

Added a helper function that sets comparison report's context to desire event's index (ION_EXPECT_TRUE_WITH_INDEX). When two structs are different, we use this new function to write the CONTAINER_START event on comparison report.

@cheqianh cheqianh closed this Aug 30, 2020
@cheqianh cheqianh requested a review from tgregg August 30, 2020 22:01
@cheqianh cheqianh reopened this Aug 30, 2020
@cheqianh cheqianh marked this pull request as ready for review August 31, 2020 17:35
tgregg
tgregg previously approved these changes Sep 1, 2020
Copy link
Contributor

@tgregg tgregg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

"Did not find matching field for " + ion_event_symbol_to_string(expected_field_name));
ION_EXPECT_TRUE_WITH_INDEX(!(ION_ACTUAL_ARG->event_type == CONTAINER_END && ION_ACTUAL_ARG->depth == target_depth),
"Did not find matching field for " + ion_event_symbol_to_string(expected_field_name),
index_expected_container_start,index_actual_container_start);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insert space after comma.

@cheqianh
Copy link
Contributor Author

cheqianh commented Sep 1, 2020

Added

@tgregg tgregg merged commit 3a640dc into amazon-ion:master Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants