Skip to content
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

Feature suggestion: Add arithmetic operations to constraints #58

Open
j-hoeppner opened this issue May 31, 2021 · 0 comments
Open

Feature suggestion: Add arithmetic operations to constraints #58

j-hoeppner opened this issue May 31, 2021 · 0 comments

Comments

@j-hoeppner
Copy link

j-hoeppner commented May 31, 2021

As a user I would like to use arithmetic operations on parameters in a constraint to further increase the possibility to create test cases alongside more complex business logic.

e.G. in case of the insurance domain:
IF [AmountFireDamages] + [AmountPipeWaterDamages] > 5 THEN [Coverage] = "Basic Coverage" ELSE "Extended Coverage";

I tried to fit it into the constraints grammar by adding it in the term and introducing the new ArithmeticOperation (only valid for Numerical Parameters):

Term          :: =
  ParameterName Relation Value
| ParameterName LIKE PatternString
| ParameterName IN { ValueSet }
| ParameterName Relation ParameterName
| ParameterName ArithmeticOperation ParameterName

ArithmeticOperation :: = 
  + 
| - 
| *
| /

As I'm not deep enough into C++ coding, I unfortunately couldn't add a pull request for now, in case this is needed, I would actually try to come up with something, but this could take some time.
In case needed I would be happy to get a hint where I would need to change some things. From a first screening I would have guessed somewhere in generator.h and exclusion.cpp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant