File tree 6 files changed +29
-10
lines changed
6 files changed +29
-10
lines changed Original file line number Diff line number Diff line change @@ -16,21 +16,37 @@ matrix:
16
16
osx_image : xcode9.4
17
17
- os : osx
18
18
env : TYPE=macos
19
- osx_image : xcode10
19
+ osx_image : xcode10.1
20
20
- os : osx
21
21
env :
22
22
- TYPE=swiftpm
23
23
- os : osx
24
24
env :
25
25
- TYPE=swiftpm
26
- osx_image : xcode10
26
+ osx_image : xcode10.1
27
27
- os : linux
28
28
dist : trusty
29
29
sudo : required
30
30
env :
31
31
- TYPE=swiftpm
32
32
install :
33
33
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
34
+ - os : linux
35
+ dist : trusty
36
+ sudo : required
37
+ env :
38
+ - TYPE=swiftpm
39
+ - SWIFT_VERSION=4.2.1
40
+ install :
41
+ - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
42
+ # - os: linux
43
+ # dist: trusty
44
+ # sudo: required
45
+ # env:
46
+ # - TYPE=swiftpm
47
+ # - SWIFT_VERSION=5.0-DEVELOPMENT-SNAPSHOT-2019-01-13-a
48
+ # install:
49
+ # - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
34
50
install :
35
51
- if [[ "$TYPE" == "podspec" ]]; then sudo gem install bundler; bundle install; fi
36
52
script :
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Foundation
3
3
4
4
/// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this
5
5
/// class' existence
6
- internal class NimbleEnvironment {
6
+ internal class NimbleEnvironment : NSObject {
7
7
static var activeInstance : NimbleEnvironment {
8
8
get {
9
9
let env = Thread . current. threadDictionary [ " NimbleEnvironment " ]
@@ -30,11 +30,14 @@ internal class NimbleEnvironment {
30
30
var suppressTVOSAssertionWarning : Bool = false
31
31
var awaiter : Awaiter
32
32
33
- init ( ) {
33
+ override init ( ) {
34
34
let timeoutQueue = DispatchQueue . global ( qos: . userInitiated)
35
35
awaiter = Awaiter (
36
36
waitLock: AssertionWaitLock ( ) ,
37
37
asyncQueue: . main,
38
- timeoutQueue: timeoutQueue)
38
+ timeoutQueue: timeoutQueue
39
+ )
40
+
41
+ super. init ( )
39
42
}
40
43
}
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import Foundation
4
4
/// as the expected instance.
5
5
public func beIdenticalTo( _ expected: Any ? ) -> Predicate < Any > {
6
6
return Predicate . define { actualExpression in
7
- #if os(Linux)
7
+ #if os(Linux) && !swift(>=4.1.50)
8
8
let actual = try actualExpression. evaluate ( ) as? AnyObject
9
9
#else
10
10
let actual = try actualExpression. evaluate ( ) as AnyObject ?
11
11
#endif
12
12
13
13
let bool : Bool
14
- #if os(Linux)
14
+ #if os(Linux) && !swift(>=4.1.50)
15
15
bool = actual === ( expected as? AnyObject ) && actual !== nil
16
16
#else
17
17
bool = actual === ( expected as AnyObject ? ) && actual !== nil
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ internal class AwaitPromiseBuilder<T> {
261
261
self . trigger. timeoutSource. resume ( )
262
262
while self . promise. asyncResult. isIncomplete ( ) {
263
263
// Stopping the run loop does not work unless we run only 1 mode
264
- #if swift(>=4.2)
264
+ #if swift(>=4.2) && (os(macOS) || os(iOS) || os(tvOS))
265
265
_ = RunLoop . current. run ( mode: . default, before: . distantFuture)
266
266
#else
267
267
_ = RunLoop . current. run ( mode: . defaultRunLoopMode, before: . distantFuture)
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import Foundation
2
2
3
3
internal func identityAsString( _ value: Any ? ) -> String {
4
4
let anyObject : AnyObject ?
5
- #if os(Linux)
5
+ #if os(Linux) && !swift(>=4.1.50)
6
6
anyObject = value as? AnyObject
7
7
#else
8
8
anyObject = value as AnyObject ?
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ function test_podspec {
84
84
85
85
function test_swiftpm {
86
86
if [ -d .build ]; then
87
- run swift build -- clean
87
+ run swift package clean
88
88
fi
89
89
run swift build && swift test
90
90
}
You can’t perform that action at this time.
0 commit comments