| # DO NOT EDIT; generated by go run testdata/gen.go |
| # |
| #name: resolve all disjunctions |
| #evalFull |
| -- in.cue -- |
| service: [Name=string]: { |
| name: string | *Name |
| port: int | *7080 |
| } |
| service: foo: _ |
| service: bar: {port: 8000} |
| service: baz: {name: "foobar"} |
| -- out/def -- |
| service: { |
| {[Name=string]: { |
| name: string | *Name, port: int | *7080 |
| }} |
| foo: { |
| name: string | *"foo" |
| port: int | *7080 |
| } |
| bar: { |
| name: string | *"bar" |
| port: 8000 |
| } |
| baz: { |
| name: "foobar" |
| port: int | *7080 |
| } |
| } |
| -- out/export -- |
| service: { |
| foo: { |
| name: "foo" |
| port: 7080 |
| } |
| bar: { |
| name: "bar" |
| port: 8000 |
| } |
| baz: { |
| name: "foobar" |
| port: 7080 |
| } |
| } |
| -- out/yaml -- |
| service: |
| foo: |
| name: foo |
| port: 7080 |
| bar: |
| name: bar |
| port: 8000 |
| baz: |
| name: foobar |
| port: 7080 |
| -- out/json -- |
| {"service":{"foo":{"name":"foo","port":7080},"bar":{"name":"bar","port":8000},"baz":{"name":"foobar","port":7080}}} |
| -- out/legacy-debug -- |
| <0>{service: <1>{[]: <2>(Name: string)-><3>{name: (string | *<2>.Name), port: (int | *7080)}, foo: <4>{name: "foo", port: 7080}, bar: <5>{name: "bar", port: 8000}, baz: <6>{name: "foobar", port: 7080}}} |
| -- out/compile -- |
| --- in.cue |
| { |
| service: { |
| [string]: { |
| name: (string|*〈1;-〉) |
| port: (int|*7080) |
| } |
| } |
| service: { |
| foo: _ |
| } |
| service: { |
| bar: { |
| port: 8000 |
| } |
| } |
| service: { |
| baz: { |
| name: "foobar" |
| } |
| } |
| } |
| -- out/eval -- |
| (struct){ |
| service: (struct){ |
| foo: (struct){ |
| name: (string){ |(*(string){ "foo" }, (string){ string }) } |
| port: (int){ |(*(int){ 7080 }, (int){ int }) } |
| } |
| bar: (struct){ |
| port: (int){ 8000 } |
| name: (string){ |(*(string){ "bar" }, (string){ string }) } |
| } |
| baz: (struct){ |
| name: (string){ "foobar" } |
| port: (int){ |(*(int){ 7080 }, (int){ int }) } |
| } |
| } |
| } |