Files
SwiftLint/Tests/SwiftLintFrameworkTests/UnusedDeclarationConfigurationTests.swift
JP SimardandGitHub 6e3bfc1a45 Fix more strict concurrency warnings (#5324)
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.
2023-11-01 12:41:54 -04:00

20 lines
667 B
Swift

@testable import SwiftLintBuiltInRules
import XCTest
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"])
}
}