bufimagetesting

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertImageFilesEqual added in v0.45.0

func AssertImageFilesEqual(t testing.TB, expected []bufimage.ImageFile, actual []bufimage.ImageFile)

AssertImageFilesEqual asserts the expected ImageFiles equal the actual ImageFiles.

func NewImageFile added in v0.45.0

func NewImageFile(
	t testing.TB,
	fileDescriptor protodescriptor.FileDescriptor,
	moduleIdentity bufmodule.ModuleIdentity,
	commit string,
	externalPath string,
	isImport bool,
	isSyntaxUnspecified bool,
	unusedDependencyIndexes []int32,
) bufimage.ImageFile

NewImageFile returns a new ImageFile for testing.

TODO: moduleIdentity and commit should be options.

func NewProtoImageFile added in v0.45.0

func NewProtoImageFile(
	t testing.TB,
	path string,
	importPaths ...string,
) *imagev1.ImageFile

NewProtoImageFile returns a new *imagev1.ImageFile for testing.

This is also a protodescriptor.FileDescriptor.

func NewProtoImageFileIsImport added in v0.45.0

func NewProtoImageFileIsImport(
	t testing.TB,
	path string,
	importPaths ...string,
) *imagev1.ImageFile

NewProtoImageFileIsImport returns a new *imagev1.ImageFile for testing that is an import.

This is also a protodescriptor.FileDescriptor.

Types

This section is empty.

Jump to

Keyboard shortcuts

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