aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf.Test
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/src/Google.Protobuf.Test
parent3e5bd2fd240a28d7a8bfab5447e664189e06434b (diff)
Regenerated code from previous C# codegen commit
With this in place, all tests should pass. Fixes #3725.
Diffstat (limited to 'csharp/src/Google.Protobuf.Test')
-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
3 files changed, 26 insertions, 26 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();