blob: 6a3b1ab90cafdc159983710b8812aa0cc30b78ca [file] [log] [blame]
Damien Neil5ec58b92019-04-30 11:36:39 -07001// Copyright 2019 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package prototest_test
6
7import (
8 "fmt"
9 "testing"
10
11 testpb "github.com/golang/protobuf/v2/internal/testprotos/test"
12 test3pb "github.com/golang/protobuf/v2/internal/testprotos/test3"
13 "github.com/golang/protobuf/v2/proto"
14 "github.com/golang/protobuf/v2/testing/prototest"
15)
16
17func Test(t *testing.T) {
18 for _, m := range []proto.Message{
19 (*testpb.TestAllTypes)(nil),
20 (*test3pb.TestAllTypes)(nil),
21 (*testpb.TestRequired)(nil),
22 } {
23 t.Run(fmt.Sprintf("%T", m), func(t *testing.T) {
24 prototest.TestMessage(t, m)
25 })
26 }
27}