go
                                
                                 go copied to clipboard
                                
                                    go copied to clipboard
                            
                            
                            
                        card-tricks: Check if index is >= len(slice)
Adjusting so the test will now fail if the index value is greater than or equal to the size of the slice.
Hello. Thanks for opening a PR on Exercism 🙂
We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.
You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.
If you're interested in learning more about this auto-responder, please read this blog post.
Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.
Hey @CodeBleu.
Sorry for the delay in reviewing this. Still interested in working on this?
In this case, I'd suggest to add a new test where the index is strictly bigger than len(slice). That way we have a test for when the index is equal to len(slice) and another one for when it is bigger.
@andrerfcsantos Does there really need to be 2 tests? Not sure what the benefit is, if an = or > value is used. There would not be any use case to just check for =, right? Both will fail. Maybe I'm missing something, but I don't see it any different than writing a test that checks for a specific number greater than either...hence just test for >