v.io: v.io/x/ref/lib/vdl/internal/vdltestutil Index | Files

package vdltestutil

import "v.io/x/ref/lib/vdl/internal/vdltestutil"

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

Index

Package Files

util.go

func ExpectFail Uses

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 Uses

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

ExpectPass makes sure errs has no errors.

func ExpectResult Uses

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 Uses

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 Uses

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.

Package vdltestutil imports 7 packages (graph). Updated 2020-09-08. Refresh now. Tools for package owners.