mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-26 03:20:53 +00:00
proto: refactor equal_test from explicit table to use makeMessages()
This is important for test coverage: the makeMessages() function is where we declare the various different test message types. Using this central function is better than explicitly having to spell out all the various cases in the test table. This CL is roughly neutral in terms of lines changed, but actually increases coverage: in the existing table, not every group of tests had coverage for all cases (proto2, proto3, editions). This was difficult to spot previously, but now the different test message types are now clearly spelled out (allTypesNoProto3). Also, the test now prints the description and message types as subtest name. This makes it easy to verify coverage by just reading the test output. Change-Id: I08f541548d087233cbb4686785c456674371c2a3 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/623115 Reviewed-by: Chressie Himpel <chressie@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
0517e5afc7
commit
496557b1d5
1723
proto/equal_test.go
1723
proto/equal_test.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user