From 2310072f43daf5d4d961c52a3e24e47f384775e9 Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Sat, 29 Mar 2025 11:53:29 +1100 Subject: [PATCH] span must not exceed string length --- .../canonical-data.json | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/exercises/largest-series-product/canonical-data.json b/exercises/largest-series-product/canonical-data.json index 3bf9efa89c..244bb6ebfe 100644 --- a/exercises/largest-series-product/canonical-data.json +++ b/exercises/largest-series-product/canonical-data.json @@ -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)", @@ -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",