/third_party/protobuf/csharp/src/Google.Protobuf.Test/ |
D | GeneratedMessageTest.Proto2.cs | 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() [all …]
|
D | CodedOutputStreamTest.cs | 57 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteVarint() 64 Assert.AreEqual(data, bufferWriter.WrittenSpan.ToArray()); in AssertWriteVarint() 67 … Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint32Size((uint) value)); in AssertWriteVarint() 76 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteVarint() 83 Assert.AreEqual(data, bufferWriter.WrittenSpan.ToArray()); in AssertWriteVarint() 86 Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint64Size(value)); in AssertWriteVarint() 100 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteVarint() 107 Assert.AreEqual(data, bufferWriter.WrittenSpan.ToArray()); in AssertWriteVarint() 115 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteVarint() 122 Assert.AreEqual(data, bufferWriter.WrittenSpan.ToArray()); in AssertWriteVarint() [all …]
|
D | Proto3OptionalTest.cs | 47 Assert.IsFalse(message.HasOptionalInt32); in OptionalInt32FieldLifecycle() 48 Assert.AreEqual(0, message.OptionalInt32); in OptionalInt32FieldLifecycle() 51 Assert.IsTrue(message.HasOptionalInt32); in OptionalInt32FieldLifecycle() 52 Assert.AreEqual(5, message.OptionalInt32); in OptionalInt32FieldLifecycle() 55 Assert.IsTrue(message.HasOptionalInt32); in OptionalInt32FieldLifecycle() 56 Assert.AreEqual(0, message.OptionalInt32); in OptionalInt32FieldLifecycle() 59 Assert.IsFalse(message.HasOptionalInt32); in OptionalInt32FieldLifecycle() 60 Assert.AreEqual(0, message.OptionalInt32); in OptionalInt32FieldLifecycle() 67 Assert.IsFalse(message.HasOptionalString); in OptionalStringFieldLifecycle() 68 Assert.AreEqual("", message.OptionalString); in OptionalStringFieldLifecycle() [all …]
|
D | GeneratedMessageTest.cs | 64 Assert.AreEqual(false, message.SingleBool); in DefaultValues() 65 Assert.AreEqual(ByteString.Empty, message.SingleBytes); in DefaultValues() 66 Assert.AreEqual(0.0, message.SingleDouble); in DefaultValues() 67 Assert.AreEqual(0, message.SingleFixed32); in DefaultValues() 68 Assert.AreEqual(0L, message.SingleFixed64); in DefaultValues() 69 Assert.AreEqual(0.0f, message.SingleFloat); in DefaultValues() 70 Assert.AreEqual(ForeignEnum.ForeignUnspecified, message.SingleForeignEnum); in DefaultValues() 71 Assert.IsNull(message.SingleForeignMessage); in DefaultValues() 72 Assert.AreEqual(ImportEnum.Unspecified, message.SingleImportEnum); in DefaultValues() 73 Assert.IsNull(message.SingleImportMessage); in DefaultValues() [all …]
|
D | ByteStringTest.cs | 58 Assert.IsTrue(b1 == b1); in Equality() 59 Assert.IsTrue(b1 == b2); in Equality() 60 Assert.IsFalse(b1 == b3); in Equality() 61 Assert.IsFalse(b1 == b4); in Equality() 62 Assert.IsFalse(b1 == null); in Equality() 63 Assert.IsTrue((ByteString) null == null); in Equality() 64 Assert.IsFalse(b1 != b1); in Equality() 65 Assert.IsFalse(b1 != b2); in Equality() 67 Assert.IsTrue(b1 != b3); in Equality() 68 Assert.IsTrue(b1 != b4); in Equality() [all …]
|
D | CodedInputStreamTest.cs | 65 Assert.AreEqual((uint) value, input.ReadRawVarint32()); in AssertReadVarint() 66 Assert.IsTrue(input.IsAtEnd); in AssertReadVarint() 69 Assert.AreEqual(value, input.ReadRawVarint64()); in AssertReadVarint() 70 Assert.IsTrue(input.IsAtEnd); in AssertReadVarint() 74 Assert.AreEqual((uint) value, ctx.ReadUInt32()); in AssertReadVarint() 79 Assert.AreEqual(value, ctx.ReadUInt64()); in AssertReadVarint() 86 Assert.AreEqual((uint) value, input.ReadRawVarint32()); in AssertReadVarint() 89 Assert.AreEqual(value, input.ReadRawVarint64()); in AssertReadVarint() 90 Assert.IsTrue(input.IsAtEnd); in AssertReadVarint() 94 Assert.AreEqual((uint) value, ctx.ReadUInt32()); in AssertReadVarint() [all …]
|
/third_party/protobuf/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/ |
D | TestUtil.java | 144 import junit.framework.Assert; 409 Assert.assertTrue(message.hasOptionalInt32 ()); in assertAllFieldsSet() 410 Assert.assertTrue(message.hasOptionalInt64 ()); in assertAllFieldsSet() 411 Assert.assertTrue(message.hasOptionalUint32 ()); in assertAllFieldsSet() 412 Assert.assertTrue(message.hasOptionalUint64 ()); in assertAllFieldsSet() 413 Assert.assertTrue(message.hasOptionalSint32 ()); in assertAllFieldsSet() 414 Assert.assertTrue(message.hasOptionalSint64 ()); in assertAllFieldsSet() 415 Assert.assertTrue(message.hasOptionalFixed32 ()); in assertAllFieldsSet() 416 Assert.assertTrue(message.hasOptionalFixed64 ()); in assertAllFieldsSet() 417 Assert.assertTrue(message.hasOptionalSfixed32()); in assertAllFieldsSet() [all …]
|
/third_party/protobuf/java/core/src/test/java/com/google/protobuf/ |
D | TestUtil.java | 242 import junit.framework.Assert; 490 Assert.assertTrue(message.hasOptionalInt32()); in assertAllFieldsSet() 491 Assert.assertTrue(message.hasOptionalInt64()); in assertAllFieldsSet() 492 Assert.assertTrue(message.hasOptionalUint32()); in assertAllFieldsSet() 493 Assert.assertTrue(message.hasOptionalUint64()); in assertAllFieldsSet() 494 Assert.assertTrue(message.hasOptionalSint32()); in assertAllFieldsSet() 495 Assert.assertTrue(message.hasOptionalSint64()); in assertAllFieldsSet() 496 Assert.assertTrue(message.hasOptionalFixed32()); in assertAllFieldsSet() 497 Assert.assertTrue(message.hasOptionalFixed64()); in assertAllFieldsSet() 498 Assert.assertTrue(message.hasOptionalSfixed32()); in assertAllFieldsSet() [all …]
|
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/ |
D | CodedOutputStreamTest.cs | 55 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteVarint() 57 … Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint32Size((uint) value)); in AssertWriteVarint() 65 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteVarint() 68 Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint64Size(value)); in AssertWriteVarint() 82 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteVarint() 90 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteVarint() 140 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteLittleEndian32() 149 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteLittleEndian32() 163 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteLittleEndian64() 172 Assert.AreEqual(data, rawOutput.ToArray()); in AssertWriteLittleEndian64() [all …]
|
D | GeneratedMessageTest.cs | 63 Assert.AreEqual(false, message.SingleBool); in DefaultValues() 64 Assert.AreEqual(ByteString.Empty, message.SingleBytes); in DefaultValues() 65 Assert.AreEqual(0.0, message.SingleDouble); in DefaultValues() 66 Assert.AreEqual(0, message.SingleFixed32); in DefaultValues() 67 Assert.AreEqual(0L, message.SingleFixed64); in DefaultValues() 68 Assert.AreEqual(0.0f, message.SingleFloat); in DefaultValues() 69 Assert.AreEqual(ForeignEnum.ForeignUnspecified, message.SingleForeignEnum); in DefaultValues() 70 Assert.IsNull(message.SingleForeignMessage); in DefaultValues() 71 Assert.AreEqual(ImportEnum.Unspecified, message.SingleImportEnum); in DefaultValues() 72 Assert.IsNull(message.SingleImportMessage); in DefaultValues() [all …]
|
D | ByteStringTest.cs | 54 Assert.IsTrue(b1 == b1); in Equality() 55 Assert.IsTrue(b1 == b2); in Equality() 56 Assert.IsFalse(b1 == b3); in Equality() 57 Assert.IsFalse(b1 == b4); in Equality() 58 Assert.IsFalse(b1 == null); in Equality() 59 Assert.IsTrue((ByteString) null == null); in Equality() 60 Assert.IsFalse(b1 != b1); in Equality() 61 Assert.IsFalse(b1 != b2); in Equality() 63 Assert.IsTrue(b1 != b3); in Equality() 64 Assert.IsTrue(b1 != b4); in Equality() [all …]
|
D | CodedInputStreamTest.cs | 63 Assert.AreEqual((uint) value, input.ReadRawVarint32()); in AssertReadVarint() 66 Assert.AreEqual(value, input.ReadRawVarint64()); in AssertReadVarint() 67 Assert.IsTrue(input.IsAtEnd); in AssertReadVarint() 73 Assert.AreEqual((uint) value, input.ReadRawVarint32()); in AssertReadVarint() 76 Assert.AreEqual(value, input.ReadRawVarint64()); in AssertReadVarint() 77 Assert.IsTrue(input.IsAtEnd); in AssertReadVarint() 87 Assert.AreEqual((uint) value, CodedInputStream.ReadRawVarint32(memoryStream)); in AssertReadVarint() 88 Assert.AreEqual(data.Length, memoryStream.Position); in AssertReadVarint() 99 … var exception = Assert.Throws<InvalidProtocolBufferException>(() => input.ReadRawVarint32()); in AssertReadVarintFailure() 100 Assert.AreEqual(expected.Message, exception.Message); in AssertReadVarintFailure() [all …]
|
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Reflection/ |
D | DescriptorsTest.cs | 51 Assert.AreEqual("google/protobuf/unittest_proto3.proto", file.Name); in FileDescriptor() 52 Assert.AreEqual("protobuf_unittest", file.Package); in FileDescriptor() 54 Assert.AreEqual("UnittestProto", file.Proto.Options.JavaOuterClassname); in FileDescriptor() 55 Assert.AreEqual("google/protobuf/unittest_proto3.proto", file.Proto.Name); in FileDescriptor() 58 Assert.AreEqual(0, file.PublicDependencies.Count); in FileDescriptor() 59 Assert.AreEqual(1, UnittestImportProto3Reflection.Descriptor.PublicDependencies.Count); in FileDescriptor() 60 …Assert.AreEqual(UnittestImportPublicProto3Reflection.Descriptor, UnittestImportProto3Reflection.De… in FileDescriptor() 62 Assert.AreEqual(1, file.Dependencies.Count); in FileDescriptor() 63 Assert.AreEqual(UnittestImportProto3Reflection.Descriptor, file.Dependencies[0]); in FileDescriptor() 66 Assert.AreSame(typeof(TestAllTypes), messageType.ClrType); in FileDescriptor() [all …]
|
/third_party/protobuf/csharp/src/Google.Protobuf.Test/Reflection/ |
D | DescriptorsTest.cs | 69 Assert.AreEqual(3, converted.Count); in FileDescriptor_BuildFromByteStrings() 75 Assert.AreEqual("unittest_proto3.proto", file.Name); in TestFileDescriptor() 76 Assert.AreEqual("protobuf_unittest3", file.Package); in TestFileDescriptor() 78 Assert.AreEqual("UnittestProto", file.Proto.Options.JavaOuterClassname); in TestFileDescriptor() 79 Assert.AreEqual("unittest_proto3.proto", file.Proto.Name); in TestFileDescriptor() 82 Assert.AreEqual(0, file.PublicDependencies.Count); in TestFileDescriptor() 83 Assert.AreEqual(1, importedFile.PublicDependencies.Count); in TestFileDescriptor() 84 Assert.AreEqual(importedPublicFile, importedFile.PublicDependencies[0]); in TestFileDescriptor() 86 Assert.AreEqual(1, file.Dependencies.Count); in TestFileDescriptor() 87 Assert.AreEqual(importedFile, file.Dependencies[0]); in TestFileDescriptor() [all …]
|
D | FieldAccessTest.cs | 52 …Assert.AreEqual(message.SingleBool, fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor… in GetValue() 53 …Assert.AreEqual(message.SingleBytes, fields[TestProtos.TestAllTypes.SingleBytesFieldNumber].Access… in GetValue() 54 …Assert.AreEqual(message.SingleDouble, fields[TestProtos.TestAllTypes.SingleDoubleFieldNumber].Acce… in GetValue() 55 …Assert.AreEqual(message.SingleFixed32, fields[TestProtos.TestAllTypes.SingleFixed32FieldNumber].Ac… in GetValue() 56 …Assert.AreEqual(message.SingleFixed64, fields[TestProtos.TestAllTypes.SingleFixed64FieldNumber].Ac… in GetValue() 57 …Assert.AreEqual(message.SingleFloat, fields[TestProtos.TestAllTypes.SingleFloatFieldNumber].Access… in GetValue() 58 …Assert.AreEqual(message.SingleForeignEnum, fields[TestProtos.TestAllTypes.SingleForeignEnumFieldNu… in GetValue() 59 …Assert.AreEqual(message.SingleForeignMessage, fields[TestProtos.TestAllTypes.SingleForeignMessageF… in GetValue() 60 …Assert.AreEqual(message.SingleImportEnum, fields[TestProtos.TestAllTypes.SingleImportEnumFieldNumb… in GetValue() 61 …Assert.AreEqual(message.SingleImportMessage, fields[TestProtos.TestAllTypes.SingleImportMessageFie… in GetValue() [all …]
|
/third_party/flatbuffers/tests/FlatBuffers.Test/ |
D | FlatBuffersExampleTests.cs | 133 … Assert.AreEqual(ByteBufferUtil.GetSizePrefix(dataBuffer) + FlatBufferConstants.SizePrefixLength, in CanCreateNewFlatBufferFromScratch() 148 Assert.AreEqual(monster.MutateMana((short)10), false); in CanCreateNewFlatBufferFromScratch() 149 Assert.AreEqual(monster.Mana, (short)150); in CanCreateNewFlatBufferFromScratch() 152 Assert.AreEqual(monster.Testarrayoftables(0).Value.Name, "Barney"); in CanCreateNewFlatBufferFromScratch() 153 Assert.AreEqual(monster.Testarrayoftables(1).Value.Name, "Frodo"); in CanCreateNewFlatBufferFromScratch() 154 Assert.AreEqual(monster.Testarrayoftables(2).Value.Name, "Wilma"); in CanCreateNewFlatBufferFromScratch() 157 Assert.IsTrue(monster.TestarrayoftablesByKey("Frodo") != null); in CanCreateNewFlatBufferFromScratch() 158 Assert.IsTrue(monster.TestarrayoftablesByKey("Barney") != null); in CanCreateNewFlatBufferFromScratch() 159 Assert.IsTrue(monster.TestarrayoftablesByKey("Wilma") != null); in CanCreateNewFlatBufferFromScratch() 162 Assert.AreEqual(monster.TestType, Any.Monster); in CanCreateNewFlatBufferFromScratch() [all …]
|
/third_party/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/ |
D | TimestampTest.cs | 58 …Assert.AreEqual(new DateTime(1970, 1, 1, 0, 0, 1, DateTimeKind.Utc).AddMilliseconds(1), t1.ToDateT… in ToDateTimeTruncation() 61 … Assert.AreEqual(new DateTime(1969, 12, 31, 23, 59, 59).AddMilliseconds(1), t2.ToDateTime()); in ToDateTimeTruncation() 72 Assert.Throws<InvalidOperationException>(() => value.ToDateTime()); in ToDateTime_OutOfRange() 89 Assert.AreEqual(timestamp, Timestamp.FromDateTime(dateTime)); in AssertRoundtrip() 90 Assert.AreEqual(dateTime, timestamp.ToDateTime()); in AssertRoundtrip() 91 Assert.AreEqual(DateTimeKind.Utc, timestamp.ToDateTime().Kind); in AssertRoundtrip() 100 Assert.AreEqual(difference, t1 - t2); in Arithmetic() 101 Assert.AreEqual(-difference, t2 - t1); in Arithmetic() 103 Assert.AreEqual(t1, t2 + difference); in Arithmetic() 104 Assert.AreEqual(t2, t1 - difference); in Arithmetic() [all …]
|
D | FieldMaskTest.cs | 50 Assert.That(text, Does.Contain("@warning")); in ToString_Invalid() 51 Assert.That(text, Does.Contain(input)); in ToString_Invalid() 58 Assert.AreEqual( in ToString_Invalid_Precise() 66 Assert.IsTrue(FieldMask.IsValid<NestedTestAllTypes>("payload")); in IsValid() 67 Assert.IsFalse(FieldMask.IsValid<NestedTestAllTypes>("nonexist")); in IsValid() 68 Assert.IsTrue(FieldMask.IsValid<NestedTestAllTypes>("payload.single_int32")); in IsValid() 69 Assert.IsTrue(FieldMask.IsValid<NestedTestAllTypes>("payload.repeated_int32")); in IsValid() 70 Assert.IsTrue(FieldMask.IsValid<NestedTestAllTypes>("payload.single_nested_message")); in IsValid() 71 Assert.IsTrue(FieldMask.IsValid<NestedTestAllTypes>("payload.repeated_nested_message")); in IsValid() 72 Assert.IsFalse(FieldMask.IsValid<NestedTestAllTypes>("payload.nonexist")); in IsValid() [all …]
|
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Collections/ |
D | MapFieldTest.cs | 55 Assert.AreEqual(20, clone["x"].C); in Clone_ClonesMessages() 70 Assert.Throws<ArgumentNullException>(() => map.Add(0, nullValue)); in TestNullValues() 71 Assert.Throws<ArgumentNullException>(() => map[0] = nullValue); in TestNullValues() 80 Assert.Throws<ArgumentNullException>(() => map.Add(null, new ForeignMessage())); in Add_ForbidsNullKeys() 87 Assert.Throws<ArgumentNullException>(() => map[null] = new ForeignMessage()); in Indexer_ForbidsNullKeys() 137 Assert.IsFalse(map.Equals(new object())); in Equality_Simple() 177 Assert.AreEqual(expected, map2); in Add_Dictionary() 187 Assert.Throws<ArgumentException>(() => map.Add("foo", "baz")); in Add_KeyAlreadyExists() 196 Assert.AreEqual("y", map["x"]); in Add_Pair() 197 Assert.Throws<ArgumentException>(() => collection.Add(NewKeyValuePair("x", "z"))); in Add_Pair() [all …]
|
D | RepeatedFieldTest.cs | 51 Assert.Throws<ArgumentNullException>(() => list.Add((string)null)); in NullValuesRejected() 52 Assert.Throws<ArgumentNullException>(() => list.Add((IEnumerable<string>)null)); in NullValuesRejected() 53 Assert.Throws<ArgumentNullException>(() => list.Add((RepeatedField<string>)null)); in NullValuesRejected() 54 Assert.Throws<ArgumentNullException>(() => list.Contains(null)); in NullValuesRejected() 55 Assert.Throws<ArgumentNullException>(() => list.IndexOf(null)); in NullValuesRejected() 63 Assert.AreEqual(1, list.Count); in Add_SingleItem() 64 Assert.AreEqual("foo", list[0]); in Add_SingleItem() 72 Assert.AreEqual(2, list.Count); in Add_Sequence() 73 Assert.AreEqual("foo", list[0]); in Add_Sequence() 74 Assert.AreEqual("bar", list[1]); in Add_Sequence() [all …]
|
/third_party/grpc/src/csharp/Grpc.Core.Tests/ |
D | MetadataTest.cs | 39 Assert.IsFalse(entry.IsBinary); in AsciiEntry() 40 Assert.AreEqual("abc", entry.Key); // key is in lowercase. in AsciiEntry() 41 Assert.AreEqual("XYZ", entry.Value); in AsciiEntry() 44 Assert.Throws(typeof(ArgumentException), () => new Metadata.Entry("abc-bin", "xyz")); in AsciiEntry() 46 Assert.AreEqual("[Entry: key=abc, value=XYZ]", entry.ToString()); in AsciiEntry() 54 Assert.IsTrue(entry.IsBinary); in BinaryEntry() 55 Assert.AreEqual("abc-bin", entry.Key); // key is in lowercase. in BinaryEntry() 56 Assert.Throws(typeof(InvalidOperationException), () => { var v = entry.Value; }); in BinaryEntry() 59 Assert.Throws(typeof(ArgumentException), () => new Metadata.Entry("abc", bytes)); in BinaryEntry() 61 Assert.AreEqual("[Entry: key=abc-bin, valueBytes=System.Byte[]]", entry.ToString()); in BinaryEntry() [all …]
|
D | ClientServerTest.cs | 65 Assert.AreEqual("ABC", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "ABC")); in UnaryCall() 67 Assert.AreEqual("ABC", await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "ABC")); in UnaryCall() 78 …var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"… in UnaryCall_ServerHandlerThrows() 79 Assert.AreEqual(StatusCode.Unknown, ex.Status.StatusCode); in UnaryCall_ServerHandlerThrows() 81 …var ex2 = Assert.ThrowsAsync<RpcException>(async () => await Calls.AsyncUnaryCall(helper.CreateUna… in UnaryCall_ServerHandlerThrows() 82 Assert.AreEqual(StatusCode.Unknown, ex2.Status.StatusCode); in UnaryCall_ServerHandlerThrows() 93 …var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"… in UnaryCall_ServerHandlerThrowsRpcException() 94 Assert.AreEqual(StatusCode.Unauthenticated, ex.Status.StatusCode); in UnaryCall_ServerHandlerThrowsRpcException() 95 Assert.AreEqual(0, ex.Trailers.Count); in UnaryCall_ServerHandlerThrowsRpcException() 97 …var ex2 = Assert.ThrowsAsync<RpcException>(async () => await Calls.AsyncUnaryCall(helper.CreateUna… in UnaryCall_ServerHandlerThrowsRpcException() [all …]
|
/third_party/protobuf/csharp/src/Google.Protobuf.Test/Collections/ |
D | MapFieldTest.cs | 56 Assert.AreEqual(20, clone["x"].C); in Clone_ClonesMessages() 71 Assert.Throws<ArgumentNullException>(() => map.Add(0, nullValue)); in TestNullValues() 72 Assert.Throws<ArgumentNullException>(() => map[0] = nullValue); in TestNullValues() 81 Assert.Throws<ArgumentNullException>(() => map.Add(null, new ForeignMessage())); in Add_ForbidsNullKeys() 88 Assert.Throws<ArgumentNullException>(() => map[null] = new ForeignMessage()); in Indexer_ForbidsNullKeys() 138 Assert.IsFalse(map.Equals(new object())); in Equality_Simple() 178 Assert.AreEqual(expected, map2); in Add_Dictionary() 188 Assert.Throws<ArgumentException>(() => map.Add("foo", "baz")); in Add_KeyAlreadyExists() 197 Assert.AreEqual("y", map["x"]); in Add_Pair() 198 Assert.Throws<ArgumentException>(() => collection.Add(NewKeyValuePair("x", "z"))); in Add_Pair() [all …]
|
D | RepeatedFieldTest.cs | 52 Assert.Throws<ArgumentNullException>(() => list.Add((string)null)); in NullValuesRejected() 53 Assert.Throws<ArgumentNullException>(() => list.Add((IEnumerable<string>)null)); in NullValuesRejected() 54 Assert.Throws<ArgumentNullException>(() => list.Add((RepeatedField<string>)null)); in NullValuesRejected() 55 Assert.Throws<ArgumentNullException>(() => list.Contains(null)); in NullValuesRejected() 56 Assert.Throws<ArgumentNullException>(() => list.IndexOf(null)); in NullValuesRejected() 64 Assert.AreEqual(1, list.Count); in Add_SingleItem() 65 Assert.AreEqual("foo", list[0]); in Add_SingleItem() 73 Assert.AreEqual(2, list.Count); in Add_Sequence() 74 Assert.AreEqual("foo", list[0]); in Add_Sequence() 75 Assert.AreEqual("bar", list[1]); in Add_Sequence() [all …]
|
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/ |
D | WrappersTest.cs | 47 Assert.IsNull(message.StringField); in NullIsDefault() 48 Assert.IsNull(message.BytesField); in NullIsDefault() 49 Assert.IsNull(message.BoolField); in NullIsDefault() 50 Assert.IsNull(message.FloatField); in NullIsDefault() 51 Assert.IsNull(message.DoubleField); in NullIsDefault() 52 Assert.IsNull(message.Int32Field); in NullIsDefault() 53 Assert.IsNull(message.Int64Field); in NullIsDefault() 54 Assert.IsNull(message.Uint32Field); in NullIsDefault() 55 Assert.IsNull(message.Uint64Field); in NullIsDefault() 77 Assert.AreEqual("x", parsed.StringField); in NonDefaultSingleValues() [all …]
|