Skip to content

Commit b98f14c

Browse files
Merge pull request #1108 from ErikSchierboom/saddle-points-input
saddle-points: Apply new "input" policy
2 parents bdea0a8 + 6247fb3 commit b98f14c

File tree

1 file changed

+34
-24
lines changed

1 file changed

+34
-24
lines changed

exercises/saddle-points/canonical-data.json

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"exercise": "saddle-points",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"comments": [
55
"Matrix rows and columns are 0-indexed."
66
],
@@ -11,11 +11,13 @@
1111
"This is the README example."
1212
],
1313
"property": "saddlePoints",
14-
"input": [
15-
[9, 8, 7],
16-
[5, 3, 2],
17-
[6, 6, 7]
18-
],
14+
"input": {
15+
"matrix": [
16+
[9, 8, 7],
17+
[5, 3, 2],
18+
[6, 6, 7]
19+
]
20+
},
1921
"expected": [
2022
{
2123
"row": 1,
@@ -26,29 +28,35 @@
2628
{
2729
"description": "Can identify that empty matrix has no saddle points",
2830
"property": "saddlePoints",
29-
"input": [
30-
[]
31-
],
31+
"input": {
32+
"matrix": [
33+
[]
34+
]
35+
},
3236
"expected": []
3337
},
3438
{
3539
"description": "Can identify lack of saddle points when there are none",
3640
"property": "saddlePoints",
37-
"input": [
38-
[1, 2, 3],
39-
[3, 1, 2],
40-
[2, 3, 1]
41-
],
41+
"input": {
42+
"matrix": [
43+
[1, 2, 3],
44+
[3, 1, 2],
45+
[2, 3, 1]
46+
]
47+
},
4248
"expected": []
4349
},
4450
{
4551
"description": "Can identify multiple saddle points",
4652
"property": "saddlePoints",
47-
"input": [
48-
[4, 5, 4],
49-
[3, 5, 5],
50-
[1, 5, 4]
51-
],
53+
"input": {
54+
"matrix": [
55+
[4, 5, 4],
56+
[3, 5, 5],
57+
[1, 5, 4]
58+
]
59+
},
5260
"expected": [
5361
{
5462
"row": 0,
@@ -71,11 +79,13 @@
7179
"off-by-one errors."
7280
],
7381
"property": "saddlePoints",
74-
"input": [
75-
[8, 7, 9],
76-
[6, 7, 6],
77-
[3, 2, 5]
78-
],
82+
"input": {
83+
"matrix": [
84+
[8, 7, 9],
85+
[6, 7, 6],
86+
[3, 2, 5]
87+
]
88+
},
7989
"expected": [
8090
{
8191
"row": 2,

0 commit comments

Comments
 (0)