bufimagetesting

package
v0.16.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFileRefsEqual

func AssertFileRefsEqual(t *testing.T, expected []bufimage.FileRef, actual []bufimage.FileRef)

AssertFileRefsEqual asserts the expected FileRefs equal the acutal FileRefs.

func AssertFilesEqual

func AssertFilesEqual(t *testing.T, expected []bufimage.File, actual []bufimage.File)

AssertFilesEqual assets the expected ComparableFiles equal the acutal Files.

func NewDirectFile

func NewDirectFile(
	t *testing.T,
	fileDescriptorProto *descriptorpb.FileDescriptorProto,
	rootDirPath string,
	externalFilePath string,
	isImport bool,
) bufimage.File

NewDirectFile returns a new File for testing.

func NewDirectFileRef

func NewDirectFileRef(
	t *testing.T,
	rootRelFilePath string,
	rootDirPath string,
	externalFilePath string,
) bufimage.FileRef

NewDirectFileRef returns a new FileRef for testing.

func NewFile

func NewFile(
	t *testing.T,
	fileDescriptorProto *descriptorpb.FileDescriptorProto,
	rootDirPath string,
	externalPathResolver bufpath.ExternalPathResolver,
	isImport bool,
) bufimage.File

NewFile returns a new File for testing.

func NewFileDescriptorProto

func NewFileDescriptorProto(
	t *testing.T,
	rootRelFilePath string,
	importRootRelFilePaths ...string,
) *descriptorpb.FileDescriptorProto

NewFileDescriptorProto returns a new FileDescriptorProto for testing.

func NewFileRef

func NewFileRef(
	t *testing.T,
	rootRelFilePath string,
	rootDirPath string,
	externalPathResolver bufpath.ExternalPathResolver,
) bufimage.FileRef

NewFileRef returns a new FileRef 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