aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffersLite.Test/LiteTest.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2010-11-07 18:49:42 -0600
committercsharptest <roger@csharptest.net>2010-11-07 18:49:42 -0600
commit487da48ad2c88d7c07451c546c3541d7db7ceae6 (patch)
tree98a502866fad09e1b775c69b0b58383cb69bd1b8 /src/ProtocolBuffersLite.Test/LiteTest.cs
parent80824a51c2730cad30395cf8c54b2a44546cd744 (diff)
downloadprotobuf-487da48ad2c88d7c07451c546c3541d7db7ceae6.tar.gz
protobuf-487da48ad2c88d7c07451c546c3541d7db7ceae6.tar.bz2
protobuf-487da48ad2c88d7c07451c546c3541d7db7ceae6.zip
Fix for repeated extensions.
Diffstat (limited to 'src/ProtocolBuffersLite.Test/LiteTest.cs')
-rw-r--r--src/ProtocolBuffersLite.Test/LiteTest.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ProtocolBuffersLite.Test/LiteTest.cs b/src/ProtocolBuffersLite.Test/LiteTest.cs
index 632f6f46..df26053d 100644
--- a/src/ProtocolBuffersLite.Test/LiteTest.cs
+++ b/src/ProtocolBuffersLite.Test/LiteTest.cs
@@ -32,6 +32,8 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
+using System;
+using System.Collections.Generic;
using System.IO;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
@@ -81,8 +83,7 @@ namespace Google.ProtocolBuffers {
TestAllExtensionsLite message =
TestAllExtensionsLite.CreateBuilder()
.SetExtension(UnitTestLiteProtoFile.OptionalInt32ExtensionLite, 123)
-#warning broken
-// .AddExtension(UnitTestLiteProtoFile.RepeatedStringExtensionLite, "hello")
+ .AddExtension(UnitTestLiteProtoFile.RepeatedStringExtensionLite, "hello")
.SetExtension(UnitTestLiteProtoFile.OptionalNestedEnumExtensionLite,
TestAllTypesLite.Types.NestedEnum.BAZ)
.SetExtension(UnitTestLiteProtoFile.OptionalNestedMessageExtensionLite,
@@ -96,13 +97,12 @@ namespace Google.ProtocolBuffers {
Assert.AreEqual(123, (int)message2.GetExtension(
UnitTestLiteProtoFile.OptionalInt32ExtensionLite));
-#warning broken type infrence
- //Assert.AreEqual(1, message2.GetExtensionCount(
- // UnitTestLiteProtoFile.RepeatedStringExtensionLite));
- //Assert.AreEqual(1, message2.GetExtension(
- // UnitTestLiteProtoFile.RepeatedStringExtensionLite, 0));
- //Assert.AreEqual("hello", message2.GetExtension(
- // UnitTestLiteProtoFile.RepeatedStringExtensionLite, 0));
+ Assert.AreEqual(1, message2.GetExtensionCount(
+ UnitTestLiteProtoFile.RepeatedStringExtensionLite));
+ Assert.AreEqual(1, message2.GetExtension(
+ UnitTestLiteProtoFile.RepeatedStringExtensionLite).Count);
+ Assert.AreEqual("hello", message2.GetExtension(
+ UnitTestLiteProtoFile.RepeatedStringExtensionLite, 0));
Assert.AreEqual(TestAllTypesLite.Types.NestedEnum.BAZ, message2.GetExtension(
UnitTestLiteProtoFile.OptionalNestedEnumExtensionLite));
Assert.AreEqual(7, message2.GetExtension(