Skip to content

Commit

Permalink
Fix warnings and errors on 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
youming-lin committed Mar 23, 2017
1 parent 2f86744 commit da20c06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/Configuration/ConfigurationManager.swift
Expand Up @@ -214,7 +214,7 @@ public class ConfigurationManager {
let fn = NSString(string: file)
let pathURL: URL

#if os(Linux)
#if os(Linux) && !swift(>=3.1)
let isAbsolutePath = fn.absolutePath
#else
let isAbsolutePath = fn.isAbsolutePath
Expand Down
2 changes: 1 addition & 1 deletion Sources/TestProgram/main.swift
Expand Up @@ -24,7 +24,7 @@ import Foundation
import Configuration

var exitCode: Int32 = 0
var testsExecuted = 0
var testsExecuted: Int32 = 0

var manager: ConfigurationManager

Expand Down
4 changes: 2 additions & 2 deletions Tests/ConfigurationTests/ConfigurationManagerTest.swift
Expand Up @@ -60,7 +60,7 @@ class ConfigurationManagerTest: XCTestCase {
// Helper function to run shell commands
// Tip from http://stackoverflow.com/a/26973384
func shell(_ args: String..., environment: [String: String] = [:]) -> (Pipe, Pipe, Int32) {
#if os(Linux)
#if os(Linux) && !swift(>=3.1)
let process = Task()
#else
let process = Process()
Expand Down Expand Up @@ -189,6 +189,6 @@ class ConfigurationManagerTest: XCTestCase {
print(output ?? "No stdout from test executable")

XCTAssertEqual(exitCode, 0, "One or more external load assertions failed")
XCTAssertEqual(error, "", "External load test has non-empty error stream: \(error)")
XCTAssertEqual(error, "", "External load test has non-empty error stream: \(String(describing: error))")
}
}

0 comments on commit da20c06

Please sign in to comment.