Home
last modified time | relevance | path

Searched refs:AreEqual (Results 1 – 25 of 79) sorted by relevance

1234

/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime.Tests/
DANTLRxxxxStreamFixture.cs79 Assert.AreEqual(0, inputStream.Count); in TestSizeOnEmptyANTLRInputStream()
90 Assert.AreEqual(grammarStr.Length, inputStream.Count); in TestSizeOnANTLRInputStream()
101 Assert.AreEqual(0, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream()
104 Assert.AreEqual(1, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream()
107 Assert.AreEqual(2, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream()
113 Assert.AreEqual(inputStream.Index, inputStream.Count); in TestConsumeAndIndexOnANTLRInputStream()
129 Assert.AreEqual(inputStream.Index, inputStream.Count); in TestConsumeAllCharactersInAnANTLRInputStream()
140 Assert.AreEqual(0, inputStream.Index); in TestConsumeOnANTLRInputStream()
141 Assert.AreEqual(0, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
142 Assert.AreEqual(1, inputStream.Line); in TestConsumeOnANTLRInputStream()
[all …]
DRewriteRuleXxxxStreamFixture.cs101 Assert.AreEqual(description.ToString(), tokenTest.Description, in CheckRRTokenStreamBehaviourWhileEmpty1()
103 Assert.AreEqual(0, tokenTest.Count, "The number of elements should be zero."); in CheckRRTokenStreamBehaviourWhileEmpty1()
106 Assert.AreEqual(0, tokenTest.Count, in CheckRRTokenStreamBehaviourWhileEmpty1()
120 Assert.AreEqual(description.ToString(), subtreeTest.Description, in CheckRRSubtreeStreamBehaviourWhileEmpty1()
122 Assert.AreEqual(0, subtreeTest.Count, "The number of elements should be zero."); in CheckRRSubtreeStreamBehaviourWhileEmpty1()
125 Assert.AreEqual(0, subtreeTest.Count, in CheckRRSubtreeStreamBehaviourWhileEmpty1()
138 Assert.AreEqual(description.ToString(), nodeTest.Description, in CheckRRNodeStreamBehaviourWhileEmpty1()
140 Assert.AreEqual(0, nodeTest.Count, "The number of elements should be zero."); in CheckRRNodeStreamBehaviourWhileEmpty1()
143 Assert.AreEqual(0, nodeTest.Count, in CheckRRNodeStreamBehaviourWhileEmpty1()
198 Assert.AreEqual(1, tokenTest.Count, "tokenTest should have the size 1 (1)."); in CheckRRTokenStreamBehaviourWithElements()
[all …]
DITreeNodeStreamFixture.cs64 Assert.AreEqual(expected, actual); in testSingleNode()
68 Assert.AreEqual(expected, actual); in testSingleNode()
85 Assert.AreEqual(expected, actual); in test4Nodes()
89 Assert.AreEqual(expected, actual); in test4Nodes()
110 Assert.AreEqual(expected, actual); in testList()
114 Assert.AreEqual(expected, actual); in testList()
129 Assert.AreEqual(expected, actual); in testFlatList()
133 Assert.AreEqual(expected, actual); in testFlatList()
146 Assert.AreEqual(expected, actual); in testListWithOneNode()
150 Assert.AreEqual(expected, actual); in testListWithOneNode()
[all …]
DITreeFixture.cs59 Assert.AreEqual(-1, t.ChildIndex); in testSingleNode()
72 Assert.AreEqual(-1, r0.ChildIndex); in test4Nodes()
86 Assert.AreEqual(-1, r0.ChildIndex); in testList()
87 Assert.AreEqual(r0, c0.Parent); in testList()
88 Assert.AreEqual(0, c0.ChildIndex); in testList()
89 Assert.AreEqual(r0, c1.Parent); in testList()
90 Assert.AreEqual(1, c1.ChildIndex); in testList()
91 Assert.AreEqual(r0, c2.Parent); in testList()
92 Assert.AreEqual(2, c2.ChildIndex); in testList()
112 Assert.AreEqual(-1, root.ChildIndex); in testList2()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs55 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 …]
DGeneratedMessageTest.cs63 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()
71 Assert.AreEqual(ImportEnum.Unspecified, message.SingleImportEnum); in DefaultValues()
73 Assert.AreEqual(0, message.SingleInt32); in DefaultValues()
74 Assert.AreEqual(0L, message.SingleInt64); in DefaultValues()
[all …]
DJsonTokenizerTest.cs90 Assert.AreEqual(0, tokenizer.ObjectDepth); in ObjectDepth()
91 Assert.AreEqual(JsonToken.StartObject, tokenizer.Next()); in ObjectDepth()
92 Assert.AreEqual(1, tokenizer.ObjectDepth); in ObjectDepth()
93 Assert.AreEqual(JsonToken.Name("foo"), tokenizer.Next()); in ObjectDepth()
94 Assert.AreEqual(1, tokenizer.ObjectDepth); in ObjectDepth()
95 Assert.AreEqual(JsonToken.StartObject, tokenizer.Next()); in ObjectDepth()
96 Assert.AreEqual(2, tokenizer.ObjectDepth); in ObjectDepth()
97 Assert.AreEqual(JsonToken.Name("x"), tokenizer.Next()); in ObjectDepth()
98 Assert.AreEqual(2, tokenizer.ObjectDepth); in ObjectDepth()
99 Assert.AreEqual(JsonToken.Value(1), tokenizer.Next()); in ObjectDepth()
[all …]
DCodedInputStreamTest.cs63 Assert.AreEqual((uint) value, input.ReadRawVarint32()); in AssertReadVarint()
66 Assert.AreEqual(value, input.ReadRawVarint64()); in AssertReadVarint()
73 Assert.AreEqual((uint) value, input.ReadRawVarint32()); in AssertReadVarint()
76 Assert.AreEqual(value, input.ReadRawVarint64()); in AssertReadVarint()
87 Assert.AreEqual((uint) value, CodedInputStream.ReadRawVarint32(memoryStream)); in AssertReadVarint()
88 Assert.AreEqual(data.Length, memoryStream.Position); in AssertReadVarint()
100 Assert.AreEqual(expected.Message, exception.Message); in AssertReadVarintFailure()
104 Assert.AreEqual(expected.Message, exception.Message); in AssertReadVarintFailure()
108 Assert.AreEqual(expected.Message, exception.Message); in AssertReadVarintFailure()
156 Assert.AreEqual(value, input.ReadRawLittleEndian32()); in AssertReadLittleEndian32()
[all …]
DByteStringTest.cs72 Assert.AreEqual(0, ByteString.Empty.Length); in EmptyByteStringHasZeroSize()
79 Assert.AreEqual(4, bs.Length); in CopyFromStringWithExplicitEncoding()
80 Assert.AreEqual(65, bs[0]); in CopyFromStringWithExplicitEncoding()
81 Assert.AreEqual(0, bs[1]); in CopyFromStringWithExplicitEncoding()
82 Assert.AreEqual(66, bs[2]); in CopyFromStringWithExplicitEncoding()
83 Assert.AreEqual(0, bs[3]); in CopyFromStringWithExplicitEncoding()
104 Assert.AreEqual(10, bs[0]); in CopyFromByteArrayCopiesContents()
106 Assert.AreEqual(10, bs[0]); in CopyFromByteArrayCopiesContents()
114 Assert.AreEqual((byte)'H', data[0]); in ToByteArrayCopiesContents()
115 Assert.AreEqual((byte)'H', bs[0]); in ToByteArrayCopiesContents()
[all …]
DJsonParserTest.cs79 Assert.AreEqual(expected, TestAllTypes.Parser.ParseJson(json)); in OriginalFieldNameAccepted()
132 Assert.AreEqual(message, parsed); in SingularWrappers_ExplicitNulls()
148 Assert.AreEqual(expected, parsed); in Wrappers_Standalone()
152 Assert.AreEqual(expected, parsed); in Wrappers_Standalone()
160 Assert.AreEqual(new TestWellKnownTypes { ValueField = Value.ForNull() }, message); in ExplicitNullValue()
170 Assert.AreEqual(expected, parsed); in BytesWrapper_Standalone()
202 Assert.AreEqual(new TestAllTypes(), TestAllTypes.Parser.ParseJson(json)); in RepeatedField_NullOverallValueAllowed()
218 Assert.AreEqual(new TestMap(), TestMap.Parser.ParseJson(json)); in MapField_NullOverallValueAllowed()
224 … Assert.AreEqual(new StringValue { Value = "foo" }, StringValue.Parser.ParseJson("\"foo\"")); in IndividualWrapperTypes()
225 Assert.AreEqual(new Int32Value { Value = 1 }, Int32Value.Parser.ParseJson("1")); in IndividualWrapperTypes()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/Reflection/
DDescriptorsTest.cs51 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()
68 Assert.AreEqual(messageType, file.MessageTypes[0]); in FileDescriptor()
[all …]
DFieldAccessTest.cs48 …Assert.AreEqual(message.SingleBool, fields[TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(m… in GetValue()
49 …Assert.AreEqual(message.SingleBytes, fields[TestAllTypes.SingleBytesFieldNumber].Accessor.GetValue… in GetValue()
50 …Assert.AreEqual(message.SingleDouble, fields[TestAllTypes.SingleDoubleFieldNumber].Accessor.GetVal… in GetValue()
51 …Assert.AreEqual(message.SingleFixed32, fields[TestAllTypes.SingleFixed32FieldNumber].Accessor.GetV… in GetValue()
52 …Assert.AreEqual(message.SingleFixed64, fields[TestAllTypes.SingleFixed64FieldNumber].Accessor.GetV… in GetValue()
53 …Assert.AreEqual(message.SingleFloat, fields[TestAllTypes.SingleFloatFieldNumber].Accessor.GetValue… in GetValue()
54 …Assert.AreEqual(message.SingleForeignEnum, fields[TestAllTypes.SingleForeignEnumFieldNumber].Acces… in GetValue()
55 …Assert.AreEqual(message.SingleForeignMessage, fields[TestAllTypes.SingleForeignMessageFieldNumber]… in GetValue()
56 …Assert.AreEqual(message.SingleImportEnum, fields[TestAllTypes.SingleImportEnumFieldNumber].Accesso… in GetValue()
57 …Assert.AreEqual(message.SingleImportMessage, fields[TestAllTypes.SingleImportMessageFieldNumber].A… in GetValue()
[all …]
/external/flatbuffers/tests/FlatBuffers.Test/
DFlatBuffersExampleTests.cs131 … Assert.AreEqual(ByteBufferUtil.GetSizePrefix(dataBuffer) + FlatBufferConstants.SizePrefixLength, in CanCreateNewFlatBufferFromScratch()
146 Assert.AreEqual(monster.MutateMana((short)10), false); in CanCreateNewFlatBufferFromScratch()
147 Assert.AreEqual(monster.Mana, (short)150); in CanCreateNewFlatBufferFromScratch()
150 Assert.AreEqual(monster.Testarrayoftables(0).Value.Name, "Barney"); in CanCreateNewFlatBufferFromScratch()
151 Assert.AreEqual(monster.Testarrayoftables(1).Value.Name, "Frodo"); in CanCreateNewFlatBufferFromScratch()
152 Assert.AreEqual(monster.Testarrayoftables(2).Value.Name, "Wilma"); in CanCreateNewFlatBufferFromScratch()
160 Assert.AreEqual(monster.TestType, Any.Monster); in CanCreateNewFlatBufferFromScratch()
161 Assert.AreEqual(monster.MutateTestType(Any.NONE), true); in CanCreateNewFlatBufferFromScratch()
162 Assert.AreEqual(monster.TestType, Any.NONE); in CanCreateNewFlatBufferFromScratch()
163 Assert.AreEqual(monster.MutateTestType(Any.Monster), true); in CanCreateNewFlatBufferFromScratch()
[all …]
DByteBufferTests.cs30 Assert.AreEqual(buffer.Length, uut.Length); in ByteBuffer_Length_MatchesBufferLength()
40 Assert.AreEqual((byte)99, buffer[0]); in ByteBuffer_PutBytePopulatesBufferAtZeroOffset()
60 Assert.AreEqual((byte)1, buffer[0]); in ByteBuffer_PutShortPopulatesBufferCorrectly()
61 Assert.AreEqual((byte)0, buffer[1]); in ByteBuffer_PutShortPopulatesBufferCorrectly()
97 Assert.AreEqual(0x0D, buffer[0]); in ByteBuffer_PutIntPopulatesBufferCorrectly()
98 Assert.AreEqual(0x0C, buffer[1]); in ByteBuffer_PutIntPopulatesBufferCorrectly()
99 Assert.AreEqual(0x0B, buffer[2]); in ByteBuffer_PutIntPopulatesBufferCorrectly()
100 Assert.AreEqual(0x0A, buffer[3]); in ByteBuffer_PutIntPopulatesBufferCorrectly()
134 Assert.AreEqual(0x0D, buffer[0]); in ByteBuffer_PutLongPopulatesBufferCorrectly()
135 Assert.AreEqual(0x0C, buffer[1]); in ByteBuffer_PutLongPopulatesBufferCorrectly()
[all …]
DFlatBufferBuilderTests.cs38 Assert.AreEqual(sizeof(bool), endOffset-storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddBool_AndDefaultValue_OffsetIncreasesBySize()
48 Assert.AreEqual(sizeof(sbyte), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddSByte_AndDefaultValue_OffsetIncreasesBySize()
58 Assert.AreEqual(sizeof(byte), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddByte_AndDefaultValue_OffsetIncreasesBySize()
68 Assert.AreEqual(sizeof(short), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddShort_AndDefaultValue_OffsetIncreasesBySize()
78 Assert.AreEqual(sizeof(ushort), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddUShort_AndDefaultValue_OffsetIncreasesBySize()
88 Assert.AreEqual(sizeof(int), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddInt_AndDefaultValue_OffsetIncreasesBySize()
98 Assert.AreEqual(sizeof(uint), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddUInt_AndDefaultValue_OffsetIncreasesBySize()
108 Assert.AreEqual(sizeof(long), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddLong_AndDefaultValue_OffsetIncreasesBySize()
118 Assert.AreEqual(sizeof(ulong), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddULong_AndDefaultValue_OffsetIncreasesBySize()
128 Assert.AreEqual(sizeof(float), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddFloat_AndDefaultValue_OffsetIncreasesBySize()
[all …]
/external/grpc-grpc/src/csharp/Grpc.IntegrationTesting/
DHistogramTest.cs45 Assert.AreEqual(4, data.Count); in Simple()
46 Assert.AreEqual(42000.0, data.Sum, 1e-6); in Simple()
47 Assert.AreEqual(10000, data.MinSeen); in Simple()
48 Assert.AreEqual(11000, data.MaxSeen); in Simple()
49 Assert.AreEqual(2.0*10000*10000 + 2.0*11000*11000, data.SumOfSquares, 1e-6); in Simple()
52 Assert.AreEqual(2, data.Bucket[925]); in Simple()
53 Assert.AreEqual(2, data.Bucket[935]); in Simple()
64 Assert.AreEqual(1, data.Bucket[0]); in ExtremeObservations()
65 Assert.AreEqual(1, data.Bucket[data.Bucket.Count - 1]); in ExtremeObservations()
83 Assert.AreEqual(4, data.Count); in MergeSnapshots()
[all …]
/external/grpc-grpc/src/csharp/Grpc.Core.Tests/
DClientServerTest.cs65 Assert.AreEqual("ABC", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "ABC")); in UnaryCall()
67 Assert.AreEqual("ABC", await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "ABC")); in UnaryCall()
79 Assert.AreEqual(StatusCode.Unknown, ex.Status.StatusCode); in UnaryCall_ServerHandlerThrows()
82 Assert.AreEqual(StatusCode.Unknown, ex2.Status.StatusCode); in UnaryCall_ServerHandlerThrows()
94 Assert.AreEqual(StatusCode.Unauthenticated, ex.Status.StatusCode); in UnaryCall_ServerHandlerThrowsRpcException()
95 Assert.AreEqual(0, ex.Trailers.Count); in UnaryCall_ServerHandlerThrowsRpcException()
98 Assert.AreEqual(StatusCode.Unauthenticated, ex2.Status.StatusCode); in UnaryCall_ServerHandlerThrowsRpcException()
99 Assert.AreEqual(0, ex.Trailers.Count); in UnaryCall_ServerHandlerThrowsRpcException()
112 Assert.AreEqual(StatusCode.Unauthenticated, ex.Status.StatusCode); in UnaryCall_ServerHandlerThrowsRpcExceptionWithTrailers()
113 Assert.AreEqual(1, ex.Trailers.Count); in UnaryCall_ServerHandlerThrowsRpcExceptionWithTrailers()
[all …]
DMetadataTest.cs38 Assert.AreEqual("abc", entry.Key); // key is in lowercase. in AsciiEntry()
39 Assert.AreEqual("XYZ", entry.Value); in AsciiEntry()
40 CollectionAssert.AreEqual(new[] { (byte)'X', (byte)'Y', (byte)'Z' }, entry.ValueBytes); in AsciiEntry()
44 Assert.AreEqual("[Entry: key=abc, value=XYZ]", entry.ToString()); in AsciiEntry()
53 Assert.AreEqual("abc-bin", entry.Key); // key is in lowercase. in BinaryEntry()
55 CollectionAssert.AreEqual(bytes, entry.ValueBytes); in BinaryEntry()
59 Assert.AreEqual("[Entry: key=abc-bin, valueBytes=System.Byte[]]", entry.ToString()); in BinaryEntry()
90 CollectionAssert.AreEqual(origBytes, entry.ValueBytes); in Entry_Immutable()
93 CollectionAssert.AreEqual(origBytes, entry.ValueBytes); in Entry_Immutable()
102 Assert.AreEqual("abc", entry.Key); in Entry_CreateUnsafe_Ascii()
[all …]
DResponseHeadersTest.cs76 Assert.AreEqual(headers.Count, responseHeaders.Count); in ResponseHeadersAsync_UnaryCall()
77 Assert.AreEqual("ascii-header", responseHeaders[0].Key); in ResponseHeadersAsync_UnaryCall()
78 Assert.AreEqual("abcdefg", responseHeaders[0].Value); in ResponseHeadersAsync_UnaryCall()
80 Assert.AreEqual("PASS", await call.ResponseAsync); in ResponseHeadersAsync_UnaryCall()
96 Assert.AreEqual("ascii-header", responseHeaders[0].Key); in ResponseHeadersAsync_ClientStreamingCall()
97 Assert.AreEqual("PASS", await call.ResponseAsync); in ResponseHeadersAsync_ClientStreamingCall()
112 Assert.AreEqual("ascii-header", responseHeaders[0].Key); in ResponseHeadersAsync_ServerStreamingCall()
113 CollectionAssert.AreEqual(new[] { "PASS" }, await call.ResponseStream.ToListAsync()); in ResponseHeadersAsync_ServerStreamingCall()
134 Assert.AreEqual("ascii-header", responseHeaders[0].Key); in ResponseHeadersAsync_DuplexStreamingCall()
135 CollectionAssert.AreEqual(messages, await call.ResponseStream.ToListAsync()); in ResponseHeadersAsync_DuplexStreamingCall()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/Collections/
DRepeatedFieldTest.cs63 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()
82 Assert.AreEqual(3, list.Count); in Add_RepeatedField()
83 Assert.AreEqual("original", list[0]); in Add_RepeatedField()
84 Assert.AreEqual("foo", list[1]); in Add_RepeatedField()
85 Assert.AreEqual("bar", list[2]); in Add_RepeatedField()
93 CollectionAssert.AreEqual(new[] { "first", "third" }, list); in RemoveAt_Valid()
[all …]
DMapFieldTest.cs55 Assert.AreEqual(20, clone["x"].C); in Clone_ClonesMessages()
99 CollectionAssert.AreEqual(new[] { "a", "c", "d" }, map.Keys); in AddPreservesInsertionOrder()
100 CollectionAssert.AreEqual(new[] { "v1", "v3", "v4" }, map.Values); in AddPreservesInsertionOrder()
177 Assert.AreEqual(expected, map2); in Add_Dictionary()
178 CollectionAssert.AreEqual(new[] { "before", "x", "a", "after" }, map2.Keys); in Add_Dictionary()
196 Assert.AreEqual("y", map["x"]); in Add_Pair()
215 Assert.AreEqual(1, map.Count); in Remove_Key()
217 Assert.AreEqual(1, map.Count); in Remove_Key()
219 Assert.AreEqual(0, map.Count); in Remove_Key()
229 Assert.AreEqual(1, map.Count); in Remove_Pair()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DWrappersTest.cs77 Assert.AreEqual("x", parsed.StringField); in NonDefaultSingleValues()
78 Assert.AreEqual(ByteString.CopyFrom(1, 2, 3), parsed.BytesField); in NonDefaultSingleValues()
79 Assert.AreEqual(true, parsed.BoolField); in NonDefaultSingleValues()
80 Assert.AreEqual(12.5f, parsed.FloatField); in NonDefaultSingleValues()
81 Assert.AreEqual(12.25d, parsed.DoubleField); in NonDefaultSingleValues()
82 Assert.AreEqual(1, parsed.Int32Field); in NonDefaultSingleValues()
83 Assert.AreEqual(2L, parsed.Int64Field); in NonDefaultSingleValues()
84 Assert.AreEqual(3U, parsed.Uint32Field); in NonDefaultSingleValues()
85 Assert.AreEqual(4UL, parsed.Uint64Field); in NonDefaultSingleValues()
107 Assert.AreEqual("", parsed.StringField); in NonNullDefaultIsPreservedThroughSerialization()
[all …]
DDurationTest.cs43 Assert.AreEqual(TimeSpan.FromSeconds(1), new Duration { Seconds = 1 }.ToTimeSpan()); in ToTimeSpan()
44 Assert.AreEqual(TimeSpan.FromSeconds(-1), new Duration { Seconds = -1 }.ToTimeSpan()); in ToTimeSpan()
45 … Assert.AreEqual(TimeSpan.FromMilliseconds(1), new Duration { Nanos = 1000000 }.ToTimeSpan()); in ToTimeSpan()
46 … Assert.AreEqual(TimeSpan.FromMilliseconds(-1), new Duration { Nanos = -1000000 }.ToTimeSpan()); in ToTimeSpan()
47 Assert.AreEqual(TimeSpan.FromTicks(1), new Duration { Nanos = 100 }.ToTimeSpan()); in ToTimeSpan()
48 Assert.AreEqual(TimeSpan.FromTicks(-1), new Duration { Nanos = -100 }.ToTimeSpan()); in ToTimeSpan()
51 Assert.AreEqual(TimeSpan.FromTicks(2), new Duration { Nanos = 250 }.ToTimeSpan()); in ToTimeSpan()
52 Assert.AreEqual(TimeSpan.FromTicks(-2), new Duration { Nanos = -250 }.ToTimeSpan()); in ToTimeSpan()
58 Assert.AreEqual(new Duration { Seconds = 2, Nanos = 100000000 }, in Addition()
60 Assert.AreEqual(new Duration { Seconds = -2, Nanos = -100000000 }, in Addition()
[all …]
/external/zlib/src/contrib/dotzlib/DotZLib/
DUnitTests.cs51 Assert.AreEqual( 0, buf.Size ); in SinglePutGet()
52 Assert.AreEqual( -1, buf.Get() ); in SinglePutGet()
55 Assert.AreEqual( 1, buf.Size ); in SinglePutGet()
56 Assert.AreEqual( 1, buf.Get() ); in SinglePutGet()
57 Assert.AreEqual( 0, buf.Size ); in SinglePutGet()
58 Assert.AreEqual( -1, buf.Get() ); in SinglePutGet()
66 Assert.AreEqual( 10, buf.Put(arr,0,10) ); in BlockPutGet()
67 Assert.AreEqual( 10, buf.Size ); in BlockPutGet()
69 Assert.AreEqual( 1, buf.Get() ); in BlockPutGet()
73 Assert.AreEqual( 9, buf.Get(arr2,1,9) ); in BlockPutGet()
[all …]
/external/grpc-grpc/src/csharp/Grpc.Core.Tests/Internal/
DTimespecTest.cs32 Assert.AreEqual(DateTimeKind.Utc, Timespec.Now.ToDateTime().Kind); in Now_IsInUtc()
51 Assert.AreEqual(Timespec.NativeInfFuture, Timespec.InfFuture); in InfFutureMatchesNativeValue()
57 Assert.AreEqual(Timespec.NativeInfPast, Timespec.InfPast); in InfPastMatchesNativeValue()
65 Assert.AreEqual(Timespec.NativeSize, Marshal.SizeOf(typeof(Timespec))); in TimespecSizeIsNativeSize()
72 Assert.AreEqual(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc), in ToDateTime()
75 Assert.AreEqual(new DateTime(1970, 1, 1, 0, 0, 10, DateTimeKind.Utc).AddTicks(50), in ToDateTime()
78 Assert.AreEqual(new DateTime(2015, 7, 21, 4, 21, 48, DateTimeKind.Utc), in ToDateTime()
82 Assert.AreEqual(new DateTime(1969, 12, 31, 23, 59, 55, DateTimeKind.Utc).AddTicks(10), in ToDateTime()
86 Assert.AreEqual(DateTime.MaxValue, Timespec.InfFuture.ToDateTime()); in ToDateTime()
87 Assert.AreEqual(DateTime.MinValue, Timespec.InfPast.ToDateTime()); in ToDateTime()
[all …]

1234