bufimagetesting

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertImageFilesEqual

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

AssertImageFilesEqual asserts the expected ImageFiles equal the actual ImageFiles.

func NewImageFile

func NewImageFile(
	t testing.TB,
	fileDescriptor protodescriptor.FileDescriptor,
	moduleIdentity bufmoduleref.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

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

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