diff options
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/IssuesTest.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/IssuesTest.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf.Test/IssuesTest.cs b/csharp/src/Google.Protobuf.Test/IssuesTest.cs index b5ad34ae..47a10c50 100644 --- a/csharp/src/Google.Protobuf.Test/IssuesTest.cs +++ b/csharp/src/Google.Protobuf.Test/IssuesTest.cs @@ -52,5 +52,13 @@ namespace Google.Protobuf // TODO(jonskeet): Reflection...
// Assert.AreEqual(3, (int)message[field]);
}
+
+ [Test]
+ public void ReservedNames()
+ {
+ var message = new ReservedNames { Types_ = 10, Descriptor_ = 20 };
+ // Underscores aren't reflected in the JSON.
+ Assert.AreEqual("{ \"types\": 10, \"descriptor\": 20 }", message.ToString());
+ }
}
}
|