Skip to content

Commit

Permalink
Add comments to deprecated tests explaining that they aren't skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
d-ronnqvist committed Oct 25, 2024
1 parent bc9a2b5 commit 0d28c07
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import XCTest
@testable import SwiftDocC

// This test verifies the behavior of `DocumentationConverter` which is a deprecated type.
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
@available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released")
class DocumentationConverterTests: XCTestCase {
/// An empty implementation of `ConvertOutputConsumer` that purposefully does nothing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class BundleDiscoveryTests: XCTestCase {
}

// This tests registration of multiple catalogs which is deprecated
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
@available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released")
func testFirstBundle() throws {
let url = try createTemporaryDirectory()
Expand Down Expand Up @@ -63,6 +64,7 @@ class BundleDiscoveryTests: XCTestCase {
}

// This test registration more than once data provider which is deprecated.
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
@available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released")
func testLoadComplexWorkspace() throws {
let allFiles = try flatListOfFiles()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extension CollectionDifference {

class DocumentationContextTests: XCTestCase {
// This test checks unregistration of workspace data providers which is deprecated
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
@available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released")
func testResolve() throws {
let workspace = DocumentationWorkspace()
Expand Down Expand Up @@ -602,6 +603,7 @@ class DocumentationContextTests: XCTestCase {
}

// This test registration more than once data provider which is deprecated.
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
@available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released")
func testCreatesCorrectIdentifiers() throws {
let testBundleLocation = Bundle.module.url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import XCTest
@testable import SwiftDocC

// This test verifies the behavior of `DocumentationWorkspace` which is a deprecated type.
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
@available(*, deprecated, message: "This deprecated API will be removed after 6.2 is released")
class DocumentationWorkspaceTests: XCTestCase {
func testEmptyWorkspace() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import XCTest
@testable import SwiftDocC
import SymbolKit

// This test verifies the behavior of `GeneratedDataProvider` which is a deprecated type.
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
@available(*, deprecated, message: "Use 'DocumentationContext.InputProvider' instead. This deprecated API will be removed after 6.2 is released")
class GeneratedDataProviderTests: XCTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import SwiftDocCTestUtilities
class DocumentationInputsProviderTests: XCTestCase {

// After 6.2 we can update this test to verify that the input provider discovers the same inputs regardless of FileManagerProtocol
// Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
@available(*, deprecated, message: "This test uses `LocalFileSystemDataProvider` as a `DocumentationWorkspaceDataProvider` which is deprecated and will be removed after 6.2 is released")
func testDiscoversSameFilesAsPreviousImplementation() throws {
let folderHierarchy = Folder(name: "one", content: [
Expand Down

0 comments on commit 0d28c07

Please sign in to comment.