-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,21 @@ final class HaveCountTest: XCTestCase, XCTestCaseProvider { | |
expect([1, 2, 3]).to(haveCount(3)) | ||
expect([1, 2, 3]).notTo(haveCount(1)) | ||
|
||
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 | ||
Actual Value: [1, 2, 3] | ||
""" | ||
) { | ||
expect([1, 2, 3]).to(haveCount(1)) | ||
} | ||
|
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) |
||
Actual Value: [1, 2, 3] | ||
""" | ||
) { | ||
expect([1, 2, 3]).notTo(haveCount(3)) | ||
} | ||
} | ||
|
@@ -20,13 +30,22 @@ final class HaveCountTest: XCTestCase, XCTestCaseProvider { | |
expect(dictionary).to(haveCount(3)) | ||
expect(dictionary).notTo(haveCount(1)) | ||
|
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) |
||
Actual Value: \(stringify(dictionary)) | ||
""" | ||
) { | ||
expect(dictionary).to(haveCount(1)) | ||
} | ||
|
||
failsWithErrorMessage("expected to not have Dictionary<String, Int> with count 3, got 3" + | ||
"\nActual Value: \(stringify(dictionary))") { | ||
expect(dictionary).notTo(haveCount(3)) | ||
failsWithErrorMessage( | ||
""" | ||
expected to not have Dictionary<String, Int> with count 3, got 3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those are written in string literals, so should be ignored. |
||
Actual Value: \(stringify(dictionary)) | ||
""" | ||
) { | ||
expect(dictionary).notTo(haveCount(3)) | ||
} | ||
} | ||
|
||
|
@@ -35,14 +54,22 @@ final class HaveCountTest: XCTestCase, XCTestCaseProvider { | |
expect(set).to(haveCount(3)) | ||
expect(set).notTo(haveCount(1)) | ||
|
||
failsWithErrorMessage("expected to have Set<Int> with count 1, got 3" + | ||
"\nActual Value: \(stringify(set))") { | ||
expect(set).to(haveCount(1)) | ||
failsWithErrorMessage( | ||
""" | ||
expected to have Set<Int> with count 1, got 3 | ||
Actual Value: \(stringify(set)) | ||
""" | ||
) { | ||
expect(set).to(haveCount(1)) | ||
} | ||
|
||
failsWithErrorMessage("expected to not have Set<Int> with count 3, got 3" + | ||
"\nActual Value: \(stringify(set))") { | ||
expect(set).notTo(haveCount(3)) | ||
failsWithErrorMessage( | ||
""" | ||
expected to not have Set<Int> with count 3, got 3 | ||
Actual Value: \(stringify(set)) | ||
""" | ||
) { | ||
expect(set).notTo(haveCount(3)) | ||
} | ||
} | ||
} |
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.
Syntactic Sugar Violation: Shorthand syntactic sugar should be used, i.e. [Int] instead of Array. (syntactic_sugar)