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`
20 lines
674 B
Swift
20 lines
674 B
Swift
@testable import SwiftLintBuiltInRules
|
|
import XCTest
|
|
|
|
final class UnusedDeclarationConfigurationTests: XCTestCase {
|
|
func testParseConfiguration() throws {
|
|
var testee = UnusedDeclarationConfiguration()
|
|
let config = [
|
|
"severity": "warning",
|
|
"include_public_and_open": true,
|
|
"related_usrs_to_skip": ["a", "b"],
|
|
] as [String: any Sendable]
|
|
|
|
try testee.apply(configuration: config)
|
|
|
|
XCTAssertEqual(testee.severityConfiguration.severity, .warning)
|
|
XCTAssertTrue(testee.includePublicAndOpen)
|
|
XCTAssertEqual(testee.relatedUSRsToSkip, ["a", "b", "s:7SwiftUI15PreviewProviderP"])
|
|
}
|
|
}
|