72c80f6993
Add a new spec DSL operator called `range-in` that allowes users of the spec_matcher to match values against numeric ranges. The surrounding brackets determines whether the limit should be inclusive or not. examples: <range-in> [ 10 20 ] : 10 <= x <= 20 <range-in> ( 10 20 ] : 10 < x <= 20 <range-in> [ 10 20 ) : 10 <= x < 20 <range-in> ( 10 20 ) : 10 < x < 20 Closes-Bug: #2052619 Change-Id: I444c01219d02ea7572d4b82117b89b8d3eb75e56 Signed-off-by: Adam Rozman <adam.rozman@est.tech> Co-authored-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
18 lines
714 B
YAML
18 lines
714 B
YAML
---
|
|
features:
|
|
- |
|
|
Introducing a new spec DSL operator called ``<range-in>`` that allows users
|
|
to match a numeric value against a range of numbers that are delimited with
|
|
lower and upper limits. The new operator is a binary operator that accepts
|
|
4 arguments.
|
|
|
|
- The first one and the last one are brackets. ``[`` and ``]`` defines
|
|
inclusive limits while ``(`` and ``)`` defines exclusive limits.
|
|
|
|
- The second one is the lower limit while the third one is the upper
|
|
limit.
|
|
|
|
Example: "<range-in> [ 10.4 20 )" will match a value against an range
|
|
such as the lower limit of the range is 10.4 and the upper limit is 20.
|
|
Note that 10.4 is included while 20 is excluded.
|