浏览代码

Merge pull request #446 from kbongort/FixLinuxTests

Import FoundationNetworking on Linux to fix tests.
Victor Sigler 6 年之前
父节点
当前提交
abc4a027ea
共有 4 个文件被更改,包括 11 次插入1 次删除
  1. 2 1
      CHANGELOG.md
  2. 3 0
      XCode/Tests/IOSafetyTests.swift
  3. 3 0
      XCode/Tests/PingServer.swift
  4. 3 0
      XCode/Tests/ServerThreadingTests.swift

+ 2 - 1
CHANGELOG.md

@@ -30,7 +30,8 @@ All notable changes to this project will be documented in this file. Changes not
 - Update `HttpParser` so it percent-encodes the URL components before initializing `URLComponents`. ([#423](https://github.com/httpswift/swifter/pull/423)) by [@nejcvivod](https://github.com/nejcvivod)
 - Update `SwifterTestsHttpParser` with a test for parsing bracketed query strings. ([#423](https://github.com/httpswift/swifter/pull/423)) by [@nejcvivod](https://github.com/nejcvivod)
 - Use `swift_version` CocoaPods DSL. ([#425](https://github.com/httpswift/swifter/pull/425)) by [@dnkoutso](https://github.com/dnkoutso)
-- Fix compiler warnings in Socket+File.swift for iOS, tvOS, and Linux platforms by using `withUnsafeBytes` rather than `&` to get a scoped UnsafeRawPointer.
+- Fix compiler warnings in Socket+File.swift for iOS, tvOS, and Linux platforms by using `withUnsafeBytes` rather than `&` to get a scoped UnsafeRawPointer ([#445](https://github.com/httpswift/swifter/pull/445)) by [@kbongort](https://github.com/kbongort).
+- Fix tests on linux by importing FoundationNetworking for NSURLSession APIs. ([#446](https://github.com/httpswift/swifter/pull/446)) by [@kbongort](https://github.com/kbongort)
 
 # [1.4.7] 
 

+ 3 - 0
XCode/Tests/IOSafetyTests.swift

@@ -7,6 +7,9 @@
 //
 
 import XCTest
+#if os(Linux)
+import FoundationNetworking
+#endif
 @testable import Swifter
 
 class IOSafetyTests: XCTestCase {

+ 3 - 0
XCode/Tests/PingServer.swift

@@ -7,6 +7,9 @@
 //
 
 import Foundation
+#if os(Linux)
+import FoundationNetworking
+#endif
 @testable import Swifter
 
 // Server

+ 3 - 0
XCode/Tests/ServerThreadingTests.swift

@@ -7,6 +7,9 @@
 //
 
 import XCTest
+#if os(Linux)
+import FoundationNetworking
+#endif
 @testable import Swifter
 
 class ServerThreadingTests: XCTestCase {