commit | 56786dc5df1020c892aeb2ecb2e1595a7dbe3957 | [log] [tgz] |
---|---|---|
author | Damien Neil <dneil@google.com> | Tue Feb 11 16:43:13 2020 -0800 |
committer | Damien Neil <dneil@google.com> | Thu Feb 20 22:47:27 2020 +0000 |
tree | e0c002adbd330fe1e697210055e1a0693aa62d97 | |
parent | fb5fde41cd41d9fdd7185cb7e807ed94726b1a7b [diff] [blame] |
testing/prototest: refactor prototest API For consistency with other options types in the protobuf module, make the test function a method of the options. Drop the ExtensionTypes option and just look up the extension types to test with in the provided resolver. Change-Id: I7918bd10b7c003e4af56d27521d30218653d5b4d Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/219142 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
diff --git a/testing/prototest/prototest_test.go b/testing/prototest/prototest_test.go index 44fa0bc..4307d44 100644 --- a/testing/prototest/prototest_test.go +++ b/testing/prototest/prototest_test.go
@@ -38,7 +38,7 @@ for _, m := range ms { t.Run(fmt.Sprintf("%T", m), func(t *testing.T) { - prototest.TestMessage(t, m, prototest.MessageOptions{}) + prototest.Message{}.Test(t, m.ProtoReflect().Type()) }) } }