vdltestutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package vdltestutil provides testing utilities for v.io/x/ref/lib/vdl/...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectFail

func ExpectFail(t *testing.T, errs *vdlutil.Errors, testName string, re ...string)

ExpectFail makes sure errs has an error that matches all the re regexps.

func ExpectPass

func ExpectPass(t *testing.T, errs *vdlutil.Errors, testName string)

ExpectPass makes sure errs has no errors.

func ExpectResult

func ExpectResult(t *testing.T, errs *vdlutil.Errors, testName string, re ...string)

ExpectResult ensures errs has an error that matches all the re regexps, or that errs has no errors if no regexps were provided, or only one was provided with the empty string.

func FakeBuildPackage

func FakeBuildPackage(name, path string, files map[string]string) *build.Package

FakeBuildPackage constructs a fake build package for testing, with files mapping from file names to file contents.

func FakeOpenFiles

func FakeOpenFiles(files map[string]string) func(fnames []string) (map[string]io.ReadCloser, error)

FakeOpenFiles returns a function that obeys the build.Package.OpenFilesFunc signature, that simply uses the files map to return readers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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