|
|
@ -83,8 +83,8 @@ class GPBBridgeTests: XCTestCase { |
|
|
|
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(0), Int32(300)) |
|
|
|
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(0), Int32(300)) |
|
|
|
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(1), Int32(301)) |
|
|
|
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(1), Int32(301)) |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.count, Int(2)) |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.count, Int(2)) |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as! String, "mno") |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as? String, "mno") |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as! String, "pqr") |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as? String, "pqr") |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.count, UInt(2)) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.count, UInt(2)) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(0), Message2_Enum.Bar.rawValue) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(0), Message2_Enum.Bar.rawValue) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(1), Message2_Enum.Baz.rawValue) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(1), Message2_Enum.Baz.rawValue) |
|
|
@ -96,8 +96,8 @@ class GPBBridgeTests: XCTestCase { |
|
|
|
XCTAssertTrue(msg.mapInt32Int32.valueForKey(501, value:&intValue)) |
|
|
|
XCTAssertTrue(msg.mapInt32Int32.valueForKey(501, value:&intValue)) |
|
|
|
XCTAssertEqual(intValue, Int32(401)) |
|
|
|
XCTAssertEqual(intValue, Int32(401)) |
|
|
|
XCTAssertEqual(msg.mapStringString.count, Int(2)) |
|
|
|
XCTAssertEqual(msg.mapStringString.count, Int(2)) |
|
|
|
XCTAssertEqual(msg.mapStringString.objectForKey("bar") as! String, "foo") |
|
|
|
XCTAssertEqual(msg.mapStringString.objectForKey("bar") as? String, "foo") |
|
|
|
XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as! String, "abc") |
|
|
|
XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as? String, "abc") |
|
|
|
XCTAssertEqual(msg.mapInt32Enum.count, UInt(2)) |
|
|
|
XCTAssertEqual(msg.mapInt32Enum.count, UInt(2)) |
|
|
|
XCTAssertTrue(msg.mapInt32Enum.valueForKey(600, value:&intValue)) |
|
|
|
XCTAssertTrue(msg.mapInt32Enum.valueForKey(600, value:&intValue)) |
|
|
|
XCTAssertEqual(intValue, Message2_Enum.Bar.rawValue) |
|
|
|
XCTAssertEqual(intValue, Message2_Enum.Bar.rawValue) |
|
|
@ -173,8 +173,8 @@ class GPBBridgeTests: XCTestCase { |
|
|
|
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(0), Int32(300)) |
|
|
|
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(0), Int32(300)) |
|
|
|
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(1), Int32(301)) |
|
|
|
XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(1), Int32(301)) |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.count, Int(2)) |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.count, Int(2)) |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as! String, "mno") |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as? String, "mno") |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as! String, "pqr") |
|
|
|
XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as? String, "pqr") |
|
|
|
XCTAssertEqual(msg.repeatedInt64Array.count, UInt(0)) |
|
|
|
XCTAssertEqual(msg.repeatedInt64Array.count, UInt(0)) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.count, UInt(2)) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.count, UInt(2)) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(0), Message3_Enum.Bar.rawValue) |
|
|
|
XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(0), Message3_Enum.Bar.rawValue) |
|
|
@ -189,8 +189,8 @@ class GPBBridgeTests: XCTestCase { |
|
|
|
XCTAssertTrue(msg.mapInt32Int32.valueForKey(501, value:&intValue)) |
|
|
|
XCTAssertTrue(msg.mapInt32Int32.valueForKey(501, value:&intValue)) |
|
|
|
XCTAssertEqual(intValue, Int32(401)) |
|
|
|
XCTAssertEqual(intValue, Int32(401)) |
|
|
|
XCTAssertEqual(msg.mapStringString.count, Int(2)) |
|
|
|
XCTAssertEqual(msg.mapStringString.count, Int(2)) |
|
|
|
XCTAssertEqual(msg.mapStringString.objectForKey("bar") as! String, "foo") |
|
|
|
XCTAssertEqual(msg.mapStringString.objectForKey("bar") as? String, "foo") |
|
|
|
XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as! String, "abc") |
|
|
|
XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as? String, "abc") |
|
|
|
XCTAssertEqual(msg.mapInt32Enum.count, UInt(2)) |
|
|
|
XCTAssertEqual(msg.mapInt32Enum.count, UInt(2)) |
|
|
|
XCTAssertTrue(msg.mapInt32Enum.valueForKey(600, value:&intValue)) |
|
|
|
XCTAssertTrue(msg.mapInt32Enum.valueForKey(600, value:&intValue)) |
|
|
|
XCTAssertEqual(intValue, Message2_Enum.Bar.rawValue) |
|
|
|
XCTAssertEqual(intValue, Message2_Enum.Bar.rawValue) |
|
|
|