-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Test for exhaustiveness cut-off. #16395
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
Test for exhaustiveness cut-off. #16395
Conversation
ae09ac2
to
757dcf0
Compare
@swift-ci please smoke test |
// LIMIT: error: the compiler is unable to check that this switch is exhaustive in reasonable time | ||
// LIMIT-NOT: error: switch must be exhaustive | ||
// NO_LIMIT: error: switch must be exhaustive | ||
// NO_LIMIT-NOT: error: the compiler is unable to check that this switch is exhaustive in reasonable time |
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.
This looks fine, but it's worth pointing out that -NOT
lines only check that certain text does not appear after the previous positive check and before the next positive check. You could either bracket your LIMIT
/NO_LIMIT
lines with the -NOT
checks, or save the error output to a file and check it twice (a common enough idiom in our test suite, look for -check-prefix NEGATIVE
), or just not worry too much about it.
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.
Do you want to review the revised test?
@swift-ci please smoke test |
73028cf
to
ea749c2
Compare
@swift-ci please smoke test |
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.
This works too. It's not the way we'd usually do negative tests, but I like that it's symmetrical.
Thanks, Jordan. |
Adds a test for the recently-added -switch-checking-invocation-threshold= frontend option.