Closed mvanaken closed 1 year ago
Merging #393 (c642a7d) into master (a5129bf) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #393 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 1120 1127 +7
===========================================
Files 97 97
Lines 1474 1490 +16
Branches 153 154 +1
===========================================
+ Hits 1474 1490 +16
Files Changed | Coverage Δ | |
---|---|---|
.../src/main/java/io/parsingdata/metal/Shorthand.java | 100.00% <100.00%> (ø) |
|
.../java/io/parsingdata/metal/data/ImmutableList.java | 100.00% <100.00%> (ø) |
|
.../java/io/parsingdata/metal/data/ImmutablePair.java | 100.00% <100.00%> (ø) |
|
...ain/java/io/parsingdata/metal/data/ParseValue.java | 100.00% <100.00%> (ø) |
|
...singdata/metal/expression/value/reference/Ref.java | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This PR gives Ref a varargument, so multiple values with different names can be selected with a single expression. For more info check issue #392.
The main changes are in Ref.
The following decisions were made:
withLimit
it is more clear that the same token is created, but only the limit is different.ref(name, limit)
vsref(limit, name, name...)
. The first is the shorthand that already existed, the second is the vararg variant. To avoid confusion which one to use when, decided to deprecate the first and to let users know to always use the vararg variant. Used the second variant in tests and only used the deprecated variant in ReferenceValueExpressionSemanticsTest for 100% test coverage.