Documentation ¶
Overview ¶
Package vdltestutil provides testing utilities for v.io/x/ref/lib/vdl/...
Index ¶
- func ExpectFail(t *testing.T, errs *vdlutil.Errors, testName string, re ...string)
- func ExpectPass(t *testing.T, errs *vdlutil.Errors, testName string)
- func ExpectResult(t *testing.T, errs *vdlutil.Errors, testName string, re ...string)
- func FakeBuildPackage(name, path string, files map[string]string) *build.Package
- func FakeOpenFiles(files map[string]string) func(fnames []string) (map[string]io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectFail ¶
ExpectFail makes sure errs has an error that matches all the re regexps.
func ExpectPass ¶
ExpectPass makes sure errs has no errors.
func ExpectResult ¶
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 ¶
FakeBuildPackage constructs a fake build package for testing, with files mapping from file names to file contents.
func FakeOpenFiles ¶
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.
Click to show internal directories.
Click to hide internal directories.