Skip to content

Commit

Permalink
encoding/prototext: use testmessages_test.go approach, too
Browse files Browse the repository at this point in the history
With this change, we establish a similar mechanism in encoding/prototext as
already exists in the proto package: a testmessages_test.go which serves as an
extension point where one can inject more variants into the corpus of test
messages.

Change-Id: I9f83735a44e5fd2e4736f888aaca428e4cc8ed42
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/623116
Reviewed-by: Chressie Himpel <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
stapelberg committed Oct 29, 2024
1 parent 496557b commit 5c14d72
Show file tree
Hide file tree
Showing 6 changed files with 729 additions and 693 deletions.
2 changes: 1 addition & 1 deletion encoding/protojson/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ func TestMarshal(t *testing.T) {
"optUint64": "0",
"optFloat": 0,
"optDouble": 0,
"optString": "",
"optBytes": "",
"optString": "",
"optEnum": "ZERO",
"optMessage": {}
}`,
Expand Down
Loading

0 comments on commit 5c14d72

Please sign in to comment.