Skip to content

Commit 24715c1

Browse files
authored
Migrate regression/0200/ (#1460)
Migrate regression/0200/ to tall style.
1 parent 62e9dc6 commit 24715c1

33 files changed

+887
-0
lines changed

test/tall/regression/0200/0200.stmt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
>>>
2+
final confirmationFuture = _dialogService.showConfirmationDialog(
3+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
4+
new DialogSettings()
5+
..primaryButton = DialogSettings.BUTTON_CANCEL
6+
..okButtonText = 'OK'
7+
..cancelButtonText = 'Kittens');
8+
<<<
9+
final confirmationFuture = _dialogService.showConfirmationDialog(
10+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
11+
new DialogSettings()
12+
..primaryButton = DialogSettings.BUTTON_CANCEL
13+
..okButtonText = 'OK'
14+
..cancelButtonText = 'Kittens',
15+
);

test/tall/regression/0200/0201.stmt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
>>>
2+
main() {
3+
var s =
4+
'qsmdlfkjqlsdf mlqdskf mlqkds flq fdmlqk mqlfk ' 'mlfqks dflq sdmlfkjqmlsdkjf mlqks mfdlq smlf ' 'mqlskdjf mlqksd jfmlqkj dmflkq mdslk jfmqds kf';
5+
}
6+
<<<
7+
main() {
8+
var s =
9+
'qsmdlfkjqlsdf mlqdskf mlqkds flq fdmlqk mqlfk '
10+
'mlfqks dflq sdmlfkjqmlsdkjf mlqks mfdlq smlf '
11+
'mqlskdjf mlqksd jfmlqkj dmflkq mdslk jfmqds kf';
12+
}

test/tall/regression/0200/0203.stmt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
>>>
2+
var constructedRequest = new Request()
3+
..campaignId =
4+
(rollup.campaignId == null ? new Int64(0) : rollup.campaignId);
5+
<<<
6+
### TODO(1466): Should allow target on the first line.
7+
var constructedRequest =
8+
new Request()
9+
..campaignId =
10+
(rollup.campaignId == null ? new Int64(0) : rollup.campaignId);
11+
>>> (indent 2)
12+
var constructedRequest = new Request()
13+
..campaignId =
14+
(rollup.campaignId == null ? new Int64(0) : rollup.campaignId);
15+
<<<
16+
var constructedRequest =
17+
new Request()
18+
..campaignId =
19+
(rollup.campaignId == null ? new Int64(0) : rollup.campaignId);

test/tall/regression/0200/0204.stmt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
>>>
2+
var serverDuration = new Duration(
3+
microseconds: response.requestProcessingTimeUsec.toInt())
4+
.inMilliseconds.toString();
5+
<<<
6+
### TODO(rnystrom): I think it would look better to split the method chain.
7+
var serverDuration =
8+
new Duration(
9+
microseconds: response.requestProcessingTimeUsec.toInt(),
10+
).inMilliseconds.toString();
11+
>>> (indent 8)
12+
var serverDuration = new Duration(
13+
microseconds: response.requestProcessingTimeUsec.toInt())
14+
.inMilliseconds.toString();
15+
<<<
16+
### TODO(rnystrom): I think it would look better to split the method chain.
17+
var serverDuration =
18+
new Duration(
19+
microseconds: response.requestProcessingTimeUsec.toInt(),
20+
).inMilliseconds.toString();

test/tall/regression/0200/0205.stmt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
>>>
2+
activity
3+
..parameters[
4+
requestDeserialization] = '${stopwatch.elapsedMilliseconds}';
5+
<<<
6+
activity
7+
..parameters[requestDeserialization] = '${stopwatch.elapsedMilliseconds}';
8+
>>> (indent 6)
9+
activity
10+
..parameters[
11+
requestDeserialization] = '${stopwatch.elapsedMilliseconds}';
12+
<<<
13+
activity
14+
..parameters[requestDeserialization] =
15+
'${stopwatch.elapsedMilliseconds}';

test/tall/regression/0200/0206.stmt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
>>>
2+
when(mockLoader.loadData(expectedRequestMetricInitialDateCTR))
3+
.thenReturn(
4+
_buildMinimalResponseFuture(MetricType.CTR, metricRequest));
5+
<<<
6+
### TODO(rnystrom): I think it would look better to split the method chain.
7+
when(
8+
mockLoader.loadData(expectedRequestMetricInitialDateCTR),
9+
).thenReturn(_buildMinimalResponseFuture(MetricType.CTR, metricRequest));

test/tall/regression/0200/0211.unit

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
>>> (indent 2)
2+
LiteralMap mapLiteral(List<LiteralMapEntry> entries, {bool isConst: false}) {
3+
return new LiteralMap(null, // Type arguments.
4+
new NodeList(symbolToken(OPEN_CURLY_BRACKET_INFO),
5+
linkedList(entries), symbolToken(CLOSE_CURLY_BRACKET_INFO), ','),
6+
isConst ? keywordToken('const') : null);
7+
}
8+
<<<
9+
LiteralMap mapLiteral(List<LiteralMapEntry> entries, {bool isConst: false}) {
10+
return new LiteralMap(
11+
null, // Type arguments.
12+
new NodeList(
13+
symbolToken(OPEN_CURLY_BRACKET_INFO),
14+
linkedList(entries),
15+
symbolToken(CLOSE_CURLY_BRACKET_INFO),
16+
',',
17+
),
18+
isConst ? keywordToken('const') : null,
19+
);
20+
}
21+
>>>
22+
void defineProperty(var obj, String property, var value) {
23+
JS('void', 'Object.defineProperty(#, #, '
24+
'{value: #, enumerable: false, writable: true, configurable: true})',
25+
obj, property, value);
26+
}
27+
<<<
28+
void defineProperty(var obj, String property, var value) {
29+
JS(
30+
'void',
31+
'Object.defineProperty(#, #, '
32+
'{value: #, enumerable: false, writable: true, configurable: true})',
33+
obj,
34+
property,
35+
value,
36+
);
37+
}
38+
>>> (indent 4)
39+
main() {
40+
return searchEngine.searchTopLevelDeclarations('').then(
41+
(List<SearchMatch> matches) {
42+
_addNonImportedElementSuggestions(matches, excludedLibs);
43+
return true;
44+
});
45+
}
46+
<<<
47+
main() {
48+
return searchEngine.searchTopLevelDeclarations('').then((
49+
List<SearchMatch> matches,
50+
) {
51+
_addNonImportedElementSuggestions(matches, excludedLibs);
52+
return true;
53+
});
54+
}
55+
>>> (indent 2)
56+
test_getRelationships_empty() {
57+
return store.getRelationships(elementA, relationship).then(
58+
(List<Location> locations) {
59+
expect(locations, isEmpty);
60+
});
61+
}
62+
<<<
63+
test_getRelationships_empty() {
64+
return store.getRelationships(elementA, relationship).then((
65+
List<Location> locations,
66+
) {
67+
expect(locations, isEmpty);
68+
});
69+
}
70+
>>> (indent 2)
71+
_asRuntimeType() {
72+
return [
73+
_class._jsConstructor
74+
].addAll(typeArguments.map((t) => t._asRuntimeType()));
75+
}
76+
<<<
77+
_asRuntimeType() {
78+
return [
79+
_class._jsConstructor,
80+
].addAll(typeArguments.map((t) => t._asRuntimeType()));
81+
}

test/tall/regression/0200/0212.stmt

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
>>> (indent 4)
2+
views.configure({
3+
'overview': routeCfg(
4+
path: '/overview',
5+
view: 'view-overview',
6+
defaultRoute: true,
7+
dontLeaveOnParamChanges: true,
8+
enter: (route) => router.go('overview', {})),
9+
'movies': routeCfg(path: '/movies', // /:userId',
10+
view: 'view-movies',
11+
dontLeaveOnParamChanges: true,
12+
mount: {
13+
'movie': routeCfg(
14+
path: '/movie/:movieId',
15+
view: 'view-movie',
16+
dontLeaveOnParamChanges: true)
17+
}),
18+
'people': routeCfg(
19+
path: '/people',
20+
view: 'view-people',
21+
dontLeaveOnParamChanges: true,
22+
mount: {
23+
'person': routeCfg(
24+
path: '/person/:personId',
25+
view: 'view-person',
26+
dontLeaveOnParamChanges: true)
27+
})
28+
});
29+
<<<
30+
views.configure({
31+
'overview': routeCfg(
32+
path: '/overview',
33+
view: 'view-overview',
34+
defaultRoute: true,
35+
dontLeaveOnParamChanges: true,
36+
enter: (route) => router.go('overview', {}),
37+
),
38+
'movies': routeCfg(
39+
path: '/movies', // /:userId',
40+
view: 'view-movies',
41+
dontLeaveOnParamChanges: true,
42+
mount: {
43+
'movie': routeCfg(
44+
path: '/movie/:movieId',
45+
view: 'view-movie',
46+
dontLeaveOnParamChanges: true,
47+
),
48+
},
49+
),
50+
'people': routeCfg(
51+
path: '/people',
52+
view: 'view-people',
53+
dontLeaveOnParamChanges: true,
54+
mount: {
55+
'person': routeCfg(
56+
path: '/person/:personId',
57+
view: 'view-person',
58+
dontLeaveOnParamChanges: true,
59+
),
60+
},
61+
),
62+
});

test/tall/regression/0200/0217.stmt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
>>>
2+
Annotation _getAnnotation(AnnotatedNode node, String name) => nodeMetadata
3+
.firstWhere((annotation) => _isAnnotationType(annotation, name),
4+
orElse: () => null);
5+
<<<
6+
Annotation _getAnnotation(AnnotatedNode node, String name) => nodeMetadata
7+
.firstWhere(
8+
(annotation) => _isAnnotationType(annotation, name),
9+
orElse: () => null,
10+
);
11+
>>> (indent 2)
12+
Annotation _getAnnotation(AnnotatedNode node, String name) => nodeMetadata
13+
.firstWhere((annotation) => _isAnnotationType(annotation, name),
14+
orElse: () => null);
15+
<<<
16+
Annotation _getAnnotation(AnnotatedNode node, String name) => nodeMetadata
17+
.firstWhere(
18+
(annotation) => _isAnnotationType(annotation, name),
19+
orElse: () => null,
20+
);

test/tall/regression/0200/0218.stmt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
>>> (indent 2)
2+
var player = body.animate(
3+
[{"font-size": "500px"}, {"font-size": fontSize}], {"duration": 100});
4+
<<<
5+
var player = body.animate(
6+
[
7+
{"font-size": "500px"},
8+
{"font-size": fontSize},
9+
],
10+
{"duration": 100},
11+
);

0 commit comments

Comments
 (0)