proto: add Merge tests for aberrant inputs

The generated Go code does not perfectly represent the protobuf data model.
As such, it is possible to construct Go message values that could not
otherwise be constructed through Unmarshal or Merge.
This CL adds a test to exercise some of the boundary conditions.
The tests do not necessarily lock in the current behavior, but provides
a way for us to know when they have changed (either intentionally or not).

Change-Id: I389ef97c2fcf037595ad553baf5270d7bee9673b
Reviewed-by: Damien Neil <>
1 file changed
tree: b8a45bf695da552cf809d9ef9adfcf2b5c9181b8
  1. .gitignore
  2. .travis.yml
  9. cmd/
  10. compiler/
  11. encoding/
  12. go.mod
  13. go.sum
  14. integration_test.go
  15. internal/
  16. proto/
  17. reflect/
  18. regenerate.bash
  19. release.bash
  20. runtime/
  21. test.bash
  22. testing/
  23. types/

Next Generation Go Protocol Buffers

WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.

This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.

Design Documents

List of relevant design documents:


We appreciate community contributions. See

Reporting Issues

Issues regarding the new API can be filed at Please use a APIv2: prefix in the title to make it clear that the issue is regarding the new API work.