-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
refactor: simplify implementation of getCaseExpression
and setCaseExpression
#4023
Conversation
The test fails here in the CI. It expects one |
@monperrus @slarse I was also wondering if writing |
Ping @monperrus @slarse for reviews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation LGTM. Some minor comments on the tests.
Also, about the display names, I would put the method under test into them as the first thing written, because that's the name seen when running the tests. And so it's nice to know which method is under test just by looking at the name. Since the other nested types in the class are not categorized by method, it's not sufficient to rely on the name of the nested type for this one case.
If the contract is adequately expressed in the display name, then no that's not necessary. But it should be evident what part/piece of funcionality is being tested, and under what circumstances, and what the expected result is. |
How about I omit the I propose that we omit the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now, but I'd like @monperrus to have a look as well since this is (technically speaking) a metamodel change. Although internal.
@monperrus Please see what you think of this, it looks like a good patch to me.
I like this simplification (simpler is better: this is purely internal, the API remains the same, and all tests are green. 👍 Thanks a lot @algomaster99 |
getCaseExpression
and setCaseExpression
getCaseExpression
and setCaseExpression
Thansk @algomaster99, nicely done! |
Fixes #4019
These changes removed the
this.caseExpression
attribute as it is obsolete since the arrival ofthis.caseExpressions
. The latter is enough to handle one or more case expressions for a single case.Before merging, the following tasks need to be done.
APITest.testSetterInNodes
.