Files
SwiftLint/Tests/FrameworkTests/RulesTests.swift
Danny Mösch 087278c052 Introduce new CoreTests module (#6233)
It's supposed to test code from SwiftLintCore.
2025-09-04 20:56:51 +02:00

28 lines
918 B
Swift

@testable import SwiftLintBuiltInRules
import TestHelpers
final class RulesTests: SwiftLintTestCase {
func testLeadingWhitespace() {
verifyRule(LeadingWhitespaceRule.description, skipDisableCommandTests: true,
testMultiByteOffsets: false, testShebang: false)
}
func testMark() {
verifyRule(MarkRule.description, skipCommentTests: true)
}
func testRequiredEnumCase() {
let configuration = ["NetworkResponsable": ["notConnected": "error"]]
verifyRule(RequiredEnumCaseRule.description, ruleConfiguration: configuration)
}
func testTrailingNewline() {
verifyRule(TrailingNewlineRule.description, commentDoesntViolate: false,
stringDoesntViolate: false)
}
func testOrphanedDocComment() {
verifyRule(OrphanedDocCommentRule.description, commentDoesntViolate: false, skipCommentTests: true)
}
}