Commit 8307cd4
authored
Support CharSequence argument for Fallback String-to-Object Conversion
Prior to this commit, the Fallback String-to-Object Conversion support
for parameterized tests supported factory constructors and methods that
accepted a single String argument.
This commit relaxes that restriction to support factory constructors
and methods that accept either a single String argument or a single
CharSequence argument, since the original source String can always be
supplied to an Executable that accepts a CharSequence. For backward
compatibility, the search algorithm gives precedence to factories that
accept String arguments, only falling back to factories that accept
CharSequence arguments if necessary.
Note that this change is available to third parties via
ConversionSupport in junit-platform-commons, which junit-jupiter-params
utilizes.
Closes #4815
Closes #48191 parent 78a3d2e commit 8307cd4
File tree
6 files changed
+228
-62
lines changed- documentation/src/docs/asciidoc
- release-notes
- user-guide
- junit-platform-commons/src/main/java/org/junit/platform/commons/support/conversion
- jupiter-tests/src/test/java/org/junit/jupiter/params
- platform-tests/src/test/java/org/junit/platform/commons/support/conversion
6 files changed
+228
-62
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2519 | 2519 | | |
2520 | 2520 | | |
2521 | 2521 | | |
2522 | | - | |
2523 | | - | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
2524 | 2525 | | |
2525 | | - | |
2526 | | - | |
| 2526 | + | |
| 2527 | + | |
2527 | 2528 | | |
2528 | 2529 | | |
2529 | 2530 | | |
| |||
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
Lines changed: 53 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
96 | 103 | | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
101 | | - | |
102 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
103 | 126 | | |
104 | 127 | | |
105 | 128 | | |
106 | 129 | | |
107 | 130 | | |
108 | 131 | | |
109 | | - | |
110 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
111 | 135 | | |
112 | 136 | | |
113 | 137 | | |
| |||
117 | 141 | | |
118 | 142 | | |
119 | 143 | | |
120 | | - | |
| 144 | + | |
121 | 145 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 146 | + | |
129 | 147 | | |
130 | 148 | | |
131 | 149 | | |
| |||
136 | 154 | | |
137 | 155 | | |
138 | 156 | | |
139 | | - | |
| 157 | + | |
140 | 158 | | |
141 | | - | |
142 | 159 | | |
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
146 | 163 | | |
147 | | - | |
| 164 | + | |
148 | 165 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 166 | + | |
156 | 167 | | |
157 | 168 | | |
158 | 169 | | |
159 | 170 | | |
160 | 171 | | |
161 | 172 | | |
162 | 173 | | |
163 | | - | |
| 174 | + | |
164 | 175 | | |
165 | | - | |
166 | 176 | | |
167 | 177 | | |
168 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
169 | 183 | | |
170 | 184 | | |
171 | | - | |
| 185 | + | |
172 | 186 | | |
173 | 187 | | |
174 | 188 | | |
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
314 | 325 | | |
315 | 326 | | |
316 | 327 | | |
| |||
1460 | 1471 | | |
1461 | 1472 | | |
1462 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1463 | 1480 | | |
1464 | 1481 | | |
1465 | 1482 | | |
| |||
2673 | 2690 | | |
2674 | 2691 | | |
2675 | 2692 | | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
2676 | 2696 | | |
2677 | 2697 | | |
2678 | 2698 | | |
| |||
0 commit comments