Repository navigation
Validate repetition counts in the Repeat example - #987
Open
rksharma-owg wants to merge 1 commit into
Open
rksharma-owg wants to merge 1 commit into
rksharma-owg wants to merge 1 commit into
Conversation
Allow zero repetitions without constructing an invalid range and reject negative counts with a validation error. Preserve default output and one-based counters; align the README and DocC examples and cover bounds through the executable. Related to the count observation in apple#778.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shipped Repeat example and the matching README trap for
--count 0because1...0is an invalid range. Negative counts also trap. Validate negative counts before running and use a zero-safe loop while preserving default output and one-based counters. Add the same validation to the two DocC examples.Validation:
884b5786e8ddb854310a7130df3c73b50cfa03d2, covering the repository's Linux/macOS/Windows compiler matrix, Wasm, CMake, documentation, formatting and soundness.Local macOS Command Line Tools cannot compile XCTest/Testing here, so local suite validation used Linux Docker; the full macOS SDK runners passed. The project's Windows helper skips subprocess execution, so Windows unit success is not evidence that those executable regression cases ran there. Linux and macOS run them.
Related to the count observation in #778. This does not resolve that issue's separate help-name conflict.