mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
15b285527a
* Short names for test modules * Lint plugins and `Package.swift` in integration tests * Simplify and merge file groups in Bazel * Move common functions to `TestHelpers`
10 lines
293 B
Swift
10 lines
293 B
Swift
import XCTest
|
|
|
|
final class ExtendedStringTests: SwiftLintTestCase {
|
|
func testCountOccurrences() {
|
|
XCTAssertEqual("aabbabaaba".countOccurrences(of: "a"), 6)
|
|
XCTAssertEqual("".countOccurrences(of: "a"), 0)
|
|
XCTAssertEqual("\n\n".countOccurrences(of: "\n"), 2)
|
|
}
|
|
}
|