Documentation ¶
Overview ¶
Package protoc contains some helpers for invoking protoc from tests. This technique is used to verify that protocompile produces equivalent outputs and has equivalent behavior as protoc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryPath ¶
BinaryPath returns the path to an appropriate protoc executable. This path is created by the Makefile, so run `make test` instead of `go test ./...` to make sure the path is populated. You can also just create the protoc executable via 'make protoc'.
The protoc executable is used by some tests to verify that the output of this repo matches the output of the reference compiler.
func Compile ¶
Compile compiles the given files with protoc. The fileNames parameter indicates the order of files that should be used in the command line for protoc (can be nil when the order does not matter).
This does not return the full results of compilation, only if compilation succeeded or not. The returned error will be an instance of *exec.ExitError if protoc was successfully invoked but returned a non-zero status.
Types ¶
This section is empty.