Home
last modified time | relevance | path

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

12345

/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 …]
/external/protobuf/csharp/compatibility_tests/v3.0.0/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 …]
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 …]
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 …]
/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 …]
/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()
163 Assert.AreEqual(monster.MutateInventory(0, 1), true); in CanCreateNewFlatBufferFromScratch()
164 Assert.AreEqual(monster.MutateInventory(1, 2), true); in CanCreateNewFlatBufferFromScratch()
165 Assert.AreEqual(monster.MutateInventory(2, 3), true); in CanCreateNewFlatBufferFromScratch()
[all …]
/external/protobuf/csharp/compatibility_tests/v3.0.0/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 …]
/external/protobuf/csharp/src/Google.Protobuf.Test/Reflection/
DDescriptorsTest.cs68 Assert.AreEqual(3, converted.Count); in FileDescriptor_BuildFromByteStrings()
74 Assert.AreEqual("unittest_proto3.proto", file.Name); in TestFileDescriptor()
75 Assert.AreEqual("protobuf_unittest3", file.Package); in TestFileDescriptor()
77 Assert.AreEqual("UnittestProto", file.Proto.Options.JavaOuterClassname); in TestFileDescriptor()
78 Assert.AreEqual("unittest_proto3.proto", file.Proto.Name); in TestFileDescriptor()
81 Assert.AreEqual(0, file.PublicDependencies.Count); in TestFileDescriptor()
82 Assert.AreEqual(1, importedFile.PublicDependencies.Count); in TestFileDescriptor()
83 Assert.AreEqual(importedPublicFile, importedFile.PublicDependencies[0]); in TestFileDescriptor()
85 Assert.AreEqual(1, file.Dependencies.Count); in TestFileDescriptor()
86 Assert.AreEqual(importedFile, file.Dependencies[0]); in TestFileDescriptor()
[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/protobuf/csharp/compatibility_tests/v3.0.0/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(2, list.Count); in AddRange_SlowPath()
83 Assert.AreEqual("foo", list[0]); in AddRange_SlowPath()
84 Assert.AreEqual("bar", list[1]); in AddRange_SlowPath()
110 Assert.AreEqual(2, list.Count); in AddRange_Optimized_NonNullableValueType()
111 Assert.AreEqual(20, list[0]); in AddRange_Optimized_NonNullableValueType()
[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/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 …]
/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(2, list.Count); in AddRange_SlowPath()
83 Assert.AreEqual("foo", list[0]); in AddRange_SlowPath()
84 Assert.AreEqual("bar", list[1]); in AddRange_SlowPath()
110 Assert.AreEqual(2, list.Count); in AddRange_Optimized_NonNullableValueType()
111 Assert.AreEqual(20, list[0]); in AddRange_Optimized_NonNullableValueType()
[all …]
/external/rust/crates/libz-sys/src/zlib/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/protobuf/csharp/compatibility_tests/v3.0.0/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/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 …]

12345