Commit aba4d99
committed
Smarter versioned tests (#1744)
Redo how versioned tests work.
The diff in the README.md and the doc comments in the .dart file changes should explain what's going on here. The basic idea is that now a test is either completely unversioned with only a single output, or completely versioned where all of the output sections have a version number.
I think that's easier to read than a test like:
```
<<<
some.code();
>>> 3.8
some.code();
>>>
some.code();
```
And you have to try to figure out what versions the last section applies to.
This commit also updates the tests to match the new style. This just means adding `3.8` to a bunch of output sections where that was previously implicit. The set of tested versions and their expectations are the same.
I also updated the test updater to support the new output styles.
This change also speeds up running the formatter tests by skipping running tests on language versions where the output is the same as a previous and subsequent version. Prior to this change, running tall_format_test.dart runs 8,674 tests. If you bump the highest supported language version from 3.9 to 3.10 (which I'm about to do for dot shorthands), that jumps to 11,556 because it runs every test at every language version.
With this change, it runs 5,940 tests when the maximum supported version is both 3.9 and 3.10. The number of tests being run only increases when there are actual new tests or new version-specific expectations.1 parent 3f94dd1 commit aba4d99
File tree
85 files changed
+1847
-1700
lines changed- example
- lib/src/testing
- test
- tall
- declaration
- expression
- function
- invocation
- pattern
- regression
- 0000
- 0100
- 0200
- 0300
- 0400
- 0500
- 0600
- 0700
- 0800
- 0900
- 1000
- 1100
- 1200
- 1400
- 1500
- 1600
- 1700
- other
- statement
- variable
- tool
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
85 files changed
+1847
-1700
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
131 | 149 | | |
132 | | - | |
| 150 | + | |
| 151 | + | |
133 | 152 | | |
134 | 153 | | |
135 | 154 | | |
| |||
166 | 185 | | |
167 | 186 | | |
168 | 187 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
176 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
177 | 202 | | |
178 | 203 | | |
179 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
180 | 225 | | |
181 | 226 | | |
182 | 227 | | |
| |||
276 | 321 | | |
277 | 322 | | |
278 | 323 | | |
279 | | - | |
| 324 | + | |
280 | 325 | | |
281 | 326 | | |
282 | 327 | | |
| |||
286 | 331 | | |
287 | 332 | | |
288 | 333 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 334 | + | |
296 | 335 | | |
297 | 336 | | |
298 | 337 | | |
| |||
301 | 340 | | |
302 | 341 | | |
303 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
304 | 371 | | |
305 | 372 | | |
306 | 373 | | |
307 | 374 | | |
308 | 375 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | 376 | | |
313 | 377 | | |
314 | 378 | | |
315 | 379 | | |
316 | 380 | | |
317 | | - | |
| 381 | + | |
318 | 382 | | |
319 | 383 | | |
320 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
41 | 72 | | |
42 | 73 | | |
43 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
44 | 80 | | |
45 | 81 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
49 | 91 | | |
50 | 92 | | |
51 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | 163 | | |
169 | 164 | | |
170 | 165 | | |
171 | | - | |
172 | | - | |
173 | | - | |
| 166 | + | |
174 | 167 | | |
175 | 168 | | |
176 | 169 | | |
177 | | - | |
178 | 170 | | |
| 171 | + | |
| 172 | + | |
179 | 173 | | |
180 | 174 | | |
181 | 175 | | |
182 | 176 | | |
183 | 177 | | |
184 | 178 | | |
185 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
| |||
96 | 89 | | |
97 | 90 | | |
98 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 101 | | |
107 | 102 | | |
108 | 103 | | |
109 | 104 | | |
110 | 105 | | |
111 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 123 | | |
129 | 124 | | |
130 | 125 | | |
131 | 126 | | |
132 | 127 | | |
133 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
0 commit comments