aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers.Test/TextFormatTest.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2009-01-27 12:25:21 +0000
committerJon Skeet <skeet@pobox.com>2009-01-27 12:25:21 +0000
commit642a8140c88dfb61f5f4812fc179e4f42beb4978 (patch)
tree4d5bef960bd3af7d84c168e675076c0f69990e1a /src/ProtocolBuffers.Test/TextFormatTest.cs
parent25a2792283ec695d3c038559ea0682f1d83d9bd3 (diff)
downloadprotobuf-642a8140c88dfb61f5f4812fc179e4f42beb4978.tar.gz
protobuf-642a8140c88dfb61f5f4812fc179e4f42beb4978.tar.bz2
protobuf-642a8140c88dfb61f5f4812fc179e4f42beb4978.zip
Setters/adders now throw ArgumentNullException appropriately.
Diffstat (limited to 'src/ProtocolBuffers.Test/TextFormatTest.cs')
-rw-r--r--src/ProtocolBuffers.Test/TextFormatTest.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ProtocolBuffers.Test/TextFormatTest.cs b/src/ProtocolBuffers.Test/TextFormatTest.cs
index d8de4b8e..a8e0de4d 100644
--- a/src/ProtocolBuffers.Test/TextFormatTest.cs
+++ b/src/ProtocolBuffers.Test/TextFormatTest.cs
@@ -499,5 +499,29 @@ namespace Google.ProtocolBuffers {
AssertFormatException(() => TextFormat.ParseUInt64("-1"));
AssertFormatException(() => TextFormat.ParseInt32("abcd"));
}
+
+ [Test]
+ public void ParseLongString() {
+ string longText =
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890" +
+ "123456789012345678901234567890123456789012345678901234567890";
+ TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
+ TextFormat.Merge("optional_string: \"" + longText + "\"", builder);
+ Assert.AreEqual(longText, builder.OptionalString);
+ }
}
}