bufimagetesting

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 10 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,
	moduleFullName bufmodule.ModuleFullName,
	commit uuid.UUID,
	externalPath string,
	localPath string,
	isImport bool,
	isSyntaxUnspecified bool,
	unusedDependencyIndexes []int32,
) bufimage.ImageFile

NewImageFile returns a new ImageFile for testing.

TODO FUTURE: moduleFullName 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