Skip to content

Commit 63fdda7

Browse files
committed
Use ValueSets
1 parent d4e8ad8 commit 63fdda7

3 files changed

Lines changed: 6 additions & 21 deletions

File tree

.claude/skills/migrate-junit-source-to-tabletest/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Table formatting rules (mandatory):
2929
- Use '|' as delimiter.
3030
- Align columns with spaces so pipes line up vertically.
3131
- Prefer single quotes for strings requiring quotes (e.g., 'a|b', '[]', '{}', ' ').
32+
- Use value sets (`{a, b, c}`) instead of matrix-style repetition when only one dimension varies across otherwise-identical rows.
3233

3334
Conversions:
3435
A) @CsvSource

dd-trace-api/src/test/java/datadog/trace/api/IdGenerationStrategyTest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ class IdGenerationStrategyTest {
1919

2020
@TableTest({
2121
"scenario | traceId128BitGenerationEnabled | strategyName ",
22-
"random-64-bit | false | RANDOM ",
23-
"sequential-64-bit | false | SEQUENTIAL ",
24-
"secure-random-64-bit | false | SECURE_RANDOM",
25-
"random-128-bit | true | RANDOM ",
26-
"sequential-128-bit | true | SEQUENTIAL ",
27-
"secure-random-128-bit | true | SECURE_RANDOM"
22+
"strategies-64-bit | false | {RANDOM, SEQUENTIAL, SECURE_RANDOM}",
23+
"strategies-128-bit | true | {RANDOM, SEQUENTIAL, SECURE_RANDOM}"
2824
})
2925
@ParameterizedTest(name = "generate id with {1} and {0} bits")
3026
void generateIdWithStrategyAndBitSize(

dd-trace-api/src/test/java/datadog/trace/api/internal/util/HexStringUtilsTest.java

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,9 @@ class HexStringUtilsTest {
99

1010
@TableTest({
1111
"scenario | highOrderBits | lowOrderBits | size",
12-
"zero-size-10 | 0 | 0 | 10 ",
13-
"zero-size-16 | 0 | 0 | 16 ",
14-
"zero-size-20 | 0 | 0 | 20 ",
15-
"zero-size-32 | 0 | 0 | 32 ",
16-
"zero-size-40 | 0 | 0 | 40 ",
17-
"one-two-10 | 1 | 2 | 10 ",
18-
"one-two-16 | 1 | 2 | 16 ",
19-
"one-two-20 | 1 | 2 | 20 ",
20-
"one-two-32 | 1 | 2 | 32 ",
21-
"one-two-40 | 1 | 2 | 40 ",
22-
"large-size-10 | 6536977903480360123 | 3270264562721133536 | 10 ",
23-
"large-size-16 | 6536977903480360123 | 3270264562721133536 | 16 ",
24-
"large-size-20 | 6536977903480360123 | 3270264562721133536 | 20 ",
25-
"large-size-32 | 6536977903480360123 | 3270264562721133536 | 32 ",
26-
"large-size-40 | 6536977903480360123 | 3270264562721133536 | 40 "
12+
"zero | 0 | 0 | {10, 16, 20, 32, 40}",
13+
"one-two | 1 | 2 | {10, 16, 20, 32, 40}",
14+
"large | 6536977903480360123 | 3270264562721133536 | {10, 16, 20, 32, 40}"
2715
})
2816
@ParameterizedTest(name = "test hexadecimal String representations high={0} low={1} size={2}")
2917
void testHexadecimalStringRepresentations(long highOrderBits, long lowOrderBits, int size) {

0 commit comments

Comments
 (0)