Skip to content

largest-series-product: span must not exceed string length #2548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions exercises/largest-series-product/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@
"error": "span must be smaller than string length"
}
},
{
"uuid": "0ae1ce53-d9ba-41bb-827f-2fceb64f058b",
"reimplements": "5d81aaf7-4f67-4125-bf33-11493cc7eab7",
"description": "rejects span longer than string length",
"property": "largestProduct",
"input": {
"digits": "123",
"span": 4
},
"expected": {
"error": "span must not exceed string length"
}
},
{
"uuid": "06bc8b90-0c51-4c54-ac22-3ec3893a079e",
"description": "reports 1 for empty string and empty product (0 span)",
Expand Down Expand Up @@ -163,6 +176,19 @@
"error": "span must be smaller than string length"
}
},
{
"uuid": "6cf66098-a6af-4223-aab1-26aeeefc7402",
"reimplements": "6d96c691-4374-4404-80ee-2ea8f3613dd4",
"description": "rejects empty string and nonzero span",
"property": "largestProduct",
"input": {
"digits": "",
"span": 1
},
"expected": {
"error": "span must not exceed string length"
}
},
{
"uuid": "7a38f2d6-3c35-45f6-8d6f-12e6e32d4d74",
"description": "rejects invalid character in digits",
Expand Down
Loading