Skip to content

Translate lit_tests/incrParse with assertIncrementalParse #1782

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
Jun 21, 2023

Conversation

StevenWong12
Copy link
Contributor

This should make it easier to read and run test cases in lit_tests/incrParse with assertIncrementalParse.

@StevenWong12 StevenWong12 requested a review from ahoppen as a code owner June 14, 2023 13:42
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thanks. This is going in a great direction.


⏩️⏸️}⏪️

⏩️func⏸️⏪️ funcKeywordRemoved() {
Copy link
Member

Choose a reason for hiding this comment

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

assertIncrementalParse will apply all of these edits concurrently, while lit_tests/incrParse/funcs.swift specified multiple independent test cases where only a single edit was applied. I would split this case up into multiple assertIncrementalParse calls where each one only has a single edit.

Same for most of the test cases below. NESTED_INITIALIZERS performs a multi-edit but I think none of the others do, but please double-check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we split these up, do you think should we maintain all other text in in that file? I'm not quite sure how much these context will affect our test.

Copy link
Member

Choose a reason for hiding this comment

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

I would just keep the immediate parent contexts. E.g. here, I would just keep class InvalidFuncDecls {

@StevenWong12 StevenWong12 force-pushed the translate_incrparse_littest branch from 81c3dfc to 1044271 Compare June 18, 2023 07:01
@StevenWong12
Copy link
Contributor Author

I've also opened a separated pr (#1807) to delete all the old incremental parse test utils and lit-based test cases.

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

One minor comment, otherwise LGTM.

@StevenWong12 StevenWong12 force-pushed the translate_incrparse_littest branch from 1044271 to d0fe534 Compare June 19, 2023 15:18
@ahoppen
Copy link
Member

ahoppen commented Jun 20, 2023

@swift-ci Please test

@ahoppen
Copy link
Member

ahoppen commented Jun 20, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 3f9b07a into swiftlang:main Jun 21, 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.

2 participants