aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp
diff options
context:
space:
mode:
authorGravatar Jon Skeet <jonskeet@google.com>2017-10-25 16:04:45 +0100
committerGravatar Jon Skeet <skeet@pobox.com>2017-12-09 09:49:24 +0000
commit31c54d1289f2ae44158eff631526762366ba1707 (patch)
tree22375c89847cad789c63dd306c5ad50d04d511ab /csharp
parent3e5bd2fd240a28d7a8bfab5447e664189e06434b (diff)
Regenerated code from previous C# codegen commit
With this in place, all tests should pass. Fixes #3725.
Diffstat (limited to 'csharp')
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs24
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs12
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs16
-rw-r--r--csharp/src/Google.Protobuf/Reflection/Descriptor.cs4
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs4
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs8
6 files changed, 34 insertions, 34 deletions
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs
index 45850bb0..d3aaa01b 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs
@@ -1730,8 +1730,8 @@ namespace ProtobufTestMessages.Proto3 {
if (OptionalFixed64 != other.OptionalFixed64) return false;
if (OptionalSfixed32 != other.OptionalSfixed32) return false;
if (OptionalSfixed64 != other.OptionalSfixed64) return false;
- if (OptionalFloat != other.OptionalFloat) return false;
- if (OptionalDouble != other.OptionalDouble) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OptionalFloat, other.OptionalFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(OptionalDouble, other.OptionalDouble)) return false;
if (OptionalBool != other.OptionalBool) return false;
if (OptionalString != other.OptionalString) return false;
if (OptionalBytes != other.OptionalBytes) return false;
@@ -1788,16 +1788,16 @@ namespace ProtobufTestMessages.Proto3 {
if (OneofBytes != other.OneofBytes) return false;
if (OneofBool != other.OneofBool) return false;
if (OneofUint64 != other.OneofUint64) return false;
- if (OneofFloat != other.OneofFloat) return false;
- if (OneofDouble != other.OneofDouble) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OneofFloat, other.OneofFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(OneofDouble, other.OneofDouble)) return false;
if (OneofEnum != other.OneofEnum) return false;
if (OptionalBoolWrapper != other.OptionalBoolWrapper) return false;
if (OptionalInt32Wrapper != other.OptionalInt32Wrapper) return false;
if (OptionalInt64Wrapper != other.OptionalInt64Wrapper) return false;
if (OptionalUint32Wrapper != other.OptionalUint32Wrapper) return false;
if (OptionalUint64Wrapper != other.OptionalUint64Wrapper) return false;
- if (OptionalFloatWrapper != other.OptionalFloatWrapper) return false;
- if (OptionalDoubleWrapper != other.OptionalDoubleWrapper) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.Equals(OptionalFloatWrapper, other.OptionalFloatWrapper)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.Equals(OptionalDoubleWrapper, other.OptionalDoubleWrapper)) return false;
if (OptionalStringWrapper != other.OptionalStringWrapper) return false;
if (OptionalBytesWrapper != other.OptionalBytesWrapper) return false;
if(!repeatedBoolWrapper_.Equals(other.repeatedBoolWrapper_)) return false;
@@ -1856,8 +1856,8 @@ namespace ProtobufTestMessages.Proto3 {
if (OptionalFixed64 != 0UL) hash ^= OptionalFixed64.GetHashCode();
if (OptionalSfixed32 != 0) hash ^= OptionalSfixed32.GetHashCode();
if (OptionalSfixed64 != 0L) hash ^= OptionalSfixed64.GetHashCode();
- if (OptionalFloat != 0F) hash ^= OptionalFloat.GetHashCode();
- if (OptionalDouble != 0D) hash ^= OptionalDouble.GetHashCode();
+ if (OptionalFloat != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OptionalFloat);
+ if (OptionalDouble != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OptionalDouble);
if (OptionalBool != false) hash ^= OptionalBool.GetHashCode();
if (OptionalString.Length != 0) hash ^= OptionalString.GetHashCode();
if (OptionalBytes.Length != 0) hash ^= OptionalBytes.GetHashCode();
@@ -1914,16 +1914,16 @@ namespace ProtobufTestMessages.Proto3 {
if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.OneofBool) hash ^= OneofBool.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint64) hash ^= OneofUint64.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofFloat) hash ^= OneofFloat.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.OneofDouble) hash ^= OneofDouble.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OneofFloat);
+ if (oneofFieldCase_ == OneofFieldOneofCase.OneofDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OneofDouble);
if (oneofFieldCase_ == OneofFieldOneofCase.OneofEnum) hash ^= OneofEnum.GetHashCode();
if (optionalBoolWrapper_ != null) hash ^= OptionalBoolWrapper.GetHashCode();
if (optionalInt32Wrapper_ != null) hash ^= OptionalInt32Wrapper.GetHashCode();
if (optionalInt64Wrapper_ != null) hash ^= OptionalInt64Wrapper.GetHashCode();
if (optionalUint32Wrapper_ != null) hash ^= OptionalUint32Wrapper.GetHashCode();
if (optionalUint64Wrapper_ != null) hash ^= OptionalUint64Wrapper.GetHashCode();
- if (optionalFloatWrapper_ != null) hash ^= OptionalFloatWrapper.GetHashCode();
- if (optionalDoubleWrapper_ != null) hash ^= OptionalDoubleWrapper.GetHashCode();
+ if (optionalFloatWrapper_ != null) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.GetHashCode(OptionalFloatWrapper);
+ if (optionalDoubleWrapper_ != null) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(OptionalDoubleWrapper);
if (optionalStringWrapper_ != null) hash ^= OptionalStringWrapper.GetHashCode();
if (optionalBytesWrapper_ != null) hash ^= OptionalBytesWrapper.GetHashCode();
hash ^= repeatedBoolWrapper_.GetHashCode();
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
index 35bd2137..f95f0af8 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs
@@ -889,8 +889,8 @@ namespace Google.Protobuf.TestProtos {
if (SingleFixed64 != other.SingleFixed64) return false;
if (SingleSfixed32 != other.SingleSfixed32) return false;
if (SingleSfixed64 != other.SingleSfixed64) return false;
- if (SingleFloat != other.SingleFloat) return false;
- if (SingleDouble != other.SingleDouble) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SingleFloat, other.SingleFloat)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SingleDouble, other.SingleDouble)) return false;
if (SingleBool != other.SingleBool) return false;
if (SingleString != other.SingleString) return false;
if (SingleBytes != other.SingleBytes) return false;
@@ -944,8 +944,8 @@ namespace Google.Protobuf.TestProtos {
if (SingleFixed64 != 0UL) hash ^= SingleFixed64.GetHashCode();
if (SingleSfixed32 != 0) hash ^= SingleSfixed32.GetHashCode();
if (SingleSfixed64 != 0L) hash ^= SingleSfixed64.GetHashCode();
- if (SingleFloat != 0F) hash ^= SingleFloat.GetHashCode();
- if (SingleDouble != 0D) hash ^= SingleDouble.GetHashCode();
+ if (SingleFloat != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SingleFloat);
+ if (SingleDouble != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SingleDouble);
if (SingleBool != false) hash ^= SingleBool.GetHashCode();
if (SingleString.Length != 0) hash ^= SingleString.GetHashCode();
if (SingleBytes.Length != 0) hash ^= SingleBytes.GetHashCode();
@@ -3453,7 +3453,7 @@ namespace Google.Protobuf.TestProtos {
}
if (MyString != other.MyString) return false;
if (MyInt != other.MyInt) return false;
- if (MyFloat != other.MyFloat) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MyFloat, other.MyFloat)) return false;
if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
return true;
}
@@ -3463,7 +3463,7 @@ namespace Google.Protobuf.TestProtos {
int hash = 1;
if (MyString.Length != 0) hash ^= MyString.GetHashCode();
if (MyInt != 0L) hash ^= MyInt.GetHashCode();
- if (MyFloat != 0F) hash ^= MyFloat.GetHashCode();
+ if (MyFloat != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MyFloat);
if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
return hash;
}
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
index 9c415d6c..ea2a83fc 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
@@ -470,8 +470,8 @@ namespace Google.Protobuf.TestProtos {
if (!object.Equals(StructField, other.StructField)) return false;
if (!object.Equals(TimestampField, other.TimestampField)) return false;
if (!object.Equals(TypeField, other.TypeField)) return false;
- if (DoubleField != other.DoubleField) return false;
- if (FloatField != other.FloatField) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.Equals(DoubleField, other.DoubleField)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.Equals(FloatField, other.FloatField)) return false;
if (Int64Field != other.Int64Field) return false;
if (Uint64Field != other.Uint64Field) return false;
if (Int32Field != other.Int32Field) return false;
@@ -495,8 +495,8 @@ namespace Google.Protobuf.TestProtos {
if (structField_ != null) hash ^= StructField.GetHashCode();
if (timestampField_ != null) hash ^= TimestampField.GetHashCode();
if (typeField_ != null) hash ^= TypeField.GetHashCode();
- if (doubleField_ != null) hash ^= DoubleField.GetHashCode();
- if (floatField_ != null) hash ^= FloatField.GetHashCode();
+ if (doubleField_ != null) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(DoubleField);
+ if (floatField_ != null) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.GetHashCode(FloatField);
if (int64Field_ != null) hash ^= Int64Field.GetHashCode();
if (uint64Field_ != null) hash ^= Uint64Field.GetHashCode();
if (int32Field_ != null) hash ^= Int32Field.GetHashCode();
@@ -1713,8 +1713,8 @@ namespace Google.Protobuf.TestProtos {
if (!object.Equals(StructField, other.StructField)) return false;
if (!object.Equals(TimestampField, other.TimestampField)) return false;
if (!object.Equals(TypeField, other.TypeField)) return false;
- if (DoubleField != other.DoubleField) return false;
- if (FloatField != other.FloatField) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.Equals(DoubleField, other.DoubleField)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.Equals(FloatField, other.FloatField)) return false;
if (Int64Field != other.Int64Field) return false;
if (Uint64Field != other.Uint64Field) return false;
if (Int32Field != other.Int32Field) return false;
@@ -1738,8 +1738,8 @@ namespace Google.Protobuf.TestProtos {
if (oneofFieldCase_ == OneofFieldOneofCase.StructField) hash ^= StructField.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.TimestampField) hash ^= TimestampField.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.TypeField) hash ^= TypeField.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.DoubleField) hash ^= DoubleField.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.FloatField) hash ^= FloatField.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.DoubleField) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(DoubleField);
+ if (oneofFieldCase_ == OneofFieldOneofCase.FloatField) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.GetHashCode(FloatField);
if (oneofFieldCase_ == OneofFieldOneofCase.Int64Field) hash ^= Int64Field.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.Uint64Field) hash ^= Uint64Field.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.Int32Field) hash ^= Int32Field.GetHashCode();
diff --git a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
index 6aad0e99..e0f1b8f5 100644
--- a/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
+++ b/csharp/src/Google.Protobuf/Reflection/Descriptor.cs
@@ -5456,7 +5456,7 @@ namespace Google.Protobuf.Reflection {
if (IdentifierValue != other.IdentifierValue) return false;
if (PositiveIntValue != other.PositiveIntValue) return false;
if (NegativeIntValue != other.NegativeIntValue) return false;
- if (DoubleValue != other.DoubleValue) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(DoubleValue, other.DoubleValue)) return false;
if (StringValue != other.StringValue) return false;
if (AggregateValue != other.AggregateValue) return false;
return true;
@@ -5469,7 +5469,7 @@ namespace Google.Protobuf.Reflection {
if (IdentifierValue.Length != 0) hash ^= IdentifierValue.GetHashCode();
if (PositiveIntValue != 0UL) hash ^= PositiveIntValue.GetHashCode();
if (NegativeIntValue != 0L) hash ^= NegativeIntValue.GetHashCode();
- if (DoubleValue != 0D) hash ^= DoubleValue.GetHashCode();
+ if (DoubleValue != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue);
if (StringValue.Length != 0) hash ^= StringValue.GetHashCode();
if (AggregateValue.Length != 0) hash ^= AggregateValue.GetHashCode();
return hash;
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
index 65119894..8468f74e 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs
@@ -368,7 +368,7 @@ namespace Google.Protobuf.WellKnownTypes {
return true;
}
if (NullValue != other.NullValue) return false;
- if (NumberValue != other.NumberValue) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(NumberValue, other.NumberValue)) return false;
if (StringValue != other.StringValue) return false;
if (BoolValue != other.BoolValue) return false;
if (!object.Equals(StructValue, other.StructValue)) return false;
@@ -381,7 +381,7 @@ namespace Google.Protobuf.WellKnownTypes {
public override int GetHashCode() {
int hash = 1;
if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode();
- if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCode();
+ if (kindCase_ == KindOneofCase.NumberValue) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NumberValue);
if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode();
if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode();
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
index 9a5fb81e..960cfdee 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs
@@ -114,14 +114,14 @@ namespace Google.Protobuf.WellKnownTypes {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Value != other.Value) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Value, other.Value)) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Value != 0D) hash ^= Value.GetHashCode();
+ if (Value != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Value);
return hash;
}
@@ -239,14 +239,14 @@ namespace Google.Protobuf.WellKnownTypes {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Value != other.Value) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Value, other.Value)) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Value != 0F) hash ^= Value.GetHashCode();
+ if (Value != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Value);
return hash;
}