Public repository: timo / feel

Reader

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

1
[
2
  {
3
    "id": "0082-feel-coercion:decision_001:decision_001",
4
    "expression": "1+1",
5
    "expected": null,
6
    "expected_type": "null",
7
    "comparison": "exact",
8
    "deviation": null,
9
    "coerce_to": "string"
10
  },
11
  {
12
    "id": "0082-feel-coercion:decision_003:decision_003",
13
    "expression": "[1,2,\"foo\"]",
14
    "expected": null,
15
    "expected_type": "null",
16
    "comparison": "exact",
17
    "deviation": null,
18
    "coerce_to": "list<number>"
19
  },
20
  {
21
    "id": "0082-feel-coercion:decision_004:decision_004",
22
    "expression": "{name: \"foo\", surname: \"bar\", age: 10}",
23
    "expected": {
24
      "name": "foo",
25
      "surname": "bar",
26
      "age": 10.0
27
    },
28
    "expected_type": "context",
29
    "comparison": "exact",
30
    "deviation": null,
31
    "coerce_to": "context<name: string, age: number>"
32
  },
33
  {
34
    "id": "0082-feel-coercion:decision_005:decision_005",
35
    "expression": "{name: \"foo\"}",
36
    "expected": null,
37
    "expected_type": "null",
38
    "comparison": "exact",
39
    "deviation": null,
40
    "coerce_to": "context<name: string, age: number>"
41
  },
42
  {
43
    "id": "0082-feel-coercion:decision_006_a:decision_006_a",
44
    "expression": "\"foo\"",
45
    "expected": null,
46
    "expected_type": "null",
47
    "comparison": "exact",
48
    "deviation": null,
49
    "coerce_to": "list<number>"
50
  },
51
  {
52
    "id": "0082-feel-coercion:decision_007:decision_007",
53
    "expression": "[\"foo\"]",
54
    "expected": "foo",
55
    "expected_type": "string",
56
    "comparison": "exact",
57
    "deviation": null,
58
    "coerce_to": "string"
59
  },
60
  {
61
    "id": "0082-feel-coercion:decision_007_a:decision_007_a",
62
    "expression": "[1]",
63
    "expected": null,
64
    "expected_type": "null",
65
    "comparison": "exact",
66
    "deviation": null,
67
    "coerce_to": "string"
68
  },
69
  {
70
    "id": "0082-feel-coercion:decision_008:decision_008",
71
    "expression": "null",
72
    "expected": null,
73
    "expected_type": "null",
74
    "comparison": "exact",
75
    "deviation": null,
76
    "coerce_to": "list<string>"
77
  },
78
  {
79
    "id": "0082-feel-coercion:decision_bkm_001:decision_bkm_001",
80
    "expression": "{bkm_001: function(nameAndAge: context<name: string, age: number>) nameAndAge != null, __result: bkm_001({name: \"foo\", surname: \"bar\", age: 10})}.__result",
81
    "expected": true,
82
    "expected_type": "boolean",
83
    "comparison": "exact",
84
    "deviation": null
85
  },
86
  {
87
    "id": "0082-feel-coercion:decision_bkm_002:decision_bkm_002",
88
    "expression": "{bkm_001: function(nameAndAge: context<name: string, age: number>) nameAndAge != null, __result: bkm_001({name: \"foo\"})}.__result",
89
    "expected": null,
90
    "expected_type": "null",
91
    "comparison": "exact",
92
    "deviation": null
93
  },
94
  {
95
    "id": "0082-feel-coercion:decision_bkm_003:decision_bkm_003",
96
    "expression": "{bkm_002: function(nameAndAge: context<name: string, age: number>) nameAndAge != null, __result: bkm_002({name: \"foo\"})}.__result",
97
    "expected": null,
98
    "expected_type": "null",
99
    "comparison": "exact",
100
    "deviation": null,
101
    "coerce_to": "context<name: string, age: number>"
102
  },
103
  {
104
    "id": "0082-feel-coercion:decision_bkm_004_a:decision_bkm_004_a",
105
    "expression": "{bkm_004: function(arg) arg, __result: bkm_004(\"foo\")}.__result",
106
    "expected": null,
107
    "expected_type": "null",
108
    "comparison": "exact",
109
    "deviation": null,
110
    "coerce_to": "list<number>"
111
  },
112
  {
113
    "id": "0082-feel-coercion:decision_bkm_004_b:decision_bkm_004_b",
114
    "expression": "{bkm_004: function(arg) arg, __result: bkm_004(null)}.__result",
115
    "expected": null,
116
    "expected_type": "null",
117
    "comparison": "exact",
118
    "deviation": null,
119
    "coerce_to": "list<number>"
120
  },
121
  {
122
    "id": "0082-feel-coercion:decision_bkm_005:decision_bkm_005",
123
    "expression": "{bkm_005: function(arg) [arg], __result: bkm_005(10)}.__result",
124
    "expected": 10.0,
125
    "expected_type": "number",
126
    "comparison": "f64_epsilon",
127
    "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.",
128
    "coerce_to": "number",
129
    "epsilon": 1e-08
130
  },
131
  {
132
    "id": "0082-feel-coercion:decision_bkm_005_a:decision_bkm_005_a",
133
    "expression": "{bkm_005: function(arg) [arg], __result: bkm_005(\"foo\")}.__result",
134
    "expected": null,
135
    "expected_type": "null",
136
    "comparison": "exact",
137
    "deviation": null,
138
    "coerce_to": "number"
139
  },
140
  {
141
    "id": "0082-feel-coercion:decision_context_01:decision_context_01",
142
    "expression": "context(entries: [{key:\"a\", value:1}, {key:\"b\", value:2}])",
143
    "expected": {
144
      "a": 1.0,
145
      "b": 2.0
146
    },
147
    "expected_type": "context",
148
    "comparison": "exact",
149
    "deviation": null,
150
    "coerce_to": "context<a: number, b: number>"
151
  },
152
  {
153
    "id": "0082-feel-coercion:decision_context_02:decision_context_02",
154
    "expression": "context(entries: [{key:\"a\", value:1}, {key:\"b\", value:2}])",
155
    "expected": {
156
      "a": 1.0,
157
      "b": 2.0
158
    },
159
    "expected_type": "context",
160
    "comparison": "exact",
161
    "deviation": null,
162
    "coerce_to": "context<a: number>"
163
  },
164
  {
165
    "id": "0082-feel-coercion:decision_context_03:decision_context_03",
166
    "expression": "context(entries: [{key:\"a\", value:1}, {key:\"b\", value:2}])",
167
    "expected": null,
168
    "expected_type": "null",
169
    "comparison": "exact",
170
    "deviation": null,
171
    "coerce_to": "context<a: number, b: number, c: number>"
172
  },
173
  {
174
    "id": "0082-feel-coercion:fd_001:fd_001",
175
    "expression": "{fn: function(arg: number) arg, __result: fn(10)}.__result",
176
    "expected": 10.0,
177
    "expected_type": "number",
178
    "comparison": "f64_epsilon",
179
    "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.",
180
    "epsilon": 1e-08
181
  },
182
  {
183
    "id": "0082-feel-coercion:fd_002:fd_002",
184
    "expression": "{fn: function(arg: number) arg, __result: fn(\"foo\")}.__result",
185
    "expected": null,
186
    "expected_type": "null",
187
    "comparison": "exact",
188
    "deviation": null
189
  },
190
  {
191
    "id": "0082-feel-coercion:invoke_001:invoke_001",
192
    "expression": "{bkm_001: function(nameAndAge: context<name: string, age: number>) nameAndAge != null, __result: bkm_001(nameAndAge: {name: \"foo\"})}.__result",
193
    "expected": null,
194
    "expected_type": "null",
195
    "comparison": "exact",
196
    "deviation": null
197
  },
198
  {
199
    "id": "0082-feel-coercion:invoke_002:invoke_002",
200
    "expression": "{bkm_001: function(nameAndAge: context<name: string, age: number>) nameAndAge != null, __result: bkm_001(nameAndAge: {name: \"foo\", age: 10})}.__result",
201
    "expected": null,
202
    "expected_type": "null",
203
    "comparison": "exact",
204
    "deviation": null,
205
    "coerce_to": "string"
206
  },
207
  {
208
    "id": "0082-feel-coercion:invoke_004:invoke_004",
209
    "expression": "{bkm_005: function(arg) [arg], __result: bkm_005(arg: \"foo\")}.__result",
210
    "expected": null,
211
    "expected_type": "null",
212
    "comparison": "exact",
213
    "deviation": null,
214
    "coerce_to": "list<number>"
215
  },
216
  {
217
    "id": "0082-feel-coercion:invoke_005:invoke_005",
218
    "expression": "{bkm_005: function(arg) [arg], __result: bkm_005(arg: [10])}.__result",
219
    "expected": null,
220
    "expected_type": "null",
221
    "comparison": "exact",
222
    "deviation": null,
223
    "coerce_to": "number"
224
  },
225
  {
226
    "id": "0082-feel-coercion:invoke_006:invoke_006",
227
    "expression": "{bkm_005: function(arg) [arg], __result: bkm_005(arg: [\"foo\"])}.__result",
228
    "expected": null,
229
    "expected_type": "null",
230
    "comparison": "exact",
231
    "deviation": null,
232
    "coerce_to": "number"
233
  },
234
  {
235
    "id": "0082-feel-coercion:invoke_007:invoke_007",
236
    "expression": "{bkm_005: function(arg) [arg], __result: bkm_005(arg1: 123)}.__result",
237
    "expected": null,
238
    "expected_type": "null",
239
    "comparison": "exact",
240
    "deviation": null,
241
    "coerce_to": "number"
242
  },
243
  {
244
    "id": "0082-feel-coercion:literal_001:literal_001",
245
    "expression": "5+5",
246
    "expected": 10.0,
247
    "expected_type": "number",
248
    "comparison": "f64_epsilon",
249
    "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.",
250
    "coerce_to": "number",
251
    "epsilon": 1e-08
252
  },
253
  {
254
    "id": "0082-feel-coercion:literal_002:literal_002",
255
    "expression": "\"foo\"",
256
    "expected": null,
257
    "expected_type": "null",
258
    "comparison": "exact",
259
    "deviation": null,
260
    "coerce_to": "number"
261
  },
262
  {
263
    "id": "0082-feel-coercion:literal_004:literal_004",
264
    "expression": "\"foo\"",
265
    "expected": null,
266
    "expected_type": "null",
267
    "comparison": "exact",
268
    "deviation": null,
269
    "coerce_to": "list<number>"
270
  },
271
  {
272
    "id": "0082-feel-coercion:literal_005:literal_005",
273
    "expression": "[10]",
274
    "expected": 10.0,
275
    "expected_type": "number",
276
    "comparison": "f64_epsilon",
277
    "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.",
278
    "coerce_to": "number",
279
    "epsilon": 1e-08
280
  },
281
  {
282
    "id": "0082-feel-coercion:literal_006:literal_006",
283
    "expression": "[\"foo\"]",
284
    "expected": null,
285
    "expected_type": "null",
286
    "comparison": "exact",
287
    "deviation": null,
288
    "coerce_to": "number"
289
  }
290
]