package externaltest
import "cuelang.org/go/encoding/jsonschema/internal/externaltest"
Index ¶
- Variables
- func ReadTestDir(dir string) (tests map[string][]*Schema, err error)
- func WriteTestDir(dir string, tests map[string][]*Schema) error
- type Schema
- type Skip
- type Test
Variables ¶
Functions ¶
func ReadTestDir ¶
ReadTestDir reads all the external tests from the given directory.
func WriteTestDir ¶
WriteTestDir writes test data files as read by ReadTestDir to the given directory. The keys of tests are filenames relative to dir.
Types ¶
type Schema ¶
type Schema struct { Description string `json:"description"` Comment string `json:"comment,omitempty"` Schema stdjson.RawMessage `json:"schema"` Skip Skip `json:"skip,omitempty"` Tests []*Test `json:"tests"` // contains filtered or unexported fields }
func (Schema) Pos ¶
type Skip ¶
Skip records information about whether a given schema or test will be skipped when testing. If not present, the test will be expected to pass.
Each key in the map represents the name of a point in the cuetdtest matrix.
type Test ¶
type Test struct { Description string `json:"description"` Comment string `json:"comment,omitempty"` Data stdjson.RawMessage `json:"data"` Valid bool `json:"valid"` Skip Skip `json:"skip,omitempty"` // contains filtered or unexported fields }
func (Test) Pos ¶
Source Files ¶
tests.go
- Version
- v0.12.0 (latest)
- Published
- Jan 30, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 11 hours ago –
Tools for package owners.