Back to godoc.org
github.com/bufbuild/buf / internal / buf / bufcore / bufcoretesting

Package bufcoretesting

v0.20.5
Latest Go to latest

The latest major version is .

Published: Jul 24, 2020 | License: Apache-2.0 | Module: github.com/bufbuild/buf

Index

func AssertFileInfosEqual

func AssertFileInfosEqual(t *testing.T, expected []bufcore.FileInfo, actual []bufcore.FileInfo)

AssertFileInfosEqual asserts the expected FileInfos equal the actual FileInfos.

func AssertImageFilesEqual

func AssertImageFilesEqual(t *testing.T, expected []bufcore.ImageFile, actual []bufcore.ImageFile)

AssertImageFilesEqual asserts the expected ImageFiles equal the actual ImageFiles.

func FileInfoToAbs

func FileInfoToAbs(t *testing.T, fileInfo bufcore.FileInfo) bufcore.FileInfo

FileInfoToAbs converts the external path to absolute.

func FileInfosToAbs

func FileInfosToAbs(t *testing.T, fileInfos []bufcore.FileInfo) []bufcore.FileInfo

FileInfosToAbs converts the external paths to absolute.

func NewFileDescriptorProto

func NewFileDescriptorProto(
	t *testing.T,
	path string,
	importPaths ...string,
) *descriptorpb.FileDescriptorProto

NewFileDescriptorProto returns a new FileDescriptorProto for testing.

func NewFileInfo

func NewFileInfo(
	t *testing.T,
	path string,
	externalPath string,
	isImport bool,
) bufcore.FileInfo

NewFileInfo returns a new FileInfo for testing.

func NewImageFile

func NewImageFile(
	t *testing.T,
	fileDescriptorProto *descriptorpb.FileDescriptorProto,
	externalPath string,
	isImport bool,
) bufcore.ImageFile

NewImageFile returns a new ImageFile for testing.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier