8000 String assertion messaging by plioi · Pull Request #335 · fixie/fixie · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

String assertion messaging #335

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 7 commits into from
Aug 13, 2024
Merged

String assertion messaging #335

merged 7 commits into from
Aug 13, 2024

Conversation

plioi
Copy link
Contributor
@plioi plioi commented Aug 13, 2024

When asserting on string equality, failure messaging uses reliable C# string literal formatting for the values in question. For single line strings, "normal literals" are used. For multiline strings,
"""
raw literals
"""
are used. When the string in question includes a mix of line endings, "normal literals" are used so that individual line ending characters can still be easily compared by the developer.

Examples:

example should be "z☺" but was "a☺"
example should be
	"""
	Line 1
	Line 2
	Line 3
	Line 4
	"""

but was
	"""
	Line 1
	Line 2 OOPS
	Line 3
	Line 4
	"""
example should be "\r \n \r\n \r \r" but was "\r \n \r\n \n \r"

@plioi plioi merged commit 353bb8b into main Aug 13, 2024
1 check passed
@plioi plioi deleted the string-assertion-messaging branch August 13, 2024 17:35
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.

1 participant
0