Documentation
¶
Overview ¶
Package resolvertest provides an in-memory file tree for include resolution tests, so tests never touch disk. One seed serves every suite:
resolvertest.Seed("/base/shared.thrift") // existence only
resolver.New(paths, resolver.WithFS(tree)) // fs.FS shape
resolver.New(paths, resolver.WithChecker(tree)) // Checker shape
store.NewMemFS(tree.URIs()) // FileSource shape
The production path stays string paths end to end; URIs converts keys for FileSource-based suites only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
Map is an in-memory file tree keyed by path. Lookups are exact matches, so seed the same form the resolver produces (absolute paths joined from include roots). The zero value is an empty tree, ready for existence checks.
func Seed ¶
Seed builds a Map from paths with no content. Include resolution only probes existence, so content is irrelevant; tests asserting on content seed Map literals directly.
func (Map) Exists ¶
Exists reports whether path is a seeded file, without reading content. It satisfies the resolver's existence checker contract.