Documentation
¶
Index ¶
- func ParseTestFilesAndSymlinks[T any](code string, fileName string, ...) (units []T, symlinks map[string]string, currentDir string, ...)
- func ParseTestFilesAndSymlinksWithOptions[T any](code string, fileName string, ...) (units []T, symlinks map[string]string, currentDir string, ...)
- type CompilerBaselineRunner
- type CompilerTestType
- type ParseTestFilesOptions
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseTestFilesAndSymlinks ¶
func ParseTestFilesAndSymlinks[T any]( code string, fileName string, parseFile func(filename string, content string, fileOptions map[string]string) (T, error), ) (units []T, symlinks map[string]string, currentDir string, globalOptions map[string]string, e error)
Given a test file containing // @FileName and // @symlink directives, return an array of named units of code to be added to an existing compiler instance, along with a map of symlinks and the current directory.
func ParseTestFilesAndSymlinksWithOptions ¶
func ParseTestFilesAndSymlinksWithOptions[T any]( code string, fileName string, parseFile func(filename string, content string, fileOptions map[string]string) (T, error), options ParseTestFilesOptions, ) (units []T, symlinks map[string]string, currentDir string, globalOptions map[string]string, e error)
Types ¶
type CompilerBaselineRunner ¶
type CompilerBaselineRunner struct {
// contains filtered or unexported fields
}
func NewCompilerBaselineRunner ¶
func NewCompilerBaselineRunner(testType CompilerTestType, isSubmodule bool) *CompilerBaselineRunner
func (*CompilerBaselineRunner) EnumerateTestFiles ¶
func (r *CompilerBaselineRunner) EnumerateTestFiles() []string
func (*CompilerBaselineRunner) RunTests ¶
func (r *CompilerBaselineRunner) RunTests(t *testing.T)
type CompilerTestType ¶
type CompilerTestType int
const ( TestTypeConformance CompilerTestType = iota TestTypeRegression )
func (*CompilerTestType) String ¶
func (t *CompilerTestType) String() string
type ParseTestFilesOptions ¶
type ParseTestFilesOptions struct {
// If true, allows test content to appear before the first @Filename directive.
// In this case, an implicit first file is created using the fileName parameter.
// This matches the behavior of the TypeScript fourslash test harness.
AllowImplicitFirstFile bool
}
Click to show internal directories.
Click to hide internal directories.