Debian Codegraph @

testdata/fuzz_json_roundtrip.yaml

raw symbols SCIP
1 # Copyright 2025 The go-yaml Project Contributors
2 # SPDX-License-Identifier: Apache-2.0
3
4 # JSON roundtrip fuzz test seed corpus for go-yaml
5 #
6 # Purpose: Seed inputs for FuzzEncodeFromJSON. These are valid JSON values that
7 # are tested for YAML roundtrip consistency: Marshal → Unmarshal → Marshal
8 # should produce identical YAML output.
9 #
10 # Format: Test cases use type-as-key format:
11 # - test-type:
12 # name: Test case name
13 # ...
14 #
15 # Test Type:
16 # json-roundtrip - Valid JSON input for roundtrip testing
17 #
18 # Keys:
19 # name - Test case name (string)
20 # json - JSON input to test (string)
21 #
22 # Note:
23 # These test cases are loaded as the seed corpus for Go's native fuzzing.
24 # When run without -fuzz, only these seeds are tested. With -fuzz, the fuzzer
25 # generates additional test cases based on these seeds.
26
27 - json-roundtrip:
28 name: null value
29 json: "null"
30
31 - json-roundtrip:
32 name: empty string
33 json: '""'
34
35 - json-roundtrip:
36 name: zero
37 json: "0"
38
39 - json-roundtrip:
40 name: boolean true
41 json: "true"
42
43 - json-roundtrip:
44 name: boolean false
45 json: "false"
46
47 - json-roundtrip:
48 name: empty object
49 json: "{}"
50
51 - json-roundtrip:
52 name: empty array
53 json: "[]"
54
55 - json-roundtrip:
56 name: nested empty array
57 json: "[[]]"
58
59 - json-roundtrip:
60 name: object with empty array value
61 json: '{"a":[]}'
62
63 - json-roundtrip:
64 name: object with empty object value
65 json: '{"a":{}}'
66
67 - json-roundtrip:
68 name: negative zero
69 json: "-0"
70
71 - json-roundtrip:
72 name: negative zero with decimals
73 json: "-0.000"
74
75 - json-roundtrip:
76 name: newline string
77 json: '"\n"'
78
79 - json-roundtrip:
80 name: tab string
81 json: '"\t"'