goprotobuf: Accept (and ignore) "f" suffix for text format floating point literals.
R=r
CC=golang-dev
http://codereview.appspot.com/6347047
diff --git a/proto/text_parser_test.go b/proto/text_parser_test.go
index 65211a6..cf86ad3 100644
--- a/proto/text_parser_test.go
+++ b/proto/text_parser_test.go
@@ -154,6 +154,19 @@
},
},
+ // Floating point number with "f" suffix
+ {
+ in: "count: 4 others:< weight: 17.0f >",
+ out: &MyMessage{
+ Count: Int32(4),
+ Others: []*OtherMessage{
+ {
+ Weight: Float32(17),
+ },
+ },
+ },
+ },
+
// Number too large for float32
{
in: "others:< weight: 12345678901234567890123456789012345678901234567890 >",