You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: SpheresScenario: A ray intersects a sphere at two pointsGiven r ← ray(point(0, 0, -5), vector(0, 0, 1))
And s ← sphere()
When xs ← intersect(s, r)
Then xs.count = 2
And xs[0] = 4.0
And xs[1] = 6.0
Trying to keep it simple, I thought I'd write the step definition literally to start off:
The step "s ← sphere()" is undefined. You can implement it using the snippet(s) below:
Given("s ← sphere\\()", () -> {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java8.PendingException();
});
The correct step definition is:
s ← sphere()
Because
private static final Pattern OPTIONAL_PATTERN = Pattern.compile("(\\\\\\\\)?\\(([^)]+)\\)");
Does not allow empty capture groups.
Probably solved by implementing the parser for Cucumber Expressions rather then the current rewriting solution but we should check the snippet generation when we do.
The text was updated successfully, but these errors were encountered:
That would work but it would be breaking changes in cucumber expressions. If breaking changes are to be made I'd rather bundle them all up as part of #771
Spotted on stack overflow:
https://stackoverflow.com/questions/61725664/is-it-not-possible-to-have-a-step-definition-with-no-parameters
The following scenario:
Trying to keep it simple, I thought I'd write the step definition literally to start off:
The result,
The correct step definition is:
Because
Does not allow empty capture groups.
Probably solved by implementing the parser for Cucumber Expressions rather then the current rewriting solution but we should check the snippet generation when we do.
The text was updated successfully, but these errors were encountered: