mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
These aren't enough to enable `-strict-concurrency=complete` for more modules, but they address some warnings with that flag on and reduces the scope of what remains to be migrated.
19 lines
744 B
Swift
19 lines
744 B
Swift
@testable import SwiftLintBuiltInRules
|
|
import XCTest
|
|
|
|
class TrailingClosureConfigurationTests: SwiftLintTestCase {
|
|
func testDefaultConfiguration() {
|
|
let config = TrailingClosureConfiguration()
|
|
XCTAssertEqual(config.severityConfiguration.severity, .warning)
|
|
XCTAssertFalse(config.onlySingleMutedParameter)
|
|
}
|
|
|
|
func testApplyingCustomConfiguration() throws {
|
|
var config = TrailingClosureConfiguration()
|
|
try config.apply(configuration: ["severity": "error",
|
|
"only_single_muted_parameter": true] as [String: any Sendable])
|
|
XCTAssertEqual(config.severityConfiguration.severity, .error)
|
|
XCTAssertTrue(config.onlySingleMutedParameter)
|
|
}
|
|
}
|