-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update tests to use raw strings #67059
Conversation
…slyn into rawStringTests
Can you please revert |
var source = """ | ||
int i = 0; |
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.
❓ Why is a mechanical factoring PR containing code changes? this should have preserved the spacing.
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.
it's the mechanical approach that removes starting/ending lines, and remove indentation. THat way we don't have tests that look like this:
var test = """
class C
{
void Foo()
{
}
}
}
"""
But instead get the much more clearly desired:
var test = """
class C
{
void Foo()
{
}
}
""";
TestState = { | ||
Sources = { source }, | ||
OutputKind = OutputKind.ConsoleApplication, | ||
}, |
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.
❓ Why is a mechanical factoring PR containing code changes? This should not have changed.
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.
so changing the test here just changed diagnostic spans. That's pointless pain (since this test is not seeking to verify that you get a "Program using top-level statements must be an executable." error). So this was changed to remove the error, and just pass teh flag to teh compiler that ensures we test the thing we care about, without extraneous (position-sensitive) data in it.
No description provided.