diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-10-24 11:41:00 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-10-24 11:41:00 -0700 |
commit | d4569d1f5ede96238dbb87b0ecc1fdcfbd399f62 (patch) | |
tree | 879c8b3b426b7ca4aab0af31ae1b847832dbf989 /csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs | |
parent | dfae9e36c7c45b02f39463152c4f6560622d4a78 (diff) | |
parent | 55313c9c5d7917d58428d84d193ae3772e4684f8 (diff) | |
download | protobuf-d4569d1f5ede96238dbb87b0ecc1fdcfbd399f62.tar.gz protobuf-d4569d1f5ede96238dbb87b0ecc1fdcfbd399f62.tar.bz2 protobuf-d4569d1f5ede96238dbb87b0ecc1fdcfbd399f62.zip |
Merge pull request #908 from jskeet/oneof-equality
Use oneof case in equality tests
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs index addec057..38cd5718 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs @@ -1260,6 +1260,8 @@ namespace UnitTest.Issues.TestProtos { if (PlainString != other.PlainString) return false; if (O2Int32 != other.O2Int32) return false; if (O2String != other.O2String) return false; + if (O1Case != other.O1Case) return false; + if (O2Case != other.O2Case) return false; return true; } @@ -1271,6 +1273,8 @@ namespace UnitTest.Issues.TestProtos { if (PlainString.Length != 0) hash ^= PlainString.GetHashCode(); if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode(); if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode(); + hash ^= (int) o1Case_; + hash ^= (int) o2Case_; return hash; } |