Skip to content

Use raw strings in tests#79305

Merged
CyrusNajmabadi merged 6 commits intodotnet:mainfrom
CyrusNajmabadi:testRawStrings
Jul 10, 2025
Merged

Use raw strings in tests#79305
CyrusNajmabadi merged 6 commits intodotnet:mainfrom
CyrusNajmabadi:testRawStrings

Conversation

@CyrusNajmabadi
Copy link
Contributor

No description provided.

@CyrusNajmabadi CyrusNajmabadi force-pushed the testRawStrings branch 18 times, most recently from 8a6d283 to 10bfecb Compare July 9, 2025 05:48
@CyrusNajmabadi CyrusNajmabadi force-pushed the testRawStrings branch 9 times, most recently from e5aab0b to 292e0ea Compare July 9, 2025 19:16
@CyrusNajmabadi CyrusNajmabadi force-pushed the testRawStrings branch 12 times, most recently from 02136a9 to 52540ea Compare July 9, 2025 22:20
// Field
[InlineData(@"Scope = ""member""", @"Target = ""~F:N.C.F""", "assembly")]
[InlineData("""
Scope = "member"
Copy link
Member

Choose a reason for hiding this comment

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

nit: This feels a bit verbose just to avoid escaping the double quotes, but I could live with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think it's a matter of perspective. It def increases the number of lines, in the case where there are escaped quotes at teh start/end of the string. But it think it's much clearer to just have 'the raw contents' which i don't have to interpret.

XmlDoc.AttributeName("langword"),
XmlDoc.Delimiter("="),
XmlDoc.AttributeQuotes("\""),
XmlDoc.AttributeQuotes("""
Copy link
Member

Choose a reason for hiding this comment

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

I feel like the current version of this is easier to read.

@CyrusNajmabadi CyrusNajmabadi force-pushed the testRawStrings branch 4 times, most recently from f73caeb to c64a70e Compare July 10, 2025 00:04
@CyrusNajmabadi CyrusNajmabadi requested a review from JoeRobich July 10, 2025 00:07
@CyrusNajmabadi CyrusNajmabadi force-pushed the testRawStrings branch 2 times, most recently from 96eb88c to da97049 Compare July 10, 2025 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants