github.com/solo-io/cue@v0.4.7/cue/testdata/resolve/033_top-level_definition_with_struct_and_disjunction.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: top-level definition with struct and disjunction
     4  #evalPartial
     5  -- in.cue --
     6  #def: {
     7  	Type: string
     8  	Text: string
     9  	Size: int
    10  }
    11  
    12  #def: {
    13  	Type: "B"
    14  	Size: 0
    15  } | {
    16  	Type: "A"
    17  	Size: 1
    18  }
    19  -- out/def --
    20  #def: {
    21  	Size: 0
    22  	Type: "B"
    23  	Text: string
    24  } | {
    25  	Size: 1
    26  	Type: "A"
    27  	Text: string
    28  }
    29  -- out/export --
    30  
    31  -- out/yaml --
    32  {}
    33  -- out/json --
    34  {}
    35  -- out/legacy-debug --
    36  <0>{#def: (<1>C{Size: (0 & int), Type: ("B" & string), Text: string} | <2>C{Size: (1 & int), Type: ("A" & string), Text: string})}
    37  -- out/compile --
    38  --- in.cue
    39  {
    40    #def: {
    41      Type: string
    42      Text: string
    43      Size: int
    44    }
    45    #def: ({
    46      Type: "B"
    47      Size: 0
    48    }|{
    49      Type: "A"
    50      Size: 1
    51    })
    52  }
    53  -- out/eval --
    54  (struct){
    55    #def: (#struct){ |((#struct){
    56        Type: (string){ "B" }
    57        Text: (string){ string }
    58        Size: (int){ 0 }
    59      }, (#struct){
    60        Type: (string){ "A" }
    61        Text: (string){ string }
    62        Size: (int){ 1 }
    63      }) }
    64  }