Skip to content

Add some more documentaiton on assertParse #2236

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

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Sep 25, 2023

No description provided.

@ahoppen ahoppen requested a review from bnbarham as a code owner September 25, 2023 18:01
@ahoppen ahoppen force-pushed the ahoppen/assertion-documentation branch from b081d9d to 6670fb2 Compare September 25, 2023 18:06
"""
A mutation of the original test case failed to round-trip.

To debug the failure, add a new `assertParse` test with the mutated source as input.
Copy link
Contributor

Choose a reason for hiding this comment

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

You could add this part to additionalInfo maybe? Or do you think it could be missed if it was after the diff?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea 👍🏽

/// subtree of that structure.
/// 5. Mutates the test input by flipping each token's presence (ie. for every
/// token, remove it from the input if it is present in the parsed tree and
/// synthesize a missing tokens into the input) and verifies that this
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// synthesize a missing tokens into the input) and verifies that this
/// synthesize any missing tokens into the input) and verifies that this

Copy link
Member Author

Choose a reason for hiding this comment

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

This is intentionally a because only a single to ken will be synthesized not all of them.

Copy link
Contributor

Choose a reason for hiding this comment

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

How about:

  /// 5. Mutates the test input by flipping each token's presence (ie. for every
  ///    token, either remove it from the input if it is present in the parsed tree or
  ///    synthesize it if it was missing) and verifies that this

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good

@ahoppen ahoppen force-pushed the ahoppen/assertion-documentation branch 2 times, most recently from 6b79cf4 to 7f4de92 Compare September 25, 2023 23:41
@ahoppen
Copy link
Member Author

ahoppen commented Sep 26, 2023

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge September 26, 2023 16:23
@ahoppen ahoppen force-pushed the ahoppen/assertion-documentation branch from 7f4de92 to 1c852df Compare September 27, 2023 02:36
@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit e149b01 into swiftlang:main Sep 27, 2023
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.

3 participants