aboutsummaryrefslogtreecommitdiff
path: root/objectivec/Tests
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2015-12-10 15:49:53 -0500
committerThomas Van Lenten <thomasvl@google.com>2015-12-10 16:40:10 -0500
commit938ba4103934db7459a920ca0cd96f0fd3953695 (patch)
tree94fc5e48edf2dcd9e298f4b450e016687d2ac099 /objectivec/Tests
parent2f2da0702db0aab16f473a86b28de854e5740295 (diff)
downloadprotobuf-938ba4103934db7459a920ca0cd96f0fd3953695.tar.gz
protobuf-938ba4103934db7459a920ca0cd96f0fd3953695.tar.bz2
protobuf-938ba4103934db7459a920ca0cd96f0fd3953695.zip
Update the min toolchain for iOS/OS X to be Xcode 7
- Let Xcode update the projects, schemes, and info.plists. - Add workaround for shallow analyzer issues in current Xcode versions (deep analyze gets things correct). - Tweak the Swift based tests to avoid warnings from Xcode 7's XCTest using optionals for autoenclosure results. - No longer tag the ObjC iOS travis test as flaky, xctool seems to manage the simulator pretty well.
Diffstat (limited to 'objectivec/Tests')
-rw-r--r--objectivec/Tests/GPBSwiftTests.swift16
-rw-r--r--objectivec/Tests/UnitTests-Info.plist2
-rw-r--r--objectivec/Tests/iOSTestHarness/Info.plist2
3 files changed, 10 insertions, 10 deletions
diff --git a/objectivec/Tests/GPBSwiftTests.swift b/objectivec/Tests/GPBSwiftTests.swift
index 5fbe74fd..36ed2a62 100644
--- a/objectivec/Tests/GPBSwiftTests.swift
+++ b/objectivec/Tests/GPBSwiftTests.swift
@@ -83,8 +83,8 @@ class GPBBridgeTests: XCTestCase {
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(0), Int32(300))
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(1), Int32(301))
XCTAssertEqual(msg.repeatedStringArray.count, Int(2))
- XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as! String, "mno")
- XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as! String, "pqr")
+ XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as? String, "mno")
+ XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as? String, "pqr")
XCTAssertEqual(msg.repeatedEnumArray.count, UInt(2))
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(0), Message2_Enum.Bar.rawValue)
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(1), Message2_Enum.Baz.rawValue)
@@ -96,8 +96,8 @@ class GPBBridgeTests: XCTestCase {
XCTAssertTrue(msg.mapInt32Int32.valueForKey(501, value:&intValue))
XCTAssertEqual(intValue, Int32(401))
XCTAssertEqual(msg.mapStringString.count, Int(2))
- XCTAssertEqual(msg.mapStringString.objectForKey("bar") as! String, "foo")
- XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as! String, "abc")
+ XCTAssertEqual(msg.mapStringString.objectForKey("bar") as? String, "foo")
+ XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as? String, "abc")
XCTAssertEqual(msg.mapInt32Enum.count, UInt(2))
XCTAssertTrue(msg.mapInt32Enum.valueForKey(600, value:&intValue))
XCTAssertEqual(intValue, Message2_Enum.Bar.rawValue)
@@ -173,8 +173,8 @@ class GPBBridgeTests: XCTestCase {
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(0), Int32(300))
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(1), Int32(301))
XCTAssertEqual(msg.repeatedStringArray.count, Int(2))
- XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as! String, "mno")
- XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as! String, "pqr")
+ XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as? String, "mno")
+ XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as? String, "pqr")
XCTAssertEqual(msg.repeatedInt64Array.count, UInt(0))
XCTAssertEqual(msg.repeatedEnumArray.count, UInt(2))
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(0), Message3_Enum.Bar.rawValue)
@@ -189,8 +189,8 @@ class GPBBridgeTests: XCTestCase {
XCTAssertTrue(msg.mapInt32Int32.valueForKey(501, value:&intValue))
XCTAssertEqual(intValue, Int32(401))
XCTAssertEqual(msg.mapStringString.count, Int(2))
- XCTAssertEqual(msg.mapStringString.objectForKey("bar") as! String, "foo")
- XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as! String, "abc")
+ XCTAssertEqual(msg.mapStringString.objectForKey("bar") as? String, "foo")
+ XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as? String, "abc")
XCTAssertEqual(msg.mapInt32Enum.count, UInt(2))
XCTAssertTrue(msg.mapInt32Enum.valueForKey(600, value:&intValue))
XCTAssertEqual(intValue, Message2_Enum.Bar.rawValue)
diff --git a/objectivec/Tests/UnitTests-Info.plist b/objectivec/Tests/UnitTests-Info.plist
index 65013556..460a7d93 100644
--- a/objectivec/Tests/UnitTests-Info.plist
+++ b/objectivec/Tests/UnitTests-Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
diff --git a/objectivec/Tests/iOSTestHarness/Info.plist b/objectivec/Tests/iOSTestHarness/Info.plist
index 31ab1578..24bd333d 100644
--- a/objectivec/Tests/iOSTestHarness/Info.plist
+++ b/objectivec/Tests/iOSTestHarness/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>com.google.${PRODUCT_NAME:rfc1034identifier}</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>