...

Text file src/cuelang.org/go/cue/testdata/fulleval/002_resolve_all_disjunctions.txtar

Documentation: cuelang.org/go/cue/testdata/fulleval

     1# DO NOT EDIT; generated by go run testdata/gen.go
     2#
     3#name: resolve all disjunctions
     4#evalFull
     5-- in.cue --
     6service: [Name=string]: {
     7	name: string | *Name
     8	port: int | *7080
     9}
    10service: foo: _
    11service: bar: {port: 8000}
    12service: baz: {name: "foobar"}
    13-- out/def --
    14service: {
    15	{[Name=string]: {
    16		name: string | *Name, port: int | *7080
    17	}}
    18	foo: {
    19		name: string | *"foo"
    20		port: int | *7080
    21	}
    22	bar: {
    23		name: string | *"bar"
    24		port: 8000
    25	}
    26	baz: {
    27		name: "foobar"
    28		port: int | *7080
    29	}
    30}
    31-- out/export --
    32service: {
    33	foo: {
    34		name: "foo"
    35		port: 7080
    36	}
    37	bar: {
    38		name: "bar"
    39		port: 8000
    40	}
    41	baz: {
    42		name: "foobar"
    43		port: 7080
    44	}
    45}
    46-- out/yaml --
    47service:
    48  foo:
    49    name: foo
    50    port: 7080
    51  bar:
    52    name: bar
    53    port: 8000
    54  baz:
    55    name: foobar
    56    port: 7080
    57-- out/json --
    58{"service":{"foo":{"name":"foo","port":7080},"bar":{"name":"bar","port":8000},"baz":{"name":"foobar","port":7080}}}
    59-- out/legacy-debug --
    60<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}}}
    61-- out/compile --
    62--- in.cue
    63{
    64  service: {
    65    [string]: {
    66      name: (string|*〈1;-〉)
    67      port: (int|*7080)
    68    }
    69  }
    70  service: {
    71    foo: _
    72  }
    73  service: {
    74    bar: {
    75      port: 8000
    76    }
    77  }
    78  service: {
    79    baz: {
    80      name: "foobar"
    81    }
    82  }
    83}
    84-- out/eval/stats --
    85Leaks:  0
    86Freed:  23
    87Reused: 17
    88Allocs: 6
    89Retain: 0
    90
    91Unifications: 11
    92Conjuncts:    31
    93Disjuncts:    23
    94-- out/eval --
    95(struct){
    96  service: (struct){
    97    foo: (struct){
    98      name: (string){ |(*(string){ "foo" }, (string){ string }) }
    99      port: (int){ |(*(int){ 7080 }, (int){ int }) }
   100    }
   101    bar: (struct){
   102      port: (int){ 8000 }
   103      name: (string){ |(*(string){ "bar" }, (string){ string }) }
   104    }
   105    baz: (struct){
   106      name: (string){ "foobar" }
   107      port: (int){ |(*(int){ 7080 }, (int){ int }) }
   108    }
   109  }
   110}

View as plain text