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`
23 lines
936 B
Swift
23 lines
936 B
Swift
@testable import SwiftLintBuiltInRules
|
|
import TestHelpers
|
|
|
|
final class InclusiveLanguageRuleTests: SwiftLintTestCase {
|
|
func testNonTriggeringExamplesWithNonDefaultConfig() {
|
|
InclusiveLanguageRuleExamples.nonTriggeringExamplesWithConfig.forEach { example in
|
|
let description = InclusiveLanguageRule.description
|
|
.with(nonTriggeringExamples: [example])
|
|
.with(triggeringExamples: [])
|
|
verifyRule(description, ruleConfiguration: example.configuration)
|
|
}
|
|
}
|
|
|
|
func testTriggeringExamplesWithNonDefaultConfig() {
|
|
InclusiveLanguageRuleExamples.triggeringExamplesWithConfig.forEach { example in
|
|
let description = InclusiveLanguageRule.description
|
|
.with(nonTriggeringExamples: [])
|
|
.with(triggeringExamples: [example])
|
|
verifyRule(description, ruleConfiguration: example.configuration)
|
|
}
|
|
}
|
|
}
|