tests

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

tests

Cross-package integration tests that exercise schema against the mapof and sliceof carrier types together. Part of rosetta.

What matters here

  • This directory does not break an import cycle, and the tests are not special. schema imports mapof and sliceof so it can create their containers (so neither may import schema), and schema's own _test files import both too. The round-trip tests here import all three and verify that the implementations satisfy schema's path get/set contract; they could live in schema just as well.
  • testInline asserts a lossless round-trip: Set then Get returns the same value. It's the shared helper for "this value survives a schema write/read unchanged." Because schema.Set validates and may coerce, a test that fails here often means the value was rewritten by the schema, not that get/set is broken — check the element's validation rules first.

Documentation

Overview

Package tests holds cross-package integration tests that exercise schema against the mapof and sliceof carrier types together.

These tests check that mapof and sliceof satisfy schema's path get/set contract. They do not need their own package to avoid an import cycle: schema imports mapof and sliceof so it can create their containers, and schema's own test files import both as well.

Jump to

Keyboard shortcuts

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