Skip to content

Commit

Permalink
Merge pull request #40 from zhongwuzw/master
Browse files Browse the repository at this point in the history
Fix Array bridges error && update swift3 syntax
  • Loading branch information
artman authored Jun 7, 2017
2 parents 38cc5d3 + dec651b commit e1cfb9a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7.2
osx_image: xcode8
env:
global:
- LC_CTYPE=en_US.UTF-8
Expand All @@ -15,10 +15,6 @@ env:
- WATCHOS_SDK=watchsimulator2.1

matrix:
- DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=8.2,name=iPhone 5" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=8.3,name=iPhone 5S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.0,name=iPhone 6 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.1,name=iPhone 6S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.2,name=iPhone 6S Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
Expand Down
4 changes: 4 additions & 0 deletions UberSignals.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@
SDKROOT = appletvos;
SWIFT_OBJC_BRIDGING_HEADER = "UberSignalsTests/UberSignalsTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
Expand All @@ -728,6 +729,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SWIFT_OBJC_BRIDGING_HEADER = "UberSignalsTests/UberSignalsTests-Bridging-Header.h";
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Release;
Expand Down Expand Up @@ -911,6 +913,7 @@
SDKROOT = iphoneos;
SWIFT_OBJC_BRIDGING_HEADER = "UberSignalsTests/UberSignalsTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -924,6 +927,7 @@
PRODUCT_NAME = UberSignalsTests;
SDKROOT = iphoneos;
SWIFT_OBJC_BRIDGING_HEADER = "UberSignalsTests/UberSignalsTests-Bridging-Header.h";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down
4 changes: 2 additions & 2 deletions UberSignalsTests/SwiftTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SwiftTests: XCTestCase {

let signal2 = UBArraySignal()
signal2.addObserver(self) { (listener, result) in
XCTAssertEqual(result, NSArray(objects: "result"), "Should have signaled correct result")
XCTAssertEqual(result as NSArray, NSArray(objects: "result"), "Should have signaled correct result")
observed += 1
}
signal2.fire()(["result"])
Expand Down Expand Up @@ -109,7 +109,7 @@ class SwiftTests: XCTestCase {
}

observer.onSwiftSignal.fire()("1")
observer.onSwiftDoubleSignal.fire()("1", NSNumber(integer: 2))
observer.onSwiftDoubleSignal.fire()("1", 2)
XCTAssertEqual(observed, 2, "Should have fired callback")
}
}

0 comments on commit e1cfb9a

Please sign in to comment.