Skip to content
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

Utilize multiline string literals #544

Merged
merged 1 commit into from Jun 23, 2018
Merged

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Jun 16, 2018

This is a non-functional change.

expect(dictionary).notTo(haveCount(3))
failsWithErrorMessage(
"""
expected to not have Dictionary<String, Int> with count 3, got 3

Choose a reason for hiding this comment

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

Syntactic Sugar Violation: Shorthand syntactic sugar should be used, i.e. [String: Int] instead of Dictionary<String, Int>. (syntactic_sugar)

Copy link
Member Author

Choose a reason for hiding this comment

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

Those are written in string literals, so should be ignored.

failsWithErrorMessage("expected to have Dictionary<String, Int> with count 1, got 3\nActual Value: \(stringify(dictionary))") {
failsWithErrorMessage(
"""
expected to have Dictionary<String, Int> with count 1, got 3

Choose a reason for hiding this comment

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

Syntactic Sugar Violation: Shorthand syntactic sugar should be used, i.e. [String: Int] instead of Dictionary<String, Int>. (syntactic_sugar)

failsWithErrorMessage("expected to not have Array<Int> with count 3, got 3\nActual Value: [1, 2, 3]") {
failsWithErrorMessage(
"""
expected to not have Array<Int> with count 3, got 3

Choose a reason for hiding this comment

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

Syntactic Sugar Violation: Shorthand syntactic sugar should be used, i.e. [Int] instead of Array. (syntactic_sugar)

failsWithErrorMessage("expected to have Array<Int> with count 1, got 3\nActual Value: [1, 2, 3]") {
failsWithErrorMessage(
"""
expected to have Array<Int> with count 1, got 3

Choose a reason for hiding this comment

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

Syntactic Sugar Violation: Shorthand syntactic sugar should be used, i.e. [Int] instead of Array. (syntactic_sugar)

Copy link
Member

@wongzigii wongzigii left a comment

Choose a reason for hiding this comment

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

Great Thanks :D

@wongzigii wongzigii merged commit d2eb6a0 into master Jun 23, 2018
@wongzigii wongzigii deleted the multiline-string-literals branch June 23, 2018 15:15
Megal pushed a commit to Megal/Nimble that referenced this pull request Jul 31, 2019
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.

None yet

3 participants