mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
bda1cd56e0
* Issue #3167: Fixes false positives for multiline_parameters_brackets and multiline_arguments_brackets * Add changelog entry * Fix trailing comma in MultilineParametersBracketsRule nontriggering examples * Remove header comments from ExtendedStringTests.swift Co-authored-by: Paul Taykalo <ptaykalo@macpaw.com>
10 lines
280 B
Swift
10 lines
280 B
Swift
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)
|
|
}
|
|
}
|