Public repository: timo / feel

Reader

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

1
[
2
  {
3
    "id": "0098-feel-week-of-year-function:date_001:date_001",
4
    "expression": "week of year(@\"2019-09-17\")",
5
    "expected": 38.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": "0098-feel-week-of-year-function:date_002:date_002",
13
    "expression": "week of year(@\"2003-12-29\")",
14
    "expected": 1.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": "0098-feel-week-of-year-function:date_003:date_003",
22
    "expression": "week of year(@\"2003-12-31\")",
23
    "expected": 1.0,
24
    "expected_type": "number",
25
    "comparison": "f64_epsilon",
26
    "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.",
27
    "epsilon": 1e-08
28
  },
29
  {
30
    "id": "0098-feel-week-of-year-function:date_004:date_004",
31
    "expression": "week of year(@\"2004-01-01\")",
32
    "expected": 1.0,
33
    "expected_type": "number",
34
    "comparison": "f64_epsilon",
35
    "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.",
36
    "epsilon": 1e-08
37
  },
38
  {
39
    "id": "0098-feel-week-of-year-function:date_005:date_005",
40
    "expression": "week of year(@\"2010-01-01\")",
41
    "expected": 53.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": "0098-feel-week-of-year-function:date_006:date_006",
49
    "expression": "week of year(date_input_001)",
50
    "expected": 1.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
    "context": {
55
      "date_input_001": {
56
        "@type": "date",
57
        "@value": "1970-01-01"
58
      }
59
    },
60
    "epsilon": 1e-08
61
  },
62
  {
63
    "id": "0098-feel-week-of-year-function:date_007:date_007",
64
    "expression": "week of year(date: @\"2019-09-17\")",
65
    "expected": 38.0,
66
    "expected_type": "number",
67
    "comparison": "f64_epsilon",
68
    "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.",
69
    "epsilon": 1e-08
70
  },
71
  {
72
    "id": "0098-feel-week-of-year-function:datetime_001:datetime_001",
73
    "expression": "week of year(@\"1970-01-01T10:10:10\")",
74
    "expected": 1.0,
75
    "expected_type": "number",
76
    "comparison": "f64_epsilon",
77
    "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.",
78
    "epsilon": 1e-08
79
  },
80
  {
81
    "id": "0098-feel-week-of-year-function:datetime_004:datetime_004",
82
    "expression": "week of year(date_input_001)",
83
    "expected": 1.0,
84
    "expected_type": "number",
85
    "comparison": "f64_epsilon",
86
    "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.",
87
    "context": {
88
      "date_input_001": {
89
        "@type": "date and time",
90
        "@value": "1970-01-01T10:10:10"
91
      }
92
    },
93
    "epsilon": 1e-08
94
  },
95
  {
96
    "id": "0098-feel-week-of-year-function:datetime_005:datetime_005",
97
    "expression": "week of year(date: @\"2019-09-17T10:10:10\")",
98
    "expected": 38.0,
99
    "expected_type": "number",
100
    "comparison": "f64_epsilon",
101
    "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.",
102
    "epsilon": 1e-08
103
  },
104
  {
105
    "id": "0098-feel-week-of-year-function:null_001:null_001",
106
    "expression": "week of year(null)",
107
    "expected": null,
108
    "expected_type": "null",
109
    "comparison": "exact",
110
    "deviation": null
111
  },
112
  {
113
    "id": "0098-feel-week-of-year-function:null_002:null_002",
114
    "expression": "week of year()",
115
    "expected": null,
116
    "expected_type": "null",
117
    "comparison": "exact",
118
    "deviation": null
119
  },
120
  {
121
    "id": "0098-feel-week-of-year-function:null_003:null_003",
122
    "expression": "week of year(\"foo\")",
123
    "expected": null,
124
    "expected_type": "null",
125
    "comparison": "exact",
126
    "deviation": null
127
  },
128
  {
129
    "id": "0098-feel-week-of-year-function:null_004:null_004",
130
    "expression": "week of year(date: null)",
131
    "expected": null,
132
    "expected_type": "null",
133
    "comparison": "exact",
134
    "deviation": null
135
  },
136
  {
137
    "id": "0098-feel-week-of-year-function:null_005:null_005",
138
    "expression": "week of year(date: \"foo\")",
139
    "expected": null,
140
    "expected_type": "null",
141
    "comparison": "exact",
142
    "deviation": null
143
  },
144
  {
145
    "id": "0098-feel-week-of-year-function:null_006:null_006",
146
    "expression": "week of year(value: @\"1970-01-01\")",
147
    "expected": null,
148
    "expected_type": "null",
149
    "comparison": "exact",
150
    "deviation": null
151
  },
152
  {
153
    "id": "0098-feel-week-of-year-function:null_007:null_007",
154
    "expression": "week of year(date_input_001)",
155
    "expected": null,
156
    "expected_type": "null",
157
    "comparison": "exact",
158
    "deviation": null,
159
    "context": {
160
      "date_input_001": "foo"
161
    }
162
  },
163
  {
164
    "id": "0098-feel-week-of-year-function:null_008:null_008",
165
    "expression": "week of year(@\"1970-01-01\", @\"1970-01-01\")",
166
    "expected": null,
167
    "expected_type": "null",
168
    "comparison": "exact",
169
    "deviation": null
170
  }
171
]