Lines Matching refs:msg
39 let msg = Message2() in testProto2Basics() variable
43 msg.optionalInt32 = 100 in testProto2Basics()
44 msg.optionalString = "abc" in testProto2Basics()
45 msg.optionalEnum = .Bar in testProto2Basics()
47 msg.optionalMessage = msg2 in testProto2Basics()
49 msg.optionalGroup = msg3 in testProto2Basics()
50 msg.repeatedInt32Array.addValue(300) in testProto2Basics()
51 msg.repeatedInt32Array.addValue(301) in testProto2Basics()
52 msg.repeatedStringArray.addObject("mno") in testProto2Basics()
53 msg.repeatedStringArray.addObject("pqr") in testProto2Basics()
54 msg.repeatedEnumArray.addValue(Message2_Enum.Bar.rawValue) in testProto2Basics()
55 msg.repeatedEnumArray.addValue(Message2_Enum.Baz.rawValue) in testProto2Basics()
56 msg.mapInt32Int32.setValue(400, forKey:500) in testProto2Basics()
57 msg.mapInt32Int32.setValue(401, forKey:501) in testProto2Basics()
58 msg.mapStringString.setObject("foo", forKey:"bar") in testProto2Basics()
59 msg.mapStringString.setObject("abc", forKey:"xyz") in testProto2Basics()
60 msg.mapInt32Enum.setValue(Message2_Enum.Bar.rawValue, forKey:600) in testProto2Basics()
61 msg.mapInt32Enum.setValue(Message2_Enum.Baz.rawValue, forKey:601) in testProto2Basics()
64 XCTAssertTrue(msg.hasOptionalInt32) in testProto2Basics()
65 XCTAssertTrue(msg.hasOptionalString) in testProto2Basics()
66 XCTAssertTrue(msg.hasOptionalEnum) in testProto2Basics()
68 XCTAssertTrue(msg.hasOptionalMessage) in testProto2Basics()
70 XCTAssertTrue(msg.hasOptionalGroup) in testProto2Basics()
71 XCTAssertFalse(msg.hasOptionalInt64) in testProto2Basics()
72 XCTAssertFalse(msg.hasOptionalFloat) in testProto2Basics()
75 XCTAssertEqual(msg.optionalInt32, Int32(100)) in testProto2Basics()
76 XCTAssertEqual(msg.optionalString, "abc") in testProto2Basics()
78 XCTAssertTrue(msg.optionalMessage === msg2) in testProto2Basics()
79 XCTAssertEqual(msg.optionalEnum, Message2_Enum.Bar) in testProto2Basics()
81 XCTAssertTrue(msg.optionalGroup === msg3) in testProto2Basics()
82 XCTAssertEqual(msg.repeatedInt32Array.count, UInt(2)) in testProto2Basics()
83 XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(0), Int32(300)) in testProto2Basics()
84 XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(1), Int32(301)) in testProto2Basics()
85 XCTAssertEqual(msg.repeatedStringArray.count, Int(2)) in testProto2Basics()
86 XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as? String, "mno") in testProto2Basics()
87 XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as? String, "pqr") in testProto2Basics()
88 XCTAssertEqual(msg.repeatedEnumArray.count, UInt(2)) in testProto2Basics()
89 XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(0), Message2_Enum.Bar.rawValue) in testProto2Basics()
90 XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(1), Message2_Enum.Baz.rawValue) in testProto2Basics()
91 XCTAssertEqual(msg.repeatedInt64Array.count, UInt(0)) in testProto2Basics()
92 XCTAssertEqual(msg.mapInt32Int32.count, UInt(2)) in testProto2Basics()
94 XCTAssertTrue(msg.mapInt32Int32.valueForKey(500, value:&intValue)) in testProto2Basics()
96 XCTAssertTrue(msg.mapInt32Int32.valueForKey(501, value:&intValue)) in testProto2Basics()
98 XCTAssertEqual(msg.mapStringString.count, Int(2)) in testProto2Basics()
99 XCTAssertEqual(msg.mapStringString.objectForKey("bar") as? String, "foo") in testProto2Basics()
100 XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as? String, "abc") in testProto2Basics()
101 XCTAssertEqual(msg.mapInt32Enum.count, UInt(2)) in testProto2Basics()
102 XCTAssertTrue(msg.mapInt32Enum.valueForKey(600, value:&intValue)) in testProto2Basics()
104 XCTAssertTrue(msg.mapInt32Enum.valueForKey(601, value:&intValue)) in testProto2Basics()
113 msg.optionalGroup = nil in testProto2Basics()
114 XCTAssertFalse(msg.hasOptionalGroup) in testProto2Basics()
115 XCTAssertTrue(msg.optionalGroup !== msg3) // New instance in testProto2Basics()
118 msg.clear() in testProto2Basics()
119 XCTAssertFalse(msg.hasOptionalInt32) in testProto2Basics()
120 XCTAssertFalse(msg.hasOptionalString) in testProto2Basics()
121 XCTAssertFalse(msg.hasOptionalEnum) in testProto2Basics()
122 XCTAssertFalse(msg.hasOptionalMessage) in testProto2Basics()
123 XCTAssertFalse(msg.hasOptionalInt64) in testProto2Basics()
124 XCTAssertFalse(msg.hasOptionalFloat) in testProto2Basics()
125 XCTAssertEqual(msg.optionalInt32, Int32(0)) in testProto2Basics()
126 XCTAssertEqual(msg.optionalString, "") in testProto2Basics()
127 XCTAssertTrue(msg.optionalMessage !== msg2) // New instance in testProto2Basics()
128 XCTAssertEqual(msg.optionalEnum, Message2_Enum.Foo) // Default in testProto2Basics()
129 XCTAssertEqual(msg.repeatedInt32Array.count, UInt(0)) in testProto2Basics()
130 XCTAssertEqual(msg.repeatedStringArray.count, Int(0)) in testProto2Basics()
131 XCTAssertEqual(msg.repeatedEnumArray.count, UInt(0)) in testProto2Basics()
132 XCTAssertEqual(msg.mapInt32Int32.count, UInt(0)) in testProto2Basics()
133 XCTAssertEqual(msg.mapStringString.count, Int(0)) in testProto2Basics()
134 XCTAssertEqual(msg.mapInt32Enum.count, UInt(0)) in testProto2Basics()
138 let msg = Message3() in testProto3Basics() variable
141 msg.optionalInt32 = 100 in testProto3Basics()
142 msg.optionalString = "abc" in testProto3Basics()
143 msg.optionalEnum = .Bar in testProto3Basics()
145 msg.optionalMessage = msg2 in testProto3Basics()
146 msg.repeatedInt32Array.addValue(300) in testProto3Basics()
147 msg.repeatedInt32Array.addValue(301) in testProto3Basics()
148 msg.repeatedStringArray.addObject("mno") in testProto3Basics()
149 msg.repeatedStringArray.addObject("pqr") in testProto3Basics()
151 msg.repeatedEnumArray.addValue(Message3_Enum.Bar.rawValue) in testProto3Basics()
152 msg.repeatedEnumArray.addRawValue(666) in testProto3Basics()
154 msg.mapInt32Int32.setValue(400, forKey:500) in testProto3Basics()
155 msg.mapInt32Int32.setValue(401, forKey:501) in testProto3Basics()
156 msg.mapStringString.setObject("foo", forKey:"bar") in testProto3Basics()
157 msg.mapStringString.setObject("abc", forKey:"xyz") in testProto3Basics()
158 msg.mapInt32Enum.setValue(Message2_Enum.Bar.rawValue, forKey:600) in testProto3Basics()
160 msg.mapInt32Enum.setRawValue(666, forKey:601) in testProto3Basics()
163 XCTAssertTrue(msg.hasOptionalMessage) in testProto3Basics()
167 XCTAssertEqual(msg.optionalInt32, Int32(100)) in testProto3Basics()
168 XCTAssertEqual(msg.optionalString, "abc") in testProto3Basics()
170 XCTAssertTrue(msg.optionalMessage === msg2) in testProto3Basics()
171 XCTAssertEqual(msg.optionalEnum, Message3_Enum.Bar) in testProto3Basics()
172 XCTAssertEqual(msg.repeatedInt32Array.count, UInt(2)) in testProto3Basics()
173 XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(0), Int32(300)) in testProto3Basics()
174 XCTAssertEqual(msg.repeatedInt32Array.valueAtIndex(1), Int32(301)) in testProto3Basics()
175 XCTAssertEqual(msg.repeatedStringArray.count, Int(2)) in testProto3Basics()
176 XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(0) as? String, "mno") in testProto3Basics()
177 XCTAssertEqual(msg.repeatedStringArray.objectAtIndex(1) as? String, "pqr") in testProto3Basics()
178 XCTAssertEqual(msg.repeatedInt64Array.count, UInt(0)) in testProto3Basics()
179 XCTAssertEqual(msg.repeatedEnumArray.count, UInt(2)) in testProto3Basics()
180 XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(0), Message3_Enum.Bar.rawValue) in testProto3Basics()
181 …XCTAssertEqual(msg.repeatedEnumArray.valueAtIndex(1), Message3_Enum.GPBUnrecognizedEnumeratorValue… in testProto3Basics()
182 XCTAssertEqual(msg.repeatedEnumArray.rawValueAtIndex(1), 666) in testProto3Basics()
185 XCTAssertEqual(msg.mapInt32Int32.count, UInt(2)) in testProto3Basics()
187 XCTAssertTrue(msg.mapInt32Int32.valueForKey(500, value:&intValue)) in testProto3Basics()
189 XCTAssertTrue(msg.mapInt32Int32.valueForKey(501, value:&intValue)) in testProto3Basics()
191 XCTAssertEqual(msg.mapStringString.count, Int(2)) in testProto3Basics()
192 XCTAssertEqual(msg.mapStringString.objectForKey("bar") as? String, "foo") in testProto3Basics()
193 XCTAssertEqual(msg.mapStringString.objectForKey("xyz") as? String, "abc") in testProto3Basics()
194 XCTAssertEqual(msg.mapInt32Enum.count, UInt(2)) in testProto3Basics()
195 XCTAssertTrue(msg.mapInt32Enum.valueForKey(600, value:&intValue)) in testProto3Basics()
197 XCTAssertTrue(msg.mapInt32Enum.valueForKey(601, value:&intValue)) in testProto3Basics()
199 XCTAssertTrue(msg.mapInt32Enum.valueForKey(601, rawValue:&intValue)) in testProto3Basics()
207 msg.optionalMessage = nil in testProto3Basics()
208 XCTAssertFalse(msg.hasOptionalMessage) in testProto3Basics()
209 XCTAssertTrue(msg.optionalMessage !== msg2) // New instance in testProto3Basics()
212 msg.clear() in testProto3Basics()
213 XCTAssertFalse(msg.hasOptionalMessage) in testProto3Basics()
214 XCTAssertEqual(msg.optionalInt32, Int32(0)) in testProto3Basics()
215 XCTAssertEqual(msg.optionalString, "") in testProto3Basics()
216 XCTAssertTrue(msg.optionalMessage !== msg2) // New instance in testProto3Basics()
217 XCTAssertEqual(msg.optionalEnum, Message3_Enum.Foo) // Default in testProto3Basics()
218 XCTAssertEqual(msg.repeatedInt32Array.count, UInt(0)) in testProto3Basics()
219 XCTAssertEqual(msg.repeatedStringArray.count, Int(0)) in testProto3Basics()
220 XCTAssertEqual(msg.repeatedEnumArray.count, UInt(0)) in testProto3Basics()
224 XCTAssertEqual(msg.mapInt32Int32.count, UInt(0)) in testProto3Basics()
225 XCTAssertEqual(msg.mapStringString.count, Int(0)) in testProto3Basics()
226 XCTAssertEqual(msg.mapInt32Enum.count, UInt(0)) in testProto3Basics()
230 let msg = Message2() in testAutoCreation() variable
232 XCTAssertFalse(msg.hasOptionalGroup) in testAutoCreation()
233 XCTAssertFalse(msg.hasOptionalMessage) in testAutoCreation()
236 let msg2 = msg.optionalGroup in testAutoCreation()
237 let msg3 = msg.optionalMessage.optionalMessage in testAutoCreation()
238 let msg4 = msg.optionalMessage in testAutoCreation()
241 XCTAssertFalse(msg.hasOptionalGroup) in testAutoCreation()
242 XCTAssertFalse(msg.optionalMessage.hasOptionalMessage) in testAutoCreation()
243 XCTAssertFalse(msg.hasOptionalMessage) in testAutoCreation()
246 msg.optionalGroup.a = 10 in testAutoCreation()
247 msg.optionalMessage.optionalMessage.optionalInt32 = 100 in testAutoCreation()
248 XCTAssertTrue(msg.hasOptionalGroup) in testAutoCreation()
249 XCTAssertTrue(msg.optionalMessage.hasOptionalMessage) in testAutoCreation()
250 XCTAssertTrue(msg.hasOptionalMessage) in testAutoCreation()
253 XCTAssertTrue(msg2 === msg.optionalGroup) in testAutoCreation()
254 XCTAssertTrue(msg3 === msg.optionalMessage.optionalMessage) in testAutoCreation()
255 XCTAssertTrue(msg4 === msg.optionalMessage) in testAutoCreation()
258 msg.clear() in testAutoCreation()
259 XCTAssertFalse(msg.hasOptionalGroup) in testAutoCreation()
260 XCTAssertFalse(msg.optionalMessage.hasOptionalMessage) in testAutoCreation()
261 XCTAssertFalse(msg.hasOptionalMessage) in testAutoCreation()
262 msg.optionalGroup.a = 20 in testAutoCreation()
263 msg.optionalMessage.optionalMessage.optionalInt32 = 200 in testAutoCreation()
264 XCTAssertTrue(msg.hasOptionalGroup) in testAutoCreation()
265 XCTAssertTrue(msg.optionalMessage.hasOptionalMessage) in testAutoCreation()
266 XCTAssertTrue(msg.hasOptionalMessage) in testAutoCreation()
267 XCTAssertTrue(msg2 !== msg.optionalGroup) in testAutoCreation()
268 XCTAssertTrue(msg3 !== msg.optionalMessage.optionalMessage) in testAutoCreation()
269 XCTAssertTrue(msg4 !== msg.optionalMessage) in testAutoCreation()
272 msg.clear() in testAutoCreation()
273 let autoCreated = msg.optionalMessage in testAutoCreation()
274 XCTAssertFalse(msg.hasOptionalMessage) in testAutoCreation()
277 msg.optionalMessage = msg5 in testAutoCreation()
278 XCTAssertTrue(msg.hasOptionalMessage) in testAutoCreation()
281 XCTAssertTrue(msg.hasOptionalMessage) in testAutoCreation()
282 XCTAssertTrue(msg.optionalMessage === msg5) in testAutoCreation()
283 XCTAssertEqual(msg.optionalMessage.optionalInt32, Int32(123)) in testAutoCreation()
287 let msg = Message2() in testProto2OneOfSupport() variable
289 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.GPBUnsetOneOfCase) in testProto2OneOfSupport()
290 XCTAssertEqual(msg.oneofInt32, Int32(100)) // Default in testProto2OneOfSupport()
291 XCTAssertEqual(msg.oneofFloat, Float(110.0)) // Default in testProto2OneOfSupport()
292 XCTAssertEqual(msg.oneofEnum, Message2_Enum.Baz) // Default in testProto2OneOfSupport()
293 let autoCreated = msg.oneofMessage // Default create one. in testProto2OneOfSupport()
295 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.GPBUnsetOneOfCase) in testProto2OneOfSupport()
297 msg.oneofInt32 = 10 in testProto2OneOfSupport()
298 XCTAssertEqual(msg.oneofInt32, Int32(10)) in testProto2OneOfSupport()
299 XCTAssertEqual(msg.oneofFloat, Float(110.0)) // Default in testProto2OneOfSupport()
300 XCTAssertEqual(msg.oneofEnum, Message2_Enum.Baz) // Default in testProto2OneOfSupport()
301 XCTAssertTrue(msg.oneofMessage === autoCreated) // Still the same in testProto2OneOfSupport()
302 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.OneofInt32) in testProto2OneOfSupport()
304 msg.oneofFloat = 20.0 in testProto2OneOfSupport()
305 XCTAssertEqual(msg.oneofInt32, Int32(100)) // Default in testProto2OneOfSupport()
306 XCTAssertEqual(msg.oneofFloat, Float(20.0)) in testProto2OneOfSupport()
307 XCTAssertEqual(msg.oneofEnum, Message2_Enum.Baz) // Default in testProto2OneOfSupport()
308 XCTAssertTrue(msg.oneofMessage === autoCreated) // Still the same in testProto2OneOfSupport()
309 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.OneofFloat) in testProto2OneOfSupport()
311 msg.oneofEnum = .Bar in testProto2OneOfSupport()
312 XCTAssertEqual(msg.oneofInt32, Int32(100)) // Default in testProto2OneOfSupport()
313 XCTAssertEqual(msg.oneofFloat, Float(110.0)) // Default in testProto2OneOfSupport()
314 XCTAssertEqual(msg.oneofEnum, Message2_Enum.Bar) in testProto2OneOfSupport()
315 XCTAssertTrue(msg.oneofMessage === autoCreated) // Still the same in testProto2OneOfSupport()
316 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.OneofEnum) in testProto2OneOfSupport()
319 msg.oneofMessage.optionalInt32 = 200 in testProto2OneOfSupport()
320 XCTAssertEqual(msg.oneofInt32, Int32(100)) // Default in testProto2OneOfSupport()
321 XCTAssertEqual(msg.oneofFloat, Float(110.0)) // Default in testProto2OneOfSupport()
322 XCTAssertEqual(msg.oneofEnum, Message2_Enum.Baz) // Default in testProto2OneOfSupport()
323 XCTAssertTrue(msg.oneofMessage === autoCreated) // Still the same in testProto2OneOfSupport()
324 XCTAssertEqual(msg.oneofMessage.optionalInt32, Int32(200)) in testProto2OneOfSupport()
325 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.OneofMessage) in testProto2OneOfSupport()
328 Message2_ClearOOneOfCase(msg) in testProto2OneOfSupport()
329 XCTAssertEqual(msg.oneofInt32, Int32(100)) // Default in testProto2OneOfSupport()
330 XCTAssertEqual(msg.oneofFloat, Float(110.0)) // Default in testProto2OneOfSupport()
331 XCTAssertEqual(msg.oneofEnum, Message2_Enum.Baz) // Default in testProto2OneOfSupport()
332 let autoCreated2 = msg.oneofMessage // Default create one in testProto2OneOfSupport()
335 XCTAssertEqual(msg.oneofMessage.optionalInt32, Int32(0)) // Default in testProto2OneOfSupport()
336 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.GPBUnsetOneOfCase) in testProto2OneOfSupport()
338 msg.oneofInt32 = 10 in testProto2OneOfSupport()
339 XCTAssertEqual(msg.oneofInt32, Int32(10)) in testProto2OneOfSupport()
340 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.OneofInt32) in testProto2OneOfSupport()
343 msg.clear() in testProto2OneOfSupport()
344 XCTAssertEqual(msg.oneofInt32, Int32(100)) // Default in testProto2OneOfSupport()
345 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.GPBUnsetOneOfCase) in testProto2OneOfSupport()
348 msg.oneofMessage.optionalInt32 = 300 in testProto2OneOfSupport()
349 XCTAssertTrue(msg.oneofMessage !== autoCreated) // New instance in testProto2OneOfSupport()
350 XCTAssertTrue(msg.oneofMessage !== autoCreated2) // New instance in testProto2OneOfSupport()
351 XCTAssertEqual(msg.oneofMessage.optionalInt32, Int32(300)) in testProto2OneOfSupport()
352 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.OneofMessage) in testProto2OneOfSupport()
355 msg.oneofMessage = nil in testProto2OneOfSupport()
356 XCTAssertEqual(msg.oneofMessage.optionalInt32, Int32(0)) // Default in testProto2OneOfSupport()
357 XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase.GPBUnsetOneOfCase) in testProto2OneOfSupport()
361 let msg = Message3() in testProto3OneOfSupport() variable
363 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.GPBUnsetOneOfCase) in testProto3OneOfSupport()
364 XCTAssertEqual(msg.oneofInt32, Int32(0)) // Default in testProto3OneOfSupport()
365 XCTAssertEqual(msg.oneofFloat, Float(0.0)) // Default in testProto3OneOfSupport()
366 XCTAssertEqual(msg.oneofEnum, Message3_Enum.Foo) // Default in testProto3OneOfSupport()
367 let autoCreated = msg.oneofMessage // Default create one. in testProto3OneOfSupport()
369 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.GPBUnsetOneOfCase) in testProto3OneOfSupport()
371 msg.oneofInt32 = 10 in testProto3OneOfSupport()
372 XCTAssertEqual(msg.oneofInt32, Int32(10)) in testProto3OneOfSupport()
373 XCTAssertEqual(msg.oneofFloat, Float(0.0)) // Default in testProto3OneOfSupport()
374 XCTAssertEqual(msg.oneofEnum, Message3_Enum.Foo) // Default in testProto3OneOfSupport()
375 XCTAssertTrue(msg.oneofMessage === autoCreated) // Still the same in testProto3OneOfSupport()
376 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.OneofInt32) in testProto3OneOfSupport()
378 msg.oneofFloat = 20.0 in testProto3OneOfSupport()
379 XCTAssertEqual(msg.oneofInt32, Int32(0)) // Default in testProto3OneOfSupport()
380 XCTAssertEqual(msg.oneofFloat, Float(20.0)) in testProto3OneOfSupport()
381 XCTAssertEqual(msg.oneofEnum, Message3_Enum.Foo) // Default in testProto3OneOfSupport()
382 XCTAssertTrue(msg.oneofMessage === autoCreated) // Still the same in testProto3OneOfSupport()
383 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.OneofFloat) in testProto3OneOfSupport()
385 msg.oneofEnum = .Bar in testProto3OneOfSupport()
386 XCTAssertEqual(msg.oneofInt32, Int32(0)) // Default in testProto3OneOfSupport()
387 XCTAssertEqual(msg.oneofFloat, Float(0.0)) // Default in testProto3OneOfSupport()
388 XCTAssertEqual(msg.oneofEnum, Message3_Enum.Bar) in testProto3OneOfSupport()
389 XCTAssertTrue(msg.oneofMessage === autoCreated) // Still the same in testProto3OneOfSupport()
390 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.OneofEnum) in testProto3OneOfSupport()
393 msg.oneofMessage.optionalInt32 = 200 in testProto3OneOfSupport()
394 XCTAssertEqual(msg.oneofInt32, Int32(0)) // Default in testProto3OneOfSupport()
395 XCTAssertEqual(msg.oneofFloat, Float(0.0)) // Default in testProto3OneOfSupport()
396 XCTAssertEqual(msg.oneofEnum, Message3_Enum.Foo) // Default in testProto3OneOfSupport()
397 XCTAssertTrue(msg.oneofMessage === autoCreated) // Still the same in testProto3OneOfSupport()
398 XCTAssertEqual(msg.oneofMessage.optionalInt32, Int32(200)) in testProto3OneOfSupport()
399 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.OneofMessage) in testProto3OneOfSupport()
402 Message3_ClearOOneOfCase(msg) in testProto3OneOfSupport()
403 XCTAssertEqual(msg.oneofInt32, Int32(0)) // Default in testProto3OneOfSupport()
404 XCTAssertEqual(msg.oneofFloat, Float(0.0)) // Default in testProto3OneOfSupport()
405 XCTAssertEqual(msg.oneofEnum, Message3_Enum.Foo) // Default in testProto3OneOfSupport()
406 let autoCreated2 = msg.oneofMessage // Default create one in testProto3OneOfSupport()
409 XCTAssertEqual(msg.oneofMessage.optionalInt32, Int32(0)) // Default in testProto3OneOfSupport()
410 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.GPBUnsetOneOfCase) in testProto3OneOfSupport()
412 msg.oneofInt32 = 10 in testProto3OneOfSupport()
413 XCTAssertEqual(msg.oneofInt32, Int32(10)) in testProto3OneOfSupport()
414 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.OneofInt32) in testProto3OneOfSupport()
417 msg.clear() in testProto3OneOfSupport()
418 XCTAssertEqual(msg.oneofInt32, Int32(0)) // Default in testProto3OneOfSupport()
419 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.GPBUnsetOneOfCase) in testProto3OneOfSupport()
422 msg.oneofMessage.optionalInt32 = 300 in testProto3OneOfSupport()
423 XCTAssertTrue(msg.oneofMessage !== autoCreated) // New instance in testProto3OneOfSupport()
424 XCTAssertTrue(msg.oneofMessage !== autoCreated2) // New instance in testProto3OneOfSupport()
425 XCTAssertEqual(msg.oneofMessage.optionalInt32, Int32(300)) in testProto3OneOfSupport()
426 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.OneofMessage) in testProto3OneOfSupport()
429 msg.oneofMessage = nil in testProto3OneOfSupport()
430 XCTAssertEqual(msg.oneofMessage.optionalInt32, Int32(0)) // Default in testProto3OneOfSupport()
431 XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase.GPBUnsetOneOfCase) in testProto3OneOfSupport()
435 let msg = Message2() in testSerialization() variable
437 msg.optionalInt32 = 100 in testSerialization()
438 msg.optionalInt64 = 101 in testSerialization()
439 msg.optionalGroup.a = 102 in testSerialization()
440 msg.repeatedStringArray.addObject("abc") in testSerialization()
441 msg.repeatedStringArray.addObject("def") in testSerialization()
442 msg.mapInt32Int32.setValue(200, forKey:300) in testSerialization()
443 msg.mapInt32Int32.setValue(201, forKey:201) in testSerialization()
444 msg.mapStringString.setObject("foo", forKey:"bar") in testSerialization()
445 msg.mapStringString.setObject("abc", forKey:"xyz") in testSerialization()
447 let data = msg.data() in testSerialization()
450 XCTAssertTrue(msg2 !== msg) // New instance in testSerialization()
451 XCTAssertEqual(msg.optionalInt32, Int32(100)) in testSerialization()
452 XCTAssertEqual(msg.optionalInt64, Int64(101)) in testSerialization()
453 XCTAssertEqual(msg.optionalGroup.a, Int32(102)) in testSerialization()
454 XCTAssertEqual(msg.repeatedStringArray.count, Int(2)) in testSerialization()
455 XCTAssertEqual(msg.mapInt32Int32.count, UInt(2)) in testSerialization()
456 XCTAssertEqual(msg.mapStringString.count, Int(2)) in testSerialization()
457 XCTAssertEqual(msg2, msg) in testSerialization()