2018-09-21 22:03:34 +00:00
|
|
|
// Copyright 2018 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2018-10-16 00:34:43 +00:00
|
|
|
// +build golden
|
2018-09-21 22:03:34 +00:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/golang/protobuf/v2/internal/protogen/goldentest"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Set --regenerate to regenerate the golden files.
|
|
|
|
var regenerate = flag.Bool("regenerate", false, "regenerate golden files")
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
goldentest.Plugin(main)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestGolden(t *testing.T) {
|
|
|
|
goldentest.Run(t, *regenerate)
|
|
|
|
}
|