Home
last modified time | relevance | path

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

12

/external/antlr/antlr-3.4/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 …]
DFieldCodecTest.cs130 Assert.AreEqual(sampleValue, codec.ValueReader(codedInput)); in TestRoundTripRaw()
143 Assert.AreEqual(sampleValue, codec.Read(codedInput)); in TestRoundTripWithTag()
153 Assert.AreEqual(stream.Position, codec.CalculateSizeWithTag(sampleValue)); in TestCalculateSizeWithTag()
163 Assert.AreEqual(0, stream.Position); in TestDefaultValue()
164 Assert.AreEqual(0, codec.CalculateSizeWithTag(codec.DefaultValue)); in TestDefaultValue()
167 Assert.AreEqual(default(T), codec.DefaultValue); in TestDefaultValue()
177 Assert.AreEqual(stream.Position, codec.ValueSizeCalculator(codec.DefaultValue)); in TestDefaultValue()
180 Assert.AreEqual(codec.DefaultValue, codec.ValueReader(codedInput)); in TestDefaultValue()
186 Assert.AreEqual(name.Contains("Fixed"), codec.FixedSize != 0); in TestFixedSize()
DIssuesTest.cs52 Assert.AreEqual(3, (int)field.Accessor.GetValue(message)); in FieldCalledItem()
60 Assert.AreEqual("{ \"types\": 10, \"descriptor\": 20 }", message.ToString()); in ReservedNames()
70 … Assert.AreEqual(new TestJsonName { Name = "test", Description = "test2", Guid = "test3" }, in JsonNameParseTest()
78 Assert.AreEqual("{ \"name\": \"test\", \"desc\": \"test2\", \"exid\": \"test3\" }", in JsonNameFormatTest()
/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.cs117 Assert.AreEqual(monster.MutateMana((short)10), false); in CanCreateNewFlatBufferFromScratch()
118 Assert.AreEqual(monster.Mana, (short)150); in CanCreateNewFlatBufferFromScratch()
121 Assert.AreEqual(monster.Testarrayoftables(0).Value.Name, "Barney"); in CanCreateNewFlatBufferFromScratch()
122 Assert.AreEqual(monster.Testarrayoftables(1).Value.Name, "Frodo"); in CanCreateNewFlatBufferFromScratch()
123 Assert.AreEqual(monster.Testarrayoftables(2).Value.Name, "Wilma"); in CanCreateNewFlatBufferFromScratch()
131 Assert.AreEqual(monster.TestType, Any.Monster); in CanCreateNewFlatBufferFromScratch()
132 Assert.AreEqual(monster.MutateTestType(Any.NONE), true); in CanCreateNewFlatBufferFromScratch()
133 Assert.AreEqual(monster.TestType, Any.NONE); in CanCreateNewFlatBufferFromScratch()
134 Assert.AreEqual(monster.MutateTestType(Any.Monster), true); in CanCreateNewFlatBufferFromScratch()
135 Assert.AreEqual(monster.TestType, Any.Monster); 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()
61 Assert.AreEqual((byte)1, buffer[0]); in ByteBuffer_PutShortPopulatesBufferCorrectly()
62 Assert.AreEqual((byte)0, buffer[1]); in ByteBuffer_PutShortPopulatesBufferCorrectly()
101 Assert.AreEqual(0x0D, buffer[0]); in ByteBuffer_PutIntPopulatesBufferCorrectly()
102 Assert.AreEqual(0x0C, buffer[1]); in ByteBuffer_PutIntPopulatesBufferCorrectly()
103 Assert.AreEqual(0x0B, buffer[2]); in ByteBuffer_PutIntPopulatesBufferCorrectly()
104 Assert.AreEqual(0x0A, buffer[3]); in ByteBuffer_PutIntPopulatesBufferCorrectly()
141 Assert.AreEqual(0x0D, buffer[0]); in ByteBuffer_PutLongPopulatesBufferCorrectly()
142 Assert.AreEqual(0x0C, buffer[1]); in ByteBuffer_PutLongPopulatesBufferCorrectly()
[all …]
DFlatBufferBuilderTests.cs36 Assert.AreEqual(sizeof(bool), endOffset-storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddBool_AndDefaultValue_OffsetIncreasesBySize()
46 Assert.AreEqual(sizeof(sbyte), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddSByte_AndDefaultValue_OffsetIncreasesBySize()
56 Assert.AreEqual(sizeof(byte), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddByte_AndDefaultValue_OffsetIncreasesBySize()
66 Assert.AreEqual(sizeof(short), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddShort_AndDefaultValue_OffsetIncreasesBySize()
76 Assert.AreEqual(sizeof(ushort), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddUShort_AndDefaultValue_OffsetIncreasesBySize()
86 Assert.AreEqual(sizeof(int), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddInt_AndDefaultValue_OffsetIncreasesBySize()
96 Assert.AreEqual(sizeof(uint), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddUInt_AndDefaultValue_OffsetIncreasesBySize()
106 Assert.AreEqual(sizeof(long), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddLong_AndDefaultValue_OffsetIncreasesBySize()
116 Assert.AreEqual(sizeof(ulong), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddULong_AndDefaultValue_OffsetIncreasesBySize()
126 Assert.AreEqual(sizeof(float), endOffset - storedOffset); in FlatBufferBuilder_WithForceDefaults_WhenAddFloat_AndDefaultValue_OffsetIncreasesBySize()
[all …]
DFlatBuffersFuzzTests.cs679 Assert.AreEqual(FuzzTestData.BoolValue, table.GetSlot(f, false)); in CheckObjects()
684 Assert.AreEqual(FuzzTestData.Int8Value, table.GetSlot(f, (sbyte)0)); in CheckObjects()
689 Assert.AreEqual(FuzzTestData.UInt8Value, table.GetSlot(f, (byte)0)); in CheckObjects()
694 Assert.AreEqual(FuzzTestData.Int16Value, table.GetSlot(f, (short)0)); in CheckObjects()
699 Assert.AreEqual(FuzzTestData.UInt16Value, table.GetSlot(f, (ushort)0)); in CheckObjects()
704 Assert.AreEqual(FuzzTestData.Int32Value, table.GetSlot(f, (int)0)); in CheckObjects()
709 Assert.AreEqual(FuzzTestData.UInt32Value, table.GetSlot(f, (uint)0)); in CheckObjects()
714 Assert.AreEqual(FuzzTestData.Int64Value, table.GetSlot(f, (long)0)); in CheckObjects()
719 Assert.AreEqual(FuzzTestData.UInt64Value, table.GetSlot(f, (ulong)0)); in CheckObjects()
724 Assert.AreEqual(FuzzTestData.Float32Value, table.GetSlot(f, (float)0)); in CheckObjects()
[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 …]
DAnyTest.cs45 Assert.AreEqual("type.googleapis.com/protobuf_unittest.TestAllTypes", any.TypeUrl); in Pack()
46 Assert.AreEqual(message.CalculateSize(), any.Value.Length); in Pack()
54 Assert.AreEqual("foo.bar/baz/protobuf_unittest.TestAllTypes", any.TypeUrl); in Pack_WithCustomPrefix()
55 Assert.AreEqual(message.CalculateSize(), any.Value.Length); in Pack_WithCustomPrefix()
63 Assert.AreEqual("foo.bar/baz/protobuf_unittest.TestAllTypes", any.TypeUrl); in Pack_WithCustomPrefixTrailingSlash()
64 Assert.AreEqual(message.CalculateSize(), any.Value.Length); in Pack_WithCustomPrefixTrailingSlash()
81 Assert.AreEqual(message, unpacked); in Unpack_Success()
90 Assert.AreEqual(message, unpacked); in Unpack_CustomPrefix_Success()
106 Assert.AreEqual("{ \"@type\": \"\", \"@value\": \"\" }", any.ToString()); in ToString_Empty()
113 … Assert.AreEqual("{ \"anyField\": { \"@type\": \"\", \"@value\": \"\" } }", message.ToString()); in ToString_MessageContainingAny()
DTimestampTest.cs58 …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()
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()
112 …Assert.AreEqual("{ \"@warning\": \"Invalid Timestamp\", \"seconds\": \"1\", \"nanos\": -1 }", dura… in ToString_NonNormalized()
/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 …]

12