...
1# DO NOT EDIT; generated by go run testdata/gen.go
2#
3raw: true
4-- in.cue --
5{a: [1, 2], b: {for k, v in a if v > 1 {"\(k)": v}}}
6-- out/def --
7a: [1, 2]
8b: {
9 "1": 2
10}
11-- out/export --
12a: [1, 2]
13b: {
14 "1": 2
15}
16-- out/yaml --
17a:
18- 1
19- 2
20b:
21 "1": 2
22-- out/json --
23{"a":[1,2],"b":{"1":2}}
24-- out/compile --
25--- in.cue
26{
27 {
28 a: [
29 1,
30 2,
31 ]
32 b: {
33 for k, v in 〈1;a〉 if (〈0;v〉 > 1) {
34 "\(〈1;k〉)": 〈1;v〉
35 }
36 }
37 }
38}
39-- out/eval/stats --
40Leaks: 0
41Freed: 6
42Reused: 3
43Allocs: 3
44Retain: 0
45
46Unifications: 6
47Conjuncts: 9
48Disjuncts: 6
49-- out/eval --
50(struct){
51 a: (#list){
52 0: (int){ 1 }
53 1: (int){ 2 }
54 }
55 b: (struct){
56 "1": (int){ 2 }
57 }
58}
View as plain text