Documentation
¶
Overview ¶
Package conformance loads and filters ECMA-402 conformance fixtures.
It gives formatter tests one shared representation for skip lists, expected failures, divergences, and product coverage checks.
Only tests and conformance tools should use this package; runtime formatter code must not depend on fixture metadata.
Index ¶
- Constants
- func CoverageReport(packageRoots []string, skipListPath string) (string, error)
- func RunFixtures(t *testing.T, root string, run func(*testing.T, Fixture))
- func ValidateDivergences(root string) error
- func ValidateFixtureRoots(roots []string, now time.Time) error
- func ValidateNodeWitnessCoverage(packageRoots []string) error
- func ValidateSkipList(path string, packageRoots []string) error
- type Fixture
- type Part
- type RangePart
- type SegmentRecord
Constants ¶
View Source
const FeatureSupportedLocalesOf = "supportedLocalesOf"
FeatureSupportedLocalesOf is the conformance fixture feature for Intl.<Constructor>.supportedLocalesOf behavior.
Variables ¶
This section is empty.
Functions ¶
func CoverageReport ¶
func ValidateDivergences ¶
func ValidateNodeWitnessCoverage ¶ added in v0.2.8
func ValidateSkipList ¶
Types ¶
type Fixture ¶
type Fixture struct {
ID string `json:"id"`
Source string `json:"source"`
Locale string `json:"locale"`
Feature string `json:"feature,omitempty"`
Options json.RawMessage `json:"options"`
Input json.RawMessage `json:"input"`
Expected *string `json:"expected,omitempty"`
ExpectedOK *bool `json:"expectedOk,omitempty"`
ExpectedLocales []string `json:"expectedLocales,omitempty"`
ExpectedParts []Part `json:"expectedParts,omitempty"`
ExpectedRange *string `json:"expectedRange,omitempty"`
ExpectedRangeParts []RangePart `json:"expectedRangeParts,omitempty"`
ExpectedComparison *int `json:"expectedComparison,omitempty"`
ExpectedResolved json.RawMessage `json:"expectedResolvedOptions,omitempty"`
ExpectedSegments []SegmentRecord `json:"expectedSegments,omitempty"`
ErrorCode string `json:"errorCode,omitempty"`
}
func LoadFixtures ¶
func (Fixture) IsSupportedLocalesOf ¶ added in v0.2.9
IsSupportedLocalesOf reports whether the fixture exercises supportedLocalesOf.
Click to show internal directories.
Click to hide internal directories.