Skip to content

Tests: treat Windows as Linux #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DocumentationSchemeHandlerTests: XCTestCase {
forResource: "TestBundle", withExtension: "docc", subdirectory: "Test Bundles")!

func testDocumentationSchemeHandler() {
#if !os(Linux) && !os(Android)
#if !os(Linux) && !os(Android) && !os(Windows)
let topicSchemeHandler = DocumentationSchemeHandler(withTemplateURL: templateURL)

let request = URLRequest(url: baseURL.appendingPathComponent("/images/figure1.jpg"))
Expand All @@ -50,7 +50,7 @@ class DocumentationSchemeHandlerTests: XCTestCase {
}

func testSetData() {
#if !os(Linux) && !os(Android)
#if !os(Linux) && !os(Android) && !os(Windows)
let topicSchemeHandler = DocumentationSchemeHandler(withTemplateURL: templateURL)

let data = "hello!".data(using: .utf8)!
Expand Down
10 changes: 5 additions & 5 deletions Tests/SwiftDocCUtilitiesTests/DirectoryMonitorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import XCTest
@testable import SwiftDocCUtilities

#if !os(Linux) && !os(Android)
#if !os(Linux) && !os(Android) && !os(Windows)
fileprivate extension NSNotification.Name {
static let testNodeUpdated = NSNotification.Name(rawValue: "testNodeUpdated")
static let testDirectoryReloaded = NSNotification.Name(rawValue: "testDirectoryReloaded")
Expand All @@ -24,7 +24,7 @@ func fileURLsAreEqual(_ url1: URL, _ url2: URL) -> Bool {
#endif

class DirectoryMonitorTests: XCTestCase {
#if !os(Linux) && !os(Android)
#if !os(Linux) && !os(Android) && !os(Windows)
// - MARK: Directory watching test infra

/// Method that automates setting up a directory monitor, setting up the relevant expectations for a test,
Expand Down Expand Up @@ -118,7 +118,7 @@ class DirectoryMonitorTests: XCTestCase {
/// Tests a succession of file system changes and verifies that they produce
/// the expected monitor events.
func testMonitorUpdates() throws {
#if !os(Linux) && !os(Android)
#if !os(Linux) && !os(Android) && !os(Windows)

// Create temp folder & sub-folder.
let tempSubfolderURL = try createTemporaryDirectory(named: "subfolder")
Expand Down Expand Up @@ -167,7 +167,7 @@ class DirectoryMonitorTests: XCTestCase {
}

func testMonitorDoesNotTriggerUpdates() throws {
#if !os(Linux) && !os(Android)
#if !os(Linux) && !os(Android) && !os(Windows)

// Create temp folder & sub-folder.
let tempSubfolderURL = try createTemporaryDirectory(named: "subfolder")
Expand Down Expand Up @@ -200,7 +200,7 @@ class DirectoryMonitorTests: XCTestCase {

/// Tests a zero sum change aggregation triggers an event.
func testMonitorZeroSumSizeChangesUpdates() throws {
#if !os(Linux) && !os(Android)
#if !os(Linux) && !os(Android) && !os(Windows)

// Create temp folder & sub-folder.
let tempSubfolderURL = try createTemporaryDirectory(named: "subfolder")
Expand Down