-
Notifications
You must be signed in to change notification settings - Fork 463
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
Spock breaks start-exclusive ranges #1956
Labels
Comments
Another reproducer compared to plain groovy. import spock.lang.*
class ASpec extends Specification {
def "test range"() {
expect:
(0..5) == [0, 1, 2, 3, 4, 5]
(0<..5) == [1, 2, 3, 4, 5]
(0..<5) == [0, 1, 2, 3, 4]
(0<..<5) == [1, 2, 3, 4]
}
} |
leonard84
added a commit
to leonard84/spock
that referenced
this issue
May 20, 2024
leonard84
added a commit
to leonard84/spock
that referenced
this issue
May 20, 2024
leonard84
added a commit
to leonard84/spock
that referenced
this issue
May 20, 2024
leonard84
added a commit
that referenced
this issue
May 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When creating a Groovy range like
0<..5
which should exclude the first number, a Spock test will not exclude the first number.To Reproduce
Expected behavior
A range constructed as
a<..b
will start at the next value after a.Actual behavior
A range constructed as
a<..b
starts at a.Java version
17
Buildtool version
Gradle 8.3
What operating system are you using
Mac
Dependencies
org.spockframework:spock-core:2.4-M4-groovy-4.0
Additional context
No response
The text was updated successfully, but these errors were encountered: