Package vdltestutil provides testing utilities for



    This section is empty.


    This section is empty.


    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.


              This section is empty.

              Source Files