• Home
  • Raw
  • Download

Lines Matching refs:message

17             var message = new TestAllTypes();  in DefaultProto2Values()
18 Assert.AreEqual(false, message.OptionalBool); in DefaultProto2Values()
19 Assert.AreEqual(ByteString.Empty, message.OptionalBytes); in DefaultProto2Values()
20 Assert.AreEqual(0.0, message.OptionalDouble); in DefaultProto2Values()
21 Assert.AreEqual(0, message.OptionalFixed32); in DefaultProto2Values()
22 Assert.AreEqual(0L, message.OptionalFixed64); in DefaultProto2Values()
23 Assert.AreEqual(0.0f, message.OptionalFloat); in DefaultProto2Values()
24 Assert.AreEqual(ForeignEnum.ForeignFoo, message.OptionalForeignEnum); in DefaultProto2Values()
25 Assert.IsNull(message.OptionalForeignMessage); in DefaultProto2Values()
26 Assert.AreEqual(ImportEnum.ImportFoo, message.OptionalImportEnum); in DefaultProto2Values()
27 Assert.IsNull(message.OptionalImportMessage); in DefaultProto2Values()
28 Assert.AreEqual(0, message.OptionalInt32); in DefaultProto2Values()
29 Assert.AreEqual(0L, message.OptionalInt64); in DefaultProto2Values()
30 Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Foo, message.OptionalNestedEnum); in DefaultProto2Values()
31 Assert.IsNull(message.OptionalNestedMessage); in DefaultProto2Values()
32 Assert.IsNull(message.OptionalPublicImportMessage); in DefaultProto2Values()
33 Assert.AreEqual(0, message.OptionalSfixed32); in DefaultProto2Values()
34 Assert.AreEqual(0L, message.OptionalSfixed64); in DefaultProto2Values()
35 Assert.AreEqual(0, message.OptionalSint32); in DefaultProto2Values()
36 Assert.AreEqual(0L, message.OptionalSint64); in DefaultProto2Values()
37 Assert.AreEqual("", message.OptionalString); in DefaultProto2Values()
38 Assert.AreEqual(0U, message.OptionalUint32); in DefaultProto2Values()
39 Assert.AreEqual(0UL, message.OptionalUint64); in DefaultProto2Values()
42 Assert.AreEqual(0, message.RepeatedBool.Count); in DefaultProto2Values()
43 Assert.AreEqual(0, message.RepeatedBytes.Count); in DefaultProto2Values()
44 Assert.AreEqual(0, message.RepeatedDouble.Count); in DefaultProto2Values()
45 Assert.AreEqual(0, message.RepeatedFixed32.Count); in DefaultProto2Values()
46 Assert.AreEqual(0, message.RepeatedFixed64.Count); in DefaultProto2Values()
47 Assert.AreEqual(0, message.RepeatedFloat.Count); in DefaultProto2Values()
48 Assert.AreEqual(0, message.RepeatedForeignEnum.Count); in DefaultProto2Values()
49 Assert.AreEqual(0, message.RepeatedForeignMessage.Count); in DefaultProto2Values()
50 Assert.AreEqual(0, message.RepeatedImportEnum.Count); in DefaultProto2Values()
51 Assert.AreEqual(0, message.RepeatedImportMessage.Count); in DefaultProto2Values()
52 Assert.AreEqual(0, message.RepeatedNestedEnum.Count); in DefaultProto2Values()
53 Assert.AreEqual(0, message.RepeatedNestedMessage.Count); in DefaultProto2Values()
54 Assert.AreEqual(0, message.RepeatedSfixed32.Count); in DefaultProto2Values()
55 Assert.AreEqual(0, message.RepeatedSfixed64.Count); in DefaultProto2Values()
56 Assert.AreEqual(0, message.RepeatedSint32.Count); in DefaultProto2Values()
57 Assert.AreEqual(0, message.RepeatedSint64.Count); in DefaultProto2Values()
58 Assert.AreEqual(0, message.RepeatedString.Count); in DefaultProto2Values()
59 Assert.AreEqual(0, message.RepeatedUint32.Count); in DefaultProto2Values()
60 Assert.AreEqual(0, message.RepeatedUint64.Count); in DefaultProto2Values()
63 Assert.AreEqual(Proto2.TestAllTypes.OneofFieldOneofCase.None, message.OneofFieldCase); in DefaultProto2Values()
64 Assert.AreEqual(0, message.OneofUint32); in DefaultProto2Values()
65 Assert.AreEqual("", message.OneofString); in DefaultProto2Values()
66 Assert.AreEqual(ByteString.Empty, message.OneofBytes); in DefaultProto2Values()
67 Assert.IsNull(message.OneofNestedMessage); in DefaultProto2Values()
69 Assert.AreEqual(true, message.DefaultBool); in DefaultProto2Values()
70 Assert.AreEqual(ByteString.CopyFromUtf8("world"), message.DefaultBytes); in DefaultProto2Values()
71 Assert.AreEqual("123", message.DefaultCord); in DefaultProto2Values()
72 Assert.AreEqual(52e3, message.DefaultDouble); in DefaultProto2Values()
73 Assert.AreEqual(47, message.DefaultFixed32); in DefaultProto2Values()
74 Assert.AreEqual(48, message.DefaultFixed64); in DefaultProto2Values()
75 Assert.AreEqual(51.5, message.DefaultFloat); in DefaultProto2Values()
76 Assert.AreEqual(ForeignEnum.ForeignBar, message.DefaultForeignEnum); in DefaultProto2Values()
77 Assert.AreEqual(ImportEnum.ImportBar, message.DefaultImportEnum); in DefaultProto2Values()
78 Assert.AreEqual(41, message.DefaultInt32); in DefaultProto2Values()
79 Assert.AreEqual(42, message.DefaultInt64); in DefaultProto2Values()
80 Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Bar, message.DefaultNestedEnum); in DefaultProto2Values()
81 Assert.AreEqual(49, message.DefaultSfixed32); in DefaultProto2Values()
82 Assert.AreEqual(-50, message.DefaultSfixed64); in DefaultProto2Values()
83 Assert.AreEqual(-45, message.DefaultSint32); in DefaultProto2Values()
84 Assert.AreEqual(46, message.DefaultSint64); in DefaultProto2Values()
85 Assert.AreEqual("hello", message.DefaultString); in DefaultProto2Values()
86 Assert.AreEqual("abc", message.DefaultStringPiece); in DefaultProto2Values()
87 Assert.AreEqual(43, message.DefaultUint32); in DefaultProto2Values()
88 Assert.AreEqual(44, message.DefaultUint64); in DefaultProto2Values()
90 Assert.False(message.HasDefaultBool); in DefaultProto2Values()
91 Assert.False(message.HasDefaultBytes); in DefaultProto2Values()
92 Assert.False(message.HasDefaultCord); in DefaultProto2Values()
93 Assert.False(message.HasDefaultDouble); in DefaultProto2Values()
94 Assert.False(message.HasDefaultFixed32); in DefaultProto2Values()
95 Assert.False(message.HasDefaultFixed64); in DefaultProto2Values()
96 Assert.False(message.HasDefaultFloat); in DefaultProto2Values()
97 Assert.False(message.HasDefaultForeignEnum); in DefaultProto2Values()
98 Assert.False(message.HasDefaultImportEnum); in DefaultProto2Values()
99 Assert.False(message.HasDefaultInt32); in DefaultProto2Values()
100 Assert.False(message.HasDefaultInt64); in DefaultProto2Values()
101 Assert.False(message.HasDefaultNestedEnum); in DefaultProto2Values()
102 Assert.False(message.HasDefaultSfixed32); in DefaultProto2Values()
103 Assert.False(message.HasDefaultSfixed64); in DefaultProto2Values()
104 Assert.False(message.HasDefaultSint32); in DefaultProto2Values()
105 Assert.False(message.HasDefaultSint64); in DefaultProto2Values()
106 Assert.False(message.HasDefaultString); in DefaultProto2Values()
107 Assert.False(message.HasDefaultStringPiece); in DefaultProto2Values()
108 Assert.False(message.HasDefaultUint32); in DefaultProto2Values()
109 Assert.False(message.HasDefaultUint64); in DefaultProto2Values()
115 var message = new TestAllExtensions(); in DefaultExtensionValues()
116 Assert.AreEqual(false, message.GetExtension(OptionalBoolExtension)); in DefaultExtensionValues()
117 Assert.AreEqual(ByteString.Empty, message.GetExtension(OptionalBytesExtension)); in DefaultExtensionValues()
118 Assert.AreEqual(0.0, message.GetExtension(OptionalDoubleExtension)); in DefaultExtensionValues()
119 Assert.AreEqual(0, message.GetExtension(OptionalFixed32Extension)); in DefaultExtensionValues()
120 Assert.AreEqual(0L, message.GetExtension(OptionalFixed64Extension)); in DefaultExtensionValues()
121 Assert.AreEqual(0.0f, message.GetExtension(OptionalFloatExtension)); in DefaultExtensionValues()
122 … Assert.AreEqual(ForeignEnum.ForeignFoo, message.GetExtension(OptionalForeignEnumExtension)); in DefaultExtensionValues()
123 Assert.IsNull(message.GetExtension(OptionalForeignMessageExtension)); in DefaultExtensionValues()
124 … Assert.AreEqual(ImportEnum.ImportFoo, message.GetExtension(OptionalImportEnumExtension)); in DefaultExtensionValues()
125 Assert.IsNull(message.GetExtension(OptionalImportMessageExtension)); in DefaultExtensionValues()
126 Assert.AreEqual(0, message.GetExtension(OptionalInt32Extension)); in DefaultExtensionValues()
127 Assert.AreEqual(0L, message.GetExtension(OptionalInt64Extension)); in DefaultExtensionValues()
128 …Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Foo, message.GetExtension(OptionalNestedEnumE… in DefaultExtensionValues()
129 Assert.IsNull(message.GetExtension(OptionalNestedMessageExtension)); in DefaultExtensionValues()
130 Assert.IsNull(message.GetExtension(OptionalPublicImportMessageExtension)); in DefaultExtensionValues()
131 Assert.AreEqual(0, message.GetExtension(OptionalSfixed32Extension)); in DefaultExtensionValues()
132 Assert.AreEqual(0L, message.GetExtension(OptionalSfixed64Extension)); in DefaultExtensionValues()
133 Assert.AreEqual(0, message.GetExtension(OptionalSint32Extension)); in DefaultExtensionValues()
134 Assert.AreEqual(0L, message.GetExtension(OptionalSint64Extension)); in DefaultExtensionValues()
135 Assert.AreEqual("", message.GetExtension(OptionalStringExtension)); in DefaultExtensionValues()
136 Assert.AreEqual(0U, message.GetExtension(OptionalUint32Extension)); in DefaultExtensionValues()
137 Assert.AreEqual(0UL, message.GetExtension(OptionalUint64Extension)); in DefaultExtensionValues()
140 Assert.IsNull(message.GetExtension(RepeatedBoolExtension)); in DefaultExtensionValues()
141 Assert.IsNull(message.GetExtension(RepeatedBytesExtension)); in DefaultExtensionValues()
142 Assert.IsNull(message.GetExtension(RepeatedDoubleExtension)); in DefaultExtensionValues()
143 Assert.IsNull(message.GetExtension(RepeatedFixed32Extension)); in DefaultExtensionValues()
144 Assert.IsNull(message.GetExtension(RepeatedFixed64Extension)); in DefaultExtensionValues()
145 Assert.IsNull(message.GetExtension(RepeatedFloatExtension)); in DefaultExtensionValues()
146 Assert.IsNull(message.GetExtension(RepeatedForeignEnumExtension)); in DefaultExtensionValues()
147 Assert.IsNull(message.GetExtension(RepeatedForeignMessageExtension)); in DefaultExtensionValues()
148 Assert.IsNull(message.GetExtension(RepeatedImportEnumExtension)); in DefaultExtensionValues()
149 Assert.IsNull(message.GetExtension(RepeatedImportMessageExtension)); in DefaultExtensionValues()
150 Assert.IsNull(message.GetExtension(RepeatedNestedEnumExtension)); in DefaultExtensionValues()
151 Assert.IsNull(message.GetExtension(RepeatedNestedMessageExtension)); in DefaultExtensionValues()
152 Assert.IsNull(message.GetExtension(RepeatedSfixed32Extension)); in DefaultExtensionValues()
153 Assert.IsNull(message.GetExtension(RepeatedSfixed64Extension)); in DefaultExtensionValues()
154 Assert.IsNull(message.GetExtension(RepeatedSint32Extension)); in DefaultExtensionValues()
155 Assert.IsNull(message.GetExtension(RepeatedSint64Extension)); in DefaultExtensionValues()
156 Assert.IsNull(message.GetExtension(RepeatedStringExtension)); in DefaultExtensionValues()
157 Assert.IsNull(message.GetExtension(RepeatedUint32Extension)); in DefaultExtensionValues()
158 Assert.IsNull(message.GetExtension(RepeatedUint64Extension)); in DefaultExtensionValues()
161 Assert.AreEqual(0, message.GetExtension(OneofUint32Extension)); in DefaultExtensionValues()
162 Assert.AreEqual("", message.GetExtension(OneofStringExtension)); in DefaultExtensionValues()
163 Assert.AreEqual(ByteString.Empty, message.GetExtension(OneofBytesExtension)); in DefaultExtensionValues()
164 Assert.IsNull(message.GetExtension(OneofNestedMessageExtension)); in DefaultExtensionValues()
166 Assert.AreEqual(true, message.GetExtension(DefaultBoolExtension)); in DefaultExtensionValues()
167 … Assert.AreEqual(ByteString.CopyFromUtf8("world"), message.GetExtension(DefaultBytesExtension)); in DefaultExtensionValues()
168 Assert.AreEqual("123", message.GetExtension(DefaultCordExtension)); in DefaultExtensionValues()
169 Assert.AreEqual(52e3, message.GetExtension(DefaultDoubleExtension)); in DefaultExtensionValues()
170 Assert.AreEqual(47, message.GetExtension(DefaultFixed32Extension)); in DefaultExtensionValues()
171 Assert.AreEqual(48, message.GetExtension(DefaultFixed64Extension)); in DefaultExtensionValues()
172 Assert.AreEqual(51.5, message.GetExtension(DefaultFloatExtension)); in DefaultExtensionValues()
173 … Assert.AreEqual(ForeignEnum.ForeignBar, message.GetExtension(DefaultForeignEnumExtension)); in DefaultExtensionValues()
174 Assert.AreEqual(ImportEnum.ImportBar, message.GetExtension(DefaultImportEnumExtension)); in DefaultExtensionValues()
175 Assert.AreEqual(41, message.GetExtension(DefaultInt32Extension)); in DefaultExtensionValues()
176 Assert.AreEqual(42, message.GetExtension(DefaultInt64Extension)); in DefaultExtensionValues()
177 …Assert.AreEqual(Proto2.TestAllTypes.Types.NestedEnum.Bar, message.GetExtension(DefaultNestedEnumEx… in DefaultExtensionValues()
178 Assert.AreEqual(49, message.GetExtension(DefaultSfixed32Extension)); in DefaultExtensionValues()
179 Assert.AreEqual(-50, message.GetExtension(DefaultSfixed64Extension)); in DefaultExtensionValues()
180 Assert.AreEqual(-45, message.GetExtension(DefaultSint32Extension)); in DefaultExtensionValues()
181 Assert.AreEqual(46, message.GetExtension(DefaultSint64Extension)); in DefaultExtensionValues()
182 Assert.AreEqual("hello", message.GetExtension(DefaultStringExtension)); in DefaultExtensionValues()
183 Assert.AreEqual("abc", message.GetExtension(DefaultStringPieceExtension)); in DefaultExtensionValues()
184 Assert.AreEqual(43, message.GetExtension(DefaultUint32Extension)); in DefaultExtensionValues()
185 Assert.AreEqual(44, message.GetExtension(DefaultUint64Extension)); in DefaultExtensionValues()
187 Assert.False(message.HasExtension(DefaultBoolExtension)); in DefaultExtensionValues()
188 Assert.False(message.HasExtension(DefaultBytesExtension)); in DefaultExtensionValues()
189 Assert.False(message.HasExtension(DefaultCordExtension)); in DefaultExtensionValues()
190 Assert.False(message.HasExtension(DefaultDoubleExtension)); in DefaultExtensionValues()
191 Assert.False(message.HasExtension(DefaultFixed32Extension)); in DefaultExtensionValues()
192 Assert.False(message.HasExtension(DefaultFixed64Extension)); in DefaultExtensionValues()
193 Assert.False(message.HasExtension(DefaultFloatExtension)); in DefaultExtensionValues()
194 Assert.False(message.HasExtension(DefaultForeignEnumExtension)); in DefaultExtensionValues()
195 Assert.False(message.HasExtension(DefaultImportEnumExtension)); in DefaultExtensionValues()
196 Assert.False(message.HasExtension(DefaultInt32Extension)); in DefaultExtensionValues()
197 Assert.False(message.HasExtension(DefaultInt64Extension)); in DefaultExtensionValues()
198 Assert.False(message.HasExtension(DefaultNestedEnumExtension)); in DefaultExtensionValues()
199 Assert.False(message.HasExtension(DefaultSfixed32Extension)); in DefaultExtensionValues()
200 Assert.False(message.HasExtension(DefaultSfixed64Extension)); in DefaultExtensionValues()
201 Assert.False(message.HasExtension(DefaultSint32Extension)); in DefaultExtensionValues()
202 Assert.False(message.HasExtension(DefaultSint64Extension)); in DefaultExtensionValues()
203 Assert.False(message.HasExtension(DefaultStringExtension)); in DefaultExtensionValues()
204 Assert.False(message.HasExtension(DefaultStringPieceExtension)); in DefaultExtensionValues()
205 Assert.False(message.HasExtension(DefaultUint32Extension)); in DefaultExtensionValues()
206 Assert.False(message.HasExtension(DefaultUint64Extension)); in DefaultExtensionValues()
212 var message = new TestAllTypes(); in FieldPresence()
214 Assert.False(message.HasOptionalBool); in FieldPresence()
215 Assert.False(message.OptionalBool); in FieldPresence()
217 message.OptionalBool = true; in FieldPresence()
219 Assert.True(message.HasOptionalBool); in FieldPresence()
220 Assert.True(message.OptionalBool); in FieldPresence()
222 message.OptionalBool = false; in FieldPresence()
224 Assert.True(message.HasOptionalBool); in FieldPresence()
225 Assert.False(message.OptionalBool); in FieldPresence()
227 message.ClearOptionalBool(); in FieldPresence()
229 Assert.False(message.HasOptionalBool); in FieldPresence()
230 Assert.False(message.OptionalBool); in FieldPresence()
232 Assert.False(message.HasDefaultBool); in FieldPresence()
233 Assert.True(message.DefaultBool); in FieldPresence()
235 message.DefaultBool = false; in FieldPresence()
237 Assert.True(message.HasDefaultBool); in FieldPresence()
238 Assert.False(message.DefaultBool); in FieldPresence()
240 message.DefaultBool = true; in FieldPresence()
242 Assert.True(message.HasDefaultBool); in FieldPresence()
243 Assert.True(message.DefaultBool); in FieldPresence()
245 message.ClearDefaultBool(); in FieldPresence()
247 Assert.False(message.HasDefaultBool); in FieldPresence()
248 Assert.True(message.DefaultBool); in FieldPresence()
254 var message = new TestRequired(); in RequiredFields()
255 Assert.False(message.IsInitialized()); in RequiredFields()
257 message.A = 1; in RequiredFields()
258 message.B = 2; in RequiredFields()
259 message.C = 3; in RequiredFields()
261 Assert.True(message.IsInitialized()); in RequiredFields()
279 var message = new TestAllExtensions(); in RequiredFieldsInExtensions()
280 Assert.True(message.IsInitialized()); in RequiredFieldsInExtensions()
282 message.SetExtension(TestRequired.Extensions.Single, new TestRequired()); in RequiredFieldsInExtensions()
284 Assert.False(message.IsInitialized()); in RequiredFieldsInExtensions()
286 var extensionMessage = message.GetExtension(TestRequired.Extensions.Single); in RequiredFieldsInExtensions()
291 Assert.True(message.IsInitialized()); in RequiredFieldsInExtensions()
293 message.GetOrInitializeExtension(TestRequired.Extensions.Multi); in RequiredFieldsInExtensions()
295 Assert.True(message.IsInitialized()); in RequiredFieldsInExtensions()
297 message.GetExtension(TestRequired.Extensions.Multi).Add(new TestRequired()); in RequiredFieldsInExtensions()
299 Assert.False(message.IsInitialized()); in RequiredFieldsInExtensions()
301 extensionMessage = message.GetExtension(TestRequired.Extensions.Multi)[0]; in RequiredFieldsInExtensions()
306 Assert.True(message.IsInitialized()); in RequiredFieldsInExtensions()
308 message.SetExtension(UnittestExtensions.OptionalBoolExtension, true); in RequiredFieldsInExtensions()
310 Assert.True(message.IsInitialized()); in RequiredFieldsInExtensions()
312 message.GetOrInitializeExtension(UnittestExtensions.RepeatedBoolExtension).Add(true); in RequiredFieldsInExtensions()
314 Assert.True(message.IsInitialized()); in RequiredFieldsInExtensions()
320 var message = new TestRequiredMap(); in RequiredFieldInNestedMessageMapValue()
321 message.Foo.Add(0, new TestRequiredMap.Types.NestedMessage()); in RequiredFieldInNestedMessageMapValue()
323 Assert.False(message.IsInitialized()); in RequiredFieldInNestedMessageMapValue()
325 message.Foo[0].RequiredInt32 = 12; in RequiredFieldInNestedMessageMapValue()
327 Assert.True(message.IsInitialized()); in RequiredFieldInNestedMessageMapValue()
333 var message = new TestAllTypes in RoundTrip_Groups()
347 MessageParsingHelpers.AssertWritingMessage(message); in RoundTrip_Groups()
349 MessageParsingHelpers.AssertRoundtrip(Proto2.TestAllTypes.Parser, message); in RoundTrip_Groups()
355 var message = new TestAllExtensions(); in RoundTrip_ExtensionGroups()
356message.SetExtension(UnittestExtensions.OptionalGroupExtension, new OptionalGroup_extension { A = … in RoundTrip_ExtensionGroups()
357message.GetOrInitializeExtension(UnittestExtensions.RepeatedGroupExtension).AddRange(new[] in RoundTrip_ExtensionGroups()
364 MessageParsingHelpers.AssertWritingMessage(message); in RoundTrip_ExtensionGroups()
368 message); in RoundTrip_ExtensionGroups()
374 var message = new TestGroupExtension(); in RoundTrip_NestedExtensionGroup()
375message.SetExtension(TestNestedExtension.Extensions.OptionalGroupExtension, new TestNestedExtensio… in RoundTrip_NestedExtensionGroup()
377 MessageParsingHelpers.AssertWritingMessage(message); in RoundTrip_NestedExtensionGroup()
381 message); in RoundTrip_NestedExtensionGroup()