Skip to content

Commit f427e3d

Browse files
span must not exceed string length (#2548)
1 parent ad7e332 commit f427e3d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

exercises/largest-series-product/canonical-data.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@
113113
"error": "span must be smaller than string length"
114114
}
115115
},
116+
{
117+
"uuid": "0ae1ce53-d9ba-41bb-827f-2fceb64f058b",
118+
"reimplements": "5d81aaf7-4f67-4125-bf33-11493cc7eab7",
119+
"description": "rejects span longer than string length",
120+
"property": "largestProduct",
121+
"input": {
122+
"digits": "123",
123+
"span": 4
124+
},
125+
"expected": {
126+
"error": "span must not exceed string length"
127+
}
128+
},
116129
{
117130
"uuid": "06bc8b90-0c51-4c54-ac22-3ec3893a079e",
118131
"description": "reports 1 for empty string and empty product (0 span)",
@@ -163,6 +176,19 @@
163176
"error": "span must be smaller than string length"
164177
}
165178
},
179+
{
180+
"uuid": "6cf66098-a6af-4223-aab1-26aeeefc7402",
181+
"reimplements": "6d96c691-4374-4404-80ee-2ea8f3613dd4",
182+
"description": "rejects empty string and nonzero span",
183+
"property": "largestProduct",
184+
"input": {
185+
"digits": "",
186+
"span": 1
187+
},
188+
"expected": {
189+
"error": "span must not exceed string length"
190+
}
191+
},
166192
{
167193
"uuid": "7a38f2d6-3c35-45f6-8d6f-12e6e32d4d74",
168194
"description": "rejects invalid character in digits",

0 commit comments

Comments
 (0)