forked from realm/SwiftLint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue realm#3167: Fixes false positives for multiline_parameters_brac…
…kets and multiline_arguments_brackets
- Loading branch information
1 parent
1e1807b
commit 4537e24
Showing
5 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// ExtendedStringTests.swift | ||
// SwiftLintFrameworkTests | ||
// | ||
// Created by Noah Gilmore on 4/5/20. | ||
// | ||
|
||
import XCTest | ||
|
||
class ExtendedStringTests: XCTestCase { | ||
func testCountOccurrences() { | ||
XCTAssertEqual("aabbabaaba".countOccurrences(of: "a"), 6) | ||
XCTAssertEqual("".countOccurrences(of: "a"), 0) | ||
XCTAssertEqual("\n\n".countOccurrences(of: "\n"), 2) | ||
} | ||
} |