Skip to content

Commit

Permalink
Add tests stubs for all targets
Browse files Browse the repository at this point in the history
This ensures Xcode supports showing the file-specific coverage in the editor.
  • Loading branch information
Jeehut committed Jul 31, 2021
1 parent 447f8bd commit 52d6a06
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Tests/CheckersTests/FileContentsCheckerTests.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@testable import Checkers
import XCTest

// swiftlint:disable function_body_length

final class FileContentsCheckerTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}

// override func setUp() {
// log = Logger(outputType: .test)
// TestHelper.shared.reset()
Expand Down
4 changes: 4 additions & 0 deletions Tests/CheckersTests/FilePathsCheckerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import XCTest

final class FilePathsCheckerTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}

// override func setUp() {
// log = Logger(outputType: .test)
// TestHelper.shared.reset()
Expand Down
6 changes: 4 additions & 2 deletions Tests/CheckersTests/FilesSearchTests.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@testable import Checkers
import XCTest

// swiftlint:disable force_try

final class FilesSearchTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}

// override func setUp() {
// log = Logger(outputType: .test)
// TestHelper.shared.reset()
Expand Down
4 changes: 4 additions & 0 deletions Tests/CheckersTests/LintTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import XCTest

final class LintTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}

// override func setUp() {
// log = Logger(outputType: .test)
// TestHelper.shared.reset()
Expand Down
8 changes: 8 additions & 0 deletions Tests/CommandsTests/AnyLintTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Foundation
import XCTest

final class AnyLintTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}
}
8 changes: 8 additions & 0 deletions Tests/ConfigurationTests/CheckConfigurationTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Foundation
import XCTest

final class CheckConfigurationTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}
}
4 changes: 4 additions & 0 deletions Tests/CoreTests/AutoCorrectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import XCTest

final class AutoCorrectionTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}

// func testInitWithDictionaryLiteral() {
// let autoCorrection: AutoCorrection = ["before": "Lisence", "after": "License"]
// XCTAssertEqual(autoCorrection.before, "Lisence")
Expand Down
4 changes: 4 additions & 0 deletions Tests/CoreTests/RegexExtTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import XCTest

final class RegexExtTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}

// func testInitWithStringLiteral() {
// let regex: Regex = #"(?<name>capture[_\-\.]group)\s+\n(.*)"#
// XCTAssertEqual(regex.pattern, #"(?<name>capture[_\-\.]group)\s+\n(.*)"#)
Expand Down
4 changes: 4 additions & 0 deletions Tests/CoreTests/ViolationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import XCTest

final class ViolationTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}

// func testLocationMessage() {
// let checkInfo = CheckInfo(id: "demo_check", hint: "Make sure to always check the demo.", severity: .warning)
// XCTAssertNil(Violation(checkInfo: checkInfo).locationMessage(pathType: .relative))
Expand Down
6 changes: 5 additions & 1 deletion Tests/ReportingTests/StatisticsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import XCTest

final class StatisticsTests: XCTestCase {
func testSample() {
XCTAssertTrue(true) // TODO: [cg_2021-07-31] not yet implemented
}

// func testFoundViolationsInCheck() {
// XCTAssert(Statistics.shared.executedChecks.isEmpty)
// XCTAssert(Statistics.shared.violationsBySeverity[.info]!.isEmpty)
Expand Down Expand Up @@ -48,7 +52,7 @@ final class StatisticsTests: XCTestCase {
// XCTAssertEqual(Statistics.shared.violationsPerCheck.keys.count, 3)
// }
//
// func testLogSummary() { // swiftlint:disable:this function_body_length
// func testLogSummary() {
// Statistics.shared.logCheckSummary()
// XCTAssertEqual(TestHelper.shared.consoleOutputs.count, 1)
// XCTAssertEqual(TestHelper.shared.consoleOutputs[0].level, .warning)
Expand Down

0 comments on commit 52d6a06

Please sign in to comment.