Public repository: timo / feel

Reader

An interpreter of FEEL, written in Rust, with integrations for PostgreSQL, WASM, Lua, and Python.

1
[
2
  {
3
    "id": "0069-feel-list:001:decision001",
4
    "expression": "[1,2,3]",
5
    "expected": [
6
      1.0,
7
      2.0,
8
      3.0
9
    ],
10
    "expected_type": "list",
11
    "comparison": "exact",
12
    "deviation": null
13
  },
14
  {
15
    "id": "0069-feel-list:001_a:decision001_a",
16
    "expression": "[]",
17
    "expected": [],
18
    "expected_type": "list",
19
    "comparison": "exact",
20
    "deviation": null
21
  },
22
  {
23
    "id": "0069-feel-list:002:decision002",
24
    "expression": "[1,2,3][0]",
25
    "expected": null,
26
    "expected_type": "null",
27
    "comparison": "exact",
28
    "deviation": null
29
  },
30
  {
31
    "id": "0069-feel-list:003:decision003",
32
    "expression": "[1,2,3][4]",
33
    "expected": null,
34
    "expected_type": "null",
35
    "comparison": "exact",
36
    "deviation": null
37
  },
38
  {
39
    "id": "0069-feel-list:004:decision004",
40
    "expression": "[1,2,3][1]",
41
    "expected": 1.0,
42
    "expected_type": "number",
43
    "comparison": "f64_epsilon",
44
    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
45
    "epsilon": 1e-08
46
  },
47
  {
48
    "id": "0069-feel-list:005:decision005",
49
    "expression": "[1,2,3][3]",
50
    "expected": 3.0,
51
    "expected_type": "number",
52
    "comparison": "f64_epsilon",
53
    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
54
    "epsilon": 1e-08
55
  },
56
  {
57
    "id": "0069-feel-list:006:decision006",
58
    "expression": "[1,2,3][-1]",
59
    "expected": 3.0,
60
    "expected_type": "number",
61
    "comparison": "f64_epsilon",
62
    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
63
    "epsilon": 1e-08
64
  },
65
  {
66
    "id": "0069-feel-list:007:decision007",
67
    "expression": "[1,2,3][-3]",
68
    "expected": 1.0,
69
    "expected_type": "number",
70
    "comparison": "f64_epsilon",
71
    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
72
    "epsilon": 1e-08
73
  },
74
  {
75
    "id": "0069-feel-list:008:decision008",
76
    "expression": "[1,2,3][-4]",
77
    "expected": null,
78
    "expected_type": "null",
79
    "comparison": "exact",
80
    "deviation": null
81
  },
82
  {
83
    "id": "0069-feel-list:009:decision009",
84
    "expression": "[1,2,3][true]",
85
    "expected": [
86
      1.0,
87
      2.0,
88
      3.0
89
    ],
90
    "expected_type": "list",
91
    "comparison": "exact",
92
    "deviation": null
93
  },
94
  {
95
    "id": "0069-feel-list:010:decision010",
96
    "expression": "[1,2,3][false]",
97
    "expected": [],
98
    "expected_type": "list",
99
    "comparison": "exact",
100
    "deviation": null
101
  },
102
  {
103
    "id": "0069-feel-list:011:decision011",
104
    "expression": "[1,2,3][item >= 2]",
105
    "expected": [
106
      2.0,
107
      3.0
108
    ],
109
    "expected_type": "list",
110
    "comparison": "exact",
111
    "deviation": null
112
  },
113
  {
114
    "id": "0069-feel-list:012:decision012",
115
    "expression": "true[true]",
116
    "expected": [
117
      true
118
    ],
119
    "expected_type": "list",
120
    "comparison": "exact",
121
    "deviation": null
122
  },
123
  {
124
    "id": "0069-feel-list:013:decision013",
125
    "expression": "true[false]",
126
    "expected": [],
127
    "expected_type": "list",
128
    "comparison": "exact",
129
    "deviation": null
130
  },
131
  {
132
    "id": "0069-feel-list:014:decision014",
133
    "expression": "100[true]",
134
    "expected": [
135
      100.0
136
    ],
137
    "expected_type": "list",
138
    "comparison": "exact",
139
    "deviation": null
140
  },
141
  {
142
    "id": "0069-feel-list:015:decision015",
143
    "expression": "100[false]",
144
    "expected": [],
145
    "expected_type": "list",
146
    "comparison": "exact",
147
    "deviation": null
148
  },
149
  {
150
    "id": "0069-feel-list:016:decision016",
151
    "expression": "\"foo\"[true]",
152
    "expected": [
153
      "foo"
154
    ],
155
    "expected_type": "list",
156
    "comparison": "exact",
157
    "deviation": null
158
  },
159
  {
160
    "id": "0069-feel-list:017:decision017",
161
    "expression": "\"foo\"[false]",
162
    "expected": [],
163
    "expected_type": "list",
164
    "comparison": "exact",
165
    "deviation": null
166
  },
167
  {
168
    "id": "0069-feel-list:018:decision018",
169
    "expression": "true[1]",
170
    "expected": true,
171
    "expected_type": "boolean",
172
    "comparison": "exact",
173
    "deviation": null
174
  },
175
  {
176
    "id": "0069-feel-list:019:decision019",
177
    "expression": "100[1]",
178
    "expected": 100.0,
179
    "expected_type": "number",
180
    "comparison": "f64_epsilon",
181
    "deviation": "feel-core uses f64 arithmetic while the DMN/FEEL spec mandates decimal128, and the TCK rounds non-terminating results to a fixed number of decimal places; numeric results are therefore compared with an epsilon tolerance instead of exact equality to avoid false negatives from either source.",
182
    "epsilon": 1e-08
183
  },
184
  {
185
    "id": "0069-feel-list:020:decision020",
186
    "expression": "\"foo\"[1]",
187
    "expected": "foo",
188
    "expected_type": "string",
189
    "comparison": "exact",
190
    "deviation": null
191
  },
192
  {
193
    "id": "0069-feel-list:021:decision021",
194
    "expression": "true[0]",
195
    "expected": null,
196
    "expected_type": "null",
197
    "comparison": "exact",
198
    "deviation": null
199
  },
200
  {
201
    "id": "0069-feel-list:022:decision022",
202
    "expression": "100[0]",
203
    "expected": null,
204
    "expected_type": "null",
205
    "comparison": "exact",
206
    "deviation": null
207
  },
208
  {
209
    "id": "0069-feel-list:023:decision023",
210
    "expression": "\"foo\"[0]",
211
    "expected": null,
212
    "expected_type": "null",
213
    "comparison": "exact",
214
    "deviation": null
215
  },
216
  {
217
    "id": "0069-feel-list:024:decision024",
218
    "expression": "[{a: 1}, {a: 2}, {a: 3}][item.a >= 2]",
219
    "expected": [
220
      {
221
        "a": 2.0
222
      },
223
      {
224
        "a": 3.0
225
      }
226
    ],
227
    "expected_type": "list",
228
    "comparison": "exact",
229
    "deviation": null
230
  },
231
  {
232
    "id": "0069-feel-list:026:decision026",
233
    "expression": "[{item: 1}, {item: 2}, {item: 3}][item >= 2]",
234
    "expected": [
235
      {
236
        "item": 2.0
237
      },
238
      {
239
        "item": 3.0
240
      }
241
    ],
242
    "expected_type": "list",
243
    "comparison": "exact",
244
    "deviation": null
245
  },
246
  {
247
    "id": "0069-feel-list:027:decision027",
248
    "expression": "[ 1, 2, 3, 4 ][ item > 2 ]",
249
    "expected": [
250
      3.0,
251
      4.0
252
    ],
253
    "expected_type": "list",
254
    "comparison": "exact",
255
    "deviation": null
256
  },
257
  {
258
    "id": "0069-feel-list:030:decision030",
259
    "expression": "[ { x: 1, y: 2 }, { x: 2, y: 3 } ].y",
260
    "expected": [
261
      2.0,
262
      3.0
263
    ],
264
    "expected_type": "list",
265
    "comparison": "exact",
266
    "deviation": null
267
  },
268
  {
269
    "id": "0069-feel-list:033:decision033",
270
    "expression": "[ { x: 1 } ].y",
271
    "expected": [
272
      null
273
    ],
274
    "expected_type": "list",
275
    "comparison": "exact",
276
    "deviation": null
277
  },
278
  {
279
    "id": "0069-feel-list:034:decision034",
280
    "expression": "[ { x: 1 }, { y: 2 } ].y",
281
    "expected": [
282
      null,
283
      2.0
284
    ],
285
    "expected_type": "list",
286
    "comparison": "exact",
287
    "deviation": null
288
  }
289
]