Skip to content

Commit

Permalink
Fixing unit tests for Linux
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
colemancda committed Sep 24, 2016
1 parent 96ba487 commit cf25a8e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 21 deletions.
1 change: 1 addition & 0 deletions Tests/LinuxMain.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import XCTest
@testable import UnitTests

#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
func XCTMain(_ testCases: [XCTestCaseEntry]) { fatalError("Not Implemented. Linux only") }
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/DataTests.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#endif

import XCTest
import SwiftFoundation
@testable import SwiftFoundation

final class DataTests: XCTestCase {

Expand Down
6 changes: 5 additions & 1 deletion Tests/UnitTests/DateComponentsTest.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
// Copyright © 2015 PureSwift. All rights reserved.
//

#if os(Linux)
import Glibc
#endif

import XCTest
import SwiftFoundation
@testable import SwiftFoundation

final class DateComponentsTest: XCTestCase {

Expand Down
6 changes: 5 additions & 1 deletion Tests/UnitTests/JSONTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
// Copyright © 2015 PureSwift. All rights reserved.
//

#if os(Linux)
import Glibc
#endif

import XCTest
import SwiftFoundation
@testable import SwiftFoundation

final class JSONTests: XCTestCase {

Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/POSIXTimeTests.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#endif

import XCTest
import SwiftFoundation
@testable import SwiftFoundation

final class POSIXTimeTests: XCTestCase {

Expand Down
8 changes: 6 additions & 2 deletions Tests/UnitTests/RangeTests.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
// Copyright © 2016 PureSwift. All rights reserved.
//

#if os(Linux)
import Glibc
#endif

import XCTest
import SwiftFoundation
@testable import SwiftFoundation

final class RangeTests: XCTestCase {

Expand Down Expand Up @@ -57,4 +61,4 @@ private extension Range where Bound: Integer {

return true
}
}
}
18 changes: 5 additions & 13 deletions Tests/UnitTests/RegularExpressionTests.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
// Copyright © 2015 PureSwift. All rights reserved.
//

#if os(Linux)
import Glibc
#endif

import XCTest
import SwiftFoundation
import Foundation
@testable import SwiftFoundation

final class RegularExpressionTests: XCTestCase {

Expand Down Expand Up @@ -124,15 +128,3 @@ final class RegularExpressionTests: XCTestCase {
}
}
}

#if os(Linux)

extension NSRange {

init(_ range: Range<Int>) {

self = NSRange(CountableRange(range))
}
}

#endif
5 changes: 5 additions & 0 deletions Tests/UnitTests/StringTests.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
// Copyright © 2015 PureSwift. All rights reserved.
//

#if os(Linux)
import Glibc
#endif

import XCTest
@testable import SwiftFoundation

final class StringTests: XCTestCase {

Expand Down
7 changes: 5 additions & 2 deletions Tests/UnitTests/UUIDTests.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
// Copyright © 2015 PureSwift. All rights reserved.
//

#if os(Linux)
import Glibc
#endif

import XCTest
import SwiftFoundation
import SwiftFoundation
@testable import SwiftFoundation

final class UUIDTests: XCTestCase {

Expand Down

0 comments on commit cf25a8e

Please sign in to comment.