-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathmaps.baseline
More file actions
142 lines (130 loc) · 2.42 KB
/
Copy pathmaps.baseline
File metadata and controls
142 lines (130 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
Source: {1: 2, 3: 4}[3] == 4
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
=====>
bindings: {}
result: true
Source: 3 in {1: 2, 3: 4} && !(4 in {1: 2, 3: 4})
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
=====>
bindings: {}
result: true
Source: x.map_int32_int64[22] == 23
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
=====>
bindings: {x=map_int32_int64 {
key: 22
value: 23
}
}
result: true
Source: TestAllTypes{map_int32_int64: {21: 22, 22: 23}}.map_int32_int64[22] == 23
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
=====>
bindings: {}
result: true
Source: TestAllTypes{oneof_type: NestedTestAllTypes{payload: x}}.oneof_type.payload.map_int32_int64[22] == 23
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
=====>
bindings: {x=map_int32_int64 {
key: 22
value: 23
}
}
result: true
Source: !(4 in map) && 1 in map
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
declare y {
value int
}
declare map {
value map(int, int)
}
=====>
bindings: {map={1=4, 2=3, 3=2}}
result: true
Source: !(y in {1: 4, 2: 3, 3: 2}) && y in {5: 3, 4: 2, 3: 3}
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
declare y {
value int
}
declare map {
value map(int, int)
}
=====>
bindings: {y=4}
result: true
Source: !(y in map) && (y + 3) in map
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
declare y {
value int
}
declare map {
value map(int, int)
}
=====>
bindings: {y=1, map={4=1, 5=2, 6=3}}
result: true
Source: TestAllTypes{map_int64_nested_type:{42:NestedTestAllTypes{payload:TestAllTypes{}}}}
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
declare y {
value int
}
declare map {
value map(int, int)
}
=====>
bindings: {}
result: map_int64_nested_type {
key: 42
value {
payload {
}
}
}
Source: {true: 1, false: 2, true: 3}[true]
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
declare y {
value int
}
declare map {
value map(int, int)
}
=====>
bindings: {}
error: evaluation error at test_location:24: duplicate map key [true]
Source: {b: 1, !b: 2, b: 3}[true]
declare x {
value dev.cel.testing.testdata.proto3.TestAllTypes
}
declare y {
value int
}
declare map {
value map(int, int)
}
declare b {
value bool
}
=====>
bindings: {b=true}
error: evaluation error at test_location:15: duplicate map key [true]