aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2015-06-11 21:15:36 +0100
committerJon Skeet <skeet@pobox.com>2015-06-11 21:15:36 +0100
commit39aaf21d5194fdc07c296847def8e7795279e041 (patch)
tree174c362717574e13047c4d590b5f9609405aed84 /csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
parentce0e348ded9cb7e180588476ebb5a8f3e0460f4e (diff)
downloadprotobuf-39aaf21d5194fdc07c296847def8e7795279e041.tar.gz
protobuf-39aaf21d5194fdc07c296847def8e7795279e041.tar.bz2
protobuf-39aaf21d5194fdc07c296847def8e7795279e041.zip
Reimplement enums as int values, and get rid of EnumHelper.
This makes repeated fields really awkward at the moment - but when we reimplement RepeatedField<T> to be backed by an array, we can cast the array directly...
Diffstat (limited to 'csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs')
-rw-r--r--csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs b/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
index 57650049..aa2da330 100644
--- a/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
@@ -466,18 +466,18 @@ namespace Google.Protobuf
}
}
- enum TestNegEnum : long { None = 0, Value = -2 }
+ enum TestNegEnum { None = 0, Value = -2 }
[Test]
public void TestNegativeEnum()
{
byte[] bytes = new byte[10] { 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01 };
CodedInputStream input = CodedInputStream.CreateInstance(bytes);
- TestNegEnum val = TestNegEnum.None;
+ int val = 0;
Assert.IsTrue(input.ReadEnum(ref val));
Assert.IsTrue(input.IsAtEnd);
- Assert.AreEqual(TestNegEnum.Value, val);
+ Assert.AreEqual((int) TestNegEnum.Value, val);
}
[Test]