Skip to content

Commit ac2650a

Browse files
authored
Get the test updater script working again. (#1743)
When I made the style changes language versions for Dart 3.8, I changed how tests are written to allow a single test to have different expected outputs at different language versions. I was pressed for time, so that broke the automated test updater which doesn't know how to handle versions. This gets it working again. In the process, I decided to tweak how the final newline in test files is handled. For years, I avoided having a trailing newline because I though it would confuse the formatter. At some point that may have even been true. But it turns out to be fine and it's more idiomatic to have a trailing newline at the end of a text file. The test updater now ensures that and I went ahead and normalized all of the tests to have trailing newlines. There are no other changes to the test files.
1 parent 44e8cfe commit ac2650a

File tree

970 files changed

+1005
-1000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

970 files changed

+1005
-1000
lines changed

test/short/comments/cascades.stmt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ receiver
6464
..cascade()
6565

6666
// comment
67-
..cascade();
67+
..cascade();

test/short/comments/classes.unit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,4 @@ class Foo< /* comment */ T> {}
195195
class Foo< /* comment */TypeParameter> {}
196196
<<<
197197
class Foo< /* comment */
198-
TypeParameter> {}
198+
TypeParameter> {}

test/short/comments/enums.unit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ enum Foo {
116116
a(// c
117117
),
118118
b()
119-
}
119+
}

test/short/comments/expressions.stmt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ y) = o;
114114
y) = o;
115115
<<<
116116
(x && // c
117-
y) = o;
117+
y) = o;

test/short/comments/extensions.unit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@ extension A on B {}
193193

194194
/**
195195
*/
196-
extension A on B {}
196+
extension A on B {}

test/short/comments/functions.unit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,4 +247,4 @@ function(
247247
@Other
248248
@Third
249249
longParameter2,
250-
) {}
250+
) {}

test/short/comments/generic_methods.unit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ void foo/*<S>*/(var /*=S*/ x) {
5050
<<<
5151
void foo/*<S>*/(var/*=S*/ x) {
5252
var/*=S*/ y = x;
53-
}
53+
}

test/short/comments/lists.stmt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ var list = [
110110
<<<
111111
var list = [
112112
// comment
113-
];
113+
];

test/short/comments/maps.stmt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ var map = {
115115
<<<
116116
var map = {
117117
// comment
118-
};
118+
};

test/short/comments/mixed.unit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ class C {
103103
//// not a doc comment
104104
//commentedOut() {}
105105
method() {}
106-
}
106+
}

0 commit comments

Comments
 (0)