Skip to content

Commit

Permalink
add array_apply and array_filter tests, fix several math tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Dec 11, 2023
1 parent 55f6a57 commit de2c1a0
Show file tree
Hide file tree
Showing 9 changed files with 315 additions and 49 deletions.
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This folder contains test cases for the openEO processes.
- [x] array_contains
- [x] array_create
- [x] array_element
- [ ] array_filter
- [x] array_filter
- [x] array_find
- [x] array_interpolate_linear
- [x] array_labels
Expand Down
12 changes: 3 additions & 9 deletions tests/arcosh.json5
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
},
"returns": 2.99322284613
},
{
"arguments": {
"x": 0.5
},
"returns": 0.96242365012
},
{
"arguments": {
"x": NaN
Expand All @@ -39,13 +33,13 @@
},
{
"arguments": {
"x": -1
"x": 0.5
},
"returns": NaN
},
{
"arguments": {
"x": -0.5
"x": -1
},
"returns": NaN
},
Expand All @@ -62,4 +56,4 @@
"returns": null
}
]
}
}
54 changes: 27 additions & 27 deletions tests/array_apply.json5
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
}
},
"returns": [
1,
2,
3.5,
4.725,
NaN
1,
2,
3.5,
4.725,
NaN
]
},
{
Expand All @@ -71,7 +71,7 @@
],
"process": {
"process_graph": {
"absolute": {
"multiply": {
"process_id": "multiply",
"arguments": {
"x": {
Expand Down Expand Up @@ -113,19 +113,19 @@
"x": {
"from_argument": "x"
},
"y": 3
"y": 1
},
"result": true
}
}
}
},
"returns": [
false,
false,
true,
true,
false
false,
false,
true,
false,
false
]
},
{
Expand Down Expand Up @@ -155,10 +155,10 @@
}
},
"returns": [
0,
1,
2,
3
0,
1,
2,
3
]
},
{
Expand Down Expand Up @@ -195,8 +195,8 @@
}
},
"returns": [
"B01",
"B02"
"B01",
"B02"
]
},
{
Expand All @@ -220,7 +220,7 @@
},
"process": {
"process_graph": {
"const": {
"add": {
"process_id": "add",
"arguments": {
"x": {
Expand All @@ -236,8 +236,8 @@
}
},
"returns": [
1.23,
1.98
1.23,
1.98
]
},
{
Expand All @@ -261,7 +261,7 @@
},
"process": {
"process_graph": {
"const": {
"subtract": {
"process_id": "subtract",
"arguments": {
"x": {
Expand Down Expand Up @@ -327,11 +327,11 @@
}
},
"returns": [
5,
-1,
10,
6.45,
NaN
5,
-1,
10,
6.45,
NaN
]
}
]
Expand Down
Loading

0 comments on commit de2c1a0

Please sign in to comment.