Support proto3.
diff --git a/proto/text_parser_test.go b/proto/text_parser_test.go
index b9268ee..89ab106 100644
--- a/proto/text_parser_test.go
+++ b/proto/text_parser_test.go
@@ -36,6 +36,7 @@
"reflect"
"testing"
+ proto3pb "./proto3_proto"
. "./testdata"
. "github.com/golang/protobuf/proto"
)
@@ -443,6 +444,21 @@
}
}
+func TestProto3TextParsing(t *testing.T) {
+ m := new(proto3pb.Message)
+ const in = `name: "Wallace" true_scotsman: true`
+ want := &proto3pb.Message{
+ Name: "Wallace",
+ TrueScotsman: true,
+ }
+ if err := UnmarshalText(in, m); err != nil {
+ t.Fatal(err)
+ }
+ if !Equal(m, want) {
+ t.Errorf("\n got %v\nwant %v", m, want)
+ }
+}
+
var benchInput string
func init() {