bufcoretesting

package
v0.20.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL