Public repository: timo / feel

Reader

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

1
[
2
  {
3
    "id": "0099-arithmetic-negation:decision_001:decision_001",
4
    "expression": "-10",
5
    "expected": -10.0,
6
    "expected_type": "number",
7
    "comparison": "f64_epsilon",
8
    "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.",
9
    "epsilon": 1e-08
10
  },
11
  {
12
    "id": "0099-arithmetic-negation:decision_002:decision_002",
13
    "expression": "--10",
14
    "expected": 10.0,
15
    "expected_type": "number",
16
    "comparison": "f64_epsilon",
17
    "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.",
18
    "epsilon": 1e-08
19
  },
20
  {
21
    "id": "0099-arithmetic-negation:decision_003:decision_003",
22
    "expression": "-@\"P1D\"",
23
    "expected": "-P1D",
24
    "expected_type": "duration",
25
    "comparison": "exact",
26
    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
27
  },
28
  {
29
    "id": "0099-arithmetic-negation:decision_003_a:decision_003_a",
30
    "expression": "-@\"-P1D\"",
31
    "expected": "P1D",
32
    "expected_type": "duration",
33
    "comparison": "exact",
34
    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
35
  },
36
  {
37
    "id": "0099-arithmetic-negation:decision_004:decision_004",
38
    "expression": "-@\"P1Y\"",
39
    "expected": "-P1Y",
40
    "expected_type": "duration",
41
    "comparison": "exact",
42
    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
43
  },
44
  {
45
    "id": "0099-arithmetic-negation:decision_004_a:decision_004_a",
46
    "expression": "-@\"-P1Y\"",
47
    "expected": "P1Y",
48
    "expected_type": "duration",
49
    "comparison": "exact",
50
    "deviation": "Temporal result compared in feel-core's canonical ISO-8601 form (ADR-18). feel-core backs temporal values with jiff; at the wrappers they cross the boundary as ISO-8601 strings, so PostgreSQL can cast to date/timestamptz/interval (ADR-5's interval mapping) and WASM can return JS Date objects."
51
  },
52
  {
53
    "id": "0099-arithmetic-negation:decision_005:decision_005",
54
    "expression": "-@\"2021-01-01\"",
55
    "expected": null,
56
    "expected_type": "null",
57
    "comparison": "exact",
58
    "deviation": null
59
  },
60
  {
61
    "id": "0099-arithmetic-negation:decision_006:decision_006",
62
    "expression": "-@\"2021-01-01T10:10:10\"",
63
    "expected": null,
64
    "expected_type": "null",
65
    "comparison": "exact",
66
    "deviation": null
67
  },
68
  {
69
    "id": "0099-arithmetic-negation:decision_007:decision_007",
70
    "expression": "-@\"10:10:10\"",
71
    "expected": null,
72
    "expected_type": "null",
73
    "comparison": "exact",
74
    "deviation": null
75
  },
76
  {
77
    "id": "0099-arithmetic-negation:decision_008:decision_008",
78
    "expression": "-{a: 1}",
79
    "expected": null,
80
    "expected_type": "null",
81
    "comparison": "exact",
82
    "deviation": null
83
  },
84
  {
85
    "id": "0099-arithmetic-negation:decision_009:decision_009",
86
    "expression": "-\"10\"",
87
    "expected": null,
88
    "expected_type": "null",
89
    "comparison": "exact",
90
    "deviation": null
91
  },
92
  {
93
    "id": "0099-arithmetic-negation:decision_010:decision_010",
94
    "expression": "-[10]",
95
    "expected": null,
96
    "expected_type": "null",
97
    "comparison": "exact",
98
    "deviation": null
99
  },
100
  {
101
    "id": "0099-arithmetic-negation:decision_011:decision_011",
102
    "expression": "-[1..5]",
103
    "expected": null,
104
    "expected_type": "null",
105
    "comparison": "exact",
106
    "deviation": null
107
  }
108
]