...

Text file src/cuelang.org/go/cue/testdata/resolve/044_field_templates.txtar

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

     1# DO NOT EDIT; generated by go run testdata/gen.go
     2#
     3#name: field templates
     4#evalPartial
     5-- in.cue --
     6a: {
     7	{[name=_]: int}
     8	k: 1
     9}
    10b: {
    11	{[X=_]: {x: 0, y: *1 | int}}
    12	v: {}
    13	w: {x: 0}
    14}
    15b: {[y=_]: {}}
    16c: {
    17	{[Name=_]: {name: Name, y: 1}}
    18	foo: {}
    19	bar: _
    20}
    21-- out/def --
    22a: {
    23	{[name=string]: int}
    24	k: 1
    25}
    26b: {
    27	{[X=string]: {
    28		x: 0, y: *1 | int
    29	}}
    30	v: {
    31		x: 0
    32		y: *1 | int
    33	}
    34	w: {
    35		x: 0
    36		y: *1 | int
    37	}
    38}
    39c: {
    40	{[Name=string]: {
    41		y: 1, name: Name
    42	}}
    43	foo: {
    44		y:    1
    45		name: "foo"
    46	}
    47	bar: {
    48		y:    1
    49		name: "bar"
    50	}
    51}
    52-- out/export --
    53a: {
    54	k: 1
    55}
    56b: {
    57	v: {
    58		x: 0
    59		y: 1
    60	}
    61	w: {
    62		x: 0
    63		y: 1
    64	}
    65}
    66c: {
    67	foo: {
    68		y:    1
    69		name: "foo"
    70	}
    71	bar: {
    72		y:    1
    73		name: "bar"
    74	}
    75}
    76-- out/yaml --
    77a:
    78  k: 1
    79b:
    80  v:
    81    x: 0
    82    y: 1
    83  w:
    84    x: 0
    85    y: 1
    86c:
    87  foo:
    88    y: 1
    89    name: foo
    90  bar:
    91    y: 1
    92    name: bar
    93-- out/json --
    94{"a":{"k":1},"b":{"v":{"x":0,"y":1},"w":{"x":0,"y":1}},"c":{"foo":{"y":1,"name":"foo"},"bar":{"y":1,"name":"bar"}}}
    95-- out/legacy-debug --
    96<0>{a: <1>{[]: <2>(name: string)->int, k: 1}, b: <3>{[]: <4>(X: string)->(<5>{x: 0, y: (*1 | int)} & <6>{}), v: <7>{x: 0, y: (*1 | int)}, w: <8>{x: 0, y: (*1 | int)}}, c: <9>{[]: <10>(Name: string)-><11>{y: 1, name: <10>.Name}, foo: <12>{y: 1, name: "foo"}, bar: <13>{y: 1, name: "bar"}}}
    97-- out/compile --
    98--- in.cue
    99{
   100  a: {
   101    {
   102      [_]: int
   103    }
   104    k: 1
   105  }
   106  b: {
   107    {
   108      [_]: {
   109        x: 0
   110        y: (*1|int)
   111      }
   112    }
   113    v: {}
   114    w: {
   115      x: 0
   116    }
   117  }
   118  b: {
   119    [_]: {}
   120  }
   121  c: {
   122    {
   123      [_]: {
   124        name: 〈1;-〉
   125        y: 1
   126      }
   127    }
   128    foo: {}
   129    bar: _
   130  }
   131}
   132-- out/eval/stats --
   133Leaks:  0
   134Freed:  21
   135Reused: 15
   136Allocs: 6
   137Retain: 0
   138
   139Unifications: 17
   140Conjuncts:    33
   141Disjuncts:    21
   142-- out/eval --
   143(struct){
   144  a: (struct){
   145    k: (int){ 1 }
   146  }
   147  b: (struct){
   148    v: (struct){
   149      x: (int){ 0 }
   150      y: (int){ |(*(int){ 1 }, (int){ int }) }
   151    }
   152    w: (struct){
   153      x: (int){ 0 }
   154      y: (int){ |(*(int){ 1 }, (int){ int }) }
   155    }
   156  }
   157  c: (struct){
   158    foo: (struct){
   159      name: (string){ "foo" }
   160      y: (int){ 1 }
   161    }
   162    bar: (struct){
   163      name: (string){ "bar" }
   164      y: (int){ 1 }
   165    }
   166  }
   167}

View as plain text