Skip to content

Commit

Permalink
Only generate AnyLint tests on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Apr 16, 2020
1 parent 8fc9780 commit 9a510a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ Contributions are welcome. Feel free to open an issue on GitHub with your ideas
To update the Linux tests, run [Sourcery](https://github.com/krzysztofzablocki/Sourcery) like this:

```bash
sourcery --sources Tests --templates .sourcery/LinuxMain.stencil --output .sourcery --force-parse generated && mv .sourcery/LinuxMain.generated.swift Tests/LinuxMain.swift
sourcery --sources Tests/AnyLintTests --templates .sourcery/LinuxMain.stencil --output .sourcery --force-parse generated && mv .sourcery/LinuxMain.generated.swift Tests/LinuxMain.swift
```

## License
Expand Down
17 changes: 1 addition & 16 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ import XCTest

// swiftlint:disable line_length file_length

extension AnyLintCLITests {
static var allTests: [(String, (AnyLintCLITests) -> () throws -> Void)] = [
("testExample", testExample)
]
}

extension AutoCorrectionTests {
static var allTests: [(String, (AutoCorrectionTests) -> () throws -> Void)] = [
("testInitWithDictionaryLiteral", testInitWithDictionaryLiteral)
Expand Down Expand Up @@ -52,17 +46,10 @@ extension LintTests {
]
}

extension LoggerTests {
static var allTests: [(String, (LoggerTests) -> () throws -> Void)] = [
("testMessage", testMessage)
]
}

extension RegexExtTests {
static var allTests: [(String, (RegexExtTests) -> () throws -> Void)] = [
("testInitWithStringLiteral", testInitWithStringLiteral),
("testInitWithDictionaryLiteral", testInitWithDictionaryLiteral),
("testStringLiteralInit", testStringLiteralInit)
("testInitWithDictionaryLiteral", testInitWithDictionaryLiteral)
]
}

Expand All @@ -80,14 +67,12 @@ extension ViolationTests {
}

XCTMain([
testCase(AnyLintCLITests.allTests),
testCase(AutoCorrectionTests.allTests),
testCase(CheckInfoTests.allTests),
testCase(FileContentsCheckerTests.allTests),
testCase(FilePathsCheckerTests.allTests),
testCase(FilesSearchTests.allTests),
testCase(LintTests.allTests),
testCase(LoggerTests.allTests),
testCase(RegexExtTests.allTests),
testCase(StatisticsTests.allTests),
testCase(ViolationTests.allTests)
Expand Down

0 comments on commit 9a510a7

Please sign in to comment.