Files
SwiftLint/Tests/FrameworkTests/ExtendedStringTests.swift
Danny Mösch 15b285527a Separate built-in rule tests from framework tests (#5924)
* 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`
2024-12-30 12:26:46 +01:00

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)
}
}