...

Text file src/cuelang.org/go/cue/testdata/fulleval/043_optional_expanded_before_lookup.txtar

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

     1# DO NOT EDIT; generated by go run testdata/gen.go
     2#
     3#name: optional expanded before lookup
     4#evalFull
     5-- in.cue --
     6test: [ID=_]: {
     7	name: ID
     8}
     9
    10test: A: {
    11	field1: "1"
    12	field2: "2"
    13}
    14
    15B: test.A & {}
    16-- out/def --
    17test: {
    18	{[ID=string]: {
    19		name: ID
    20	}}
    21	A: {
    22		name:   "A"
    23		field1: "1"
    24		field2: "2"
    25	}
    26}
    27B: test.A & {}
    28-- out/export --
    29test: {
    30	A: {
    31		name:   "A"
    32		field1: "1"
    33		field2: "2"
    34	}
    35}
    36B: {
    37	name:   "A"
    38	field1: "1"
    39	field2: "2"
    40}
    41-- out/yaml --
    42test:
    43  A:
    44    name: A
    45    field1: "1"
    46    field2: "2"
    47B:
    48  name: A
    49  field1: "1"
    50  field2: "2"
    51-- out/json --
    52{"test":{"A":{"name":"A","field1":"1","field2":"2"}},"B":{"name":"A","field1":"1","field2":"2"}}
    53-- out/legacy-debug --
    54<0>{test: <1>{[]: <2>(ID: string)-><3>{name: <2>.ID}, A: <4>{name: "A", field1: "1", field2: "2"}}, B: <5>{name: "A", field1: "1", field2: "2"}}
    55-- out/compile --
    56--- in.cue
    57{
    58  test: {
    59    [_]: {
    60      name: 〈1;-〉
    61    }
    62  }
    63  test: {
    64    A: {
    65      field1: "1"
    66      field2: "2"
    67    }
    68  }
    69  B: (〈0;test〉.A & {})
    70}
    71-- out/eval/stats --
    72Leaks:  0
    73Freed:  10
    74Reused: 6
    75Allocs: 4
    76Retain: 0
    77
    78Unifications: 10
    79Conjuncts:    15
    80Disjuncts:    10
    81-- out/eval --
    82(struct){
    83  test: (struct){
    84    A: (struct){
    85      field1: (string){ "1" }
    86      field2: (string){ "2" }
    87      name: (string){ "A" }
    88    }
    89  }
    90  B: (struct){
    91    field1: (string){ "1" }
    92    field2: (string){ "2" }
    93    name: (string){ "A" }
    94  }
    95}

View as plain text