-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(primitive_types4): Fail on a slice covering the wrong area
This commit converts primitive_types4 to a test and asserts that the slice given is equal to the expected slice. The intent of the primitive_types4 exercise appears to be to ensure the user understands inclusive and exclusive bounds as well as slice syntax. `rustlings` commands using `compile` do not verify that a specific println is reached and, in the case of `watch` and `verify` (but not `run`), they do not output the `println`s at all. This fix is semantically similar to #198. It does not take a stance on the correct way to handle this for all exercises; see #127. There are likely other exercises whose intent are masked by this issue.
- Loading branch information
Showing
3 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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