Documentation
¶
Overview ¶
Package fuzzing holds what the fuzz targets share: finding the documents they seed their corpus with, and telling which documents survive YAML.
Index ¶
Constants ¶
const MaxSize = 16 << 10
MaxSize keeps the seed corpus small enough that `go test ./...` still replays it on every run without noticeably slowing the suite down.
Variables ¶
This section is empty.
Functions ¶
func APIsGuru ¶
APIsGuru returns the documents of the APIs-guru corpus under testdata whose top-level keys include marker, e.g. "openapi:" or "swagger:". The corpus is downloaded by the TestV{2,3}ApisGuruOpenapiDirectory tests, and when it is absent this returns nothing. Under -short, which skips those tests, it returns nothing either, keeping the short suite short.
func LosesInYAML ¶
LosesInYAML reports whether v, decoded from JSON, holds something the YAML emitter does not write back faithfully, so a round trip through YAML text cannot be expected to preserve it:
- a "<<" key, which is written unquoted and so reads back as a merge;
- a string starting with a line break, which is written as a block scalar that drops it.
Types ¶
This section is empty.