fidlgentest

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndToEndTest

type EndToEndTest struct {
	*testing.T
	// contains filtered or unexported fields
}

EndToEndTest simplifies the creation of end-to-end tests which compile a FIDL library, and produce JSON IR, read back in Go using fidlgen.

Example usage:

root := EndToEndTest{T: t}.Single(`library example; struct MyStruct {};`)

If dependencies are needed:

root := EndToEndTest{T: t}
    .WithDependency(`library dep; struct S{};`)
    .Single(`library example; struct MyStruct{ dep.S foo};`)

func (EndToEndTest) Single

func (t EndToEndTest) Single(content string) fidlgen.Root

Single compiles a single FIDL file, and returns a Root.

func (EndToEndTest) WithDependency

func (t EndToEndTest) WithDependency(content string) EndToEndTest

WithDependency adds the source text for a dependency.

Jump to

Keyboard shortcuts

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