Skip to content

Commit 62e9dc6

Browse files
authored
Migrate regression/0300/ (#1462)
Migrate regression/0300/ to tall style.
1 parent 194a342 commit 62e9dc6

26 files changed

+847
-0
lines changed

test/tall/regression/0300/0357.stmt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
>>> (indent 2)
2+
bool theMethodNameGoesHere(ParameterTyp result) => reallyLongIdentifier
3+
.any((MyClass myParam) => myParam.id == result.myParam.id);
4+
<<<
5+
bool theMethodNameGoesHere(ParameterTyp result) => reallyLongIdentifier.any(
6+
(MyClass myParam) => myParam.id == result.myParam.id,
7+
);

test/tall/regression/0300/0360.stmt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
>>>
2+
success((x1) => (x2) => (x3) => (x4) => (x5) => (x6) => (x7) => (x8) => (x9) => (x10) => (x11) => (x12) => (x13) => (x14) => (x15) => (x16) => [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16]) * p1 * p2 * p3 * p4 * p5 * p6 * p7 * p8 * p9 * p10 * p11 * p12 * p13 * p14 * p15 * p16;
3+
<<<
4+
success(
5+
(x1) =>
6+
(x2) =>
7+
(x3) =>
8+
(x4) =>
9+
(x5) =>
10+
(x6) =>
11+
(x7) =>
12+
(x8) =>
13+
(x9) =>
14+
(x10) =>
15+
(x11) =>
16+
(x12) =>
17+
(x13) =>
18+
(x14) =>
19+
(x15) =>
20+
(x16) => [
21+
x1,
22+
x2,
23+
x3,
24+
x4,
25+
x5,
26+
x6,
27+
x7,
28+
x8,
29+
x9,
30+
x10,
31+
x11,
32+
x12,
33+
x13,
34+
x14,
35+
x15,
36+
x16,
37+
],
38+
) *
39+
p1 *
40+
p2 *
41+
p3 *
42+
p4 *
43+
p5 *
44+
p6 *
45+
p7 *
46+
p8 *
47+
p9 *
48+
p10 *
49+
p11 *
50+
p12 *
51+
p13 *
52+
p14 *
53+
p15 *
54+
p16;

test/tall/regression/0300/0361.unit

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
>>>
2+
class Foo {
3+
/**
4+
* Basic one-byte 608 CC char set, mostly ASCII.
5+
* Indexed by (char-0x20).
6+
*/
7+
static const List<int> ccUtfTable0 = const <int> [
8+
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, // ! " # $ % & '
9+
0x28, 0x29, // ( )
10+
0xE1, // 2A: 225 'á' "Latin small letter A with acute"
11+
0x2b, 0x2c, 0x2d, 0x2e, 0x2f, // + , - . /
12+
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, // 0 1 2 3 4 5 6 7
13+
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // 8 9 : ; < = > ?
14+
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, // @ A B C D E F G
15+
0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, // H I J K L M N O
16+
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, // P Q R S T U V W
17+
0x58, 0x59, 0x5a, 0x5b, // X Y Z [
18+
0xE9, // 5C: 233 'é' "Latin small letter E with acute"
19+
0x5d, // ]
20+
0xED, // 5E: 237 'í' "Latin small letter I with acute"
21+
0xF3, // 5F: 243 'ó' "Latin small letter O with acute"
22+
0xFA, // 60: 250 'ú' "Latin small letter U with acute"
23+
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, // a b c d e f g
24+
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, // h i j k l m n o
25+
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, // p q r s t u v w
26+
0x78, 0x79, 0x7a, // x y z
27+
0xE7, // 7B: 231 'ç' "Latin small letter C with cedilla"
28+
0xF7, // 7C: 247 '÷' "Division sign"
29+
0xD1, // 7D: 209 'Ñ' "Latin capital letter N with tilde"
30+
0xF1, // 7E: 241 'ñ' "Latin small letter N with tilde"
31+
0x25A0 // 7F: "Black Square" (NB: 2588 = Full Block)
32+
];
33+
}
34+
<<<
35+
class Foo {
36+
/**
37+
* Basic one-byte 608 CC char set, mostly ASCII.
38+
* Indexed by (char-0x20).
39+
*/
40+
static const List<int> ccUtfTable0 = const <int>[
41+
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, // ! " # $ % & '
42+
0x28, 0x29, // ( )
43+
0xE1, // 2A: 225 'á' "Latin small letter A with acute"
44+
0x2b, 0x2c, 0x2d, 0x2e, 0x2f, // + , - . /
45+
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, // 0 1 2 3 4 5 6 7
46+
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // 8 9 : ; < = > ?
47+
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, // @ A B C D E F G
48+
0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, // H I J K L M N O
49+
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, // P Q R S T U V W
50+
0x58, 0x59, 0x5a, 0x5b, // X Y Z [
51+
0xE9, // 5C: 233 'é' "Latin small letter E with acute"
52+
0x5d, // ]
53+
0xED, // 5E: 237 'í' "Latin small letter I with acute"
54+
0xF3, // 5F: 243 'ó' "Latin small letter O with acute"
55+
0xFA, // 60: 250 'ú' "Latin small letter U with acute"
56+
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, // a b c d e f g
57+
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, // h i j k l m n o
58+
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, // p q r s t u v w
59+
0x78, 0x79, 0x7a, // x y z
60+
0xE7, // 7B: 231 'ç' "Latin small letter C with cedilla"
61+
0xF7, // 7C: 247 '÷' "Division sign"
62+
0xD1, // 7D: 209 'Ñ' "Latin capital letter N with tilde"
63+
0xF1, // 7E: 241 'ñ' "Latin small letter N with tilde"
64+
0x25A0, // 7F: "Black Square" (NB: 2588 = Full Block)
65+
];
66+
}

test/tall/regression/0300/0364.unit

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
>>>
2+
class Foo {
3+
static bool _identityEquality(JsObject a, JsObject b) native "JsObject_identityEquality";
4+
5+
static bool short(JsObject a, JsObject b) native "JsObject_identityEquality";
6+
}
7+
<<<
8+
class Foo {
9+
static bool _identityEquality(
10+
JsObject a,
11+
JsObject b,
12+
) native "JsObject_identityEquality";
13+
14+
static bool short(JsObject a, JsObject b) native "JsObject_identityEquality";
15+
}

test/tall/regression/0300/0366.stmt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
>>> (indent 4)
2+
zoop(
3+
"zoop description here",
4+
spang(() {
5+
;
6+
}));
7+
<<<
8+
zoop(
9+
"zoop description here",
10+
spang(() {
11+
;
12+
}),
13+
);

test/tall/regression/0300/0367.stmt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
>>> (indent 6)
2+
identifier__ = identifier_____.identifier___
3+
.transform(new StreamTransformer<TypeArg____, Type_>.fromHandlers(
4+
handleData: (TypeName___ arg__, EventSink<Type_> arg_) {
5+
;
6+
}))
7+
.asBroadcastStream();
8+
<<<
9+
### TODO(1466): Should allow the target and property after the "=".
10+
identifier__ =
11+
identifier_____.identifier___
12+
.transform(
13+
new StreamTransformer<TypeArg____, Type_>.fromHandlers(
14+
handleData: (TypeName___ arg__, EventSink<Type_> arg_) {
15+
;
16+
},
17+
),
18+
)
19+
.asBroadcastStream();
20+
>>> (indent 4)
21+
_trigger
22+
.then(ut.expectAsync((result) {
23+
if (_deferExpectations == null || _deferExpectations == false) {
24+
body(result);
25+
} else {
26+
defer(ut.expectAsync(() => body(result)));
27+
}
28+
}))
29+
.catchError(ut.fail);
30+
<<<
31+
_trigger
32+
.then(
33+
ut.expectAsync((result) {
34+
if (_deferExpectations == null || _deferExpectations == false) {
35+
body(result);
36+
} else {
37+
defer(ut.expectAsync(() => body(result)));
38+
}
39+
}),
40+
)
41+
.catchError(ut.fail);

test/tall/regression/0300/0368.unit

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
>>>
2+
class Compiler {
3+
Compiler()
4+
: this.options = options,
5+
this.allowedLibraryCategories = getAllowedLibraryCategories(options),
6+
super(
7+
outputProvider: outputProvider,
8+
enableTypeAssertions: hasOption(options, '--enable-checked-mode'),
9+
enableUserAssertions: hasOption(options, '--enable-checked-mode'),
10+
trustTypeAnnotations:
11+
hasOption(options, '--trust-type-annotations'),
12+
trustPrimitives:
13+
hasOption(options, '--trust-primitives'),
14+
enableMinification: hasOption(options, '--minify'),
15+
preserveUris: hasOption(options, '--preserve-uris'),
16+
enableNativeLiveTypeAnalysis:
17+
!hasOption(options, '--disable-native-live-type-analysis'),
18+
emitJavaScript: !(hasOption(options, '--output-type=dart') ||
19+
hasOption(options, '--output-type=dart-multi')),
20+
dart2dartMultiFile: hasOption(options, '--output-type=dart-multi'),
21+
generateSourceMap: !hasOption(options, '--no-source-maps'),
22+
analyzeAllFlag: hasOption(options, '--analyze-all'),
23+
analyzeOnly: hasOption(options, '--analyze-only'),
24+
analyzeMain: hasOption(options, '--analyze-main'),
25+
analyzeSignaturesOnly:
26+
hasOption(options, '--analyze-signatures-only'),
27+
strips: extractCsvOption(options, '--force-strip='),
28+
enableConcreteTypeInference:
29+
hasOption(options, '--enable-concrete-type-inference'),
30+
disableTypeInferenceFlag:
31+
hasOption(options, '--disable-type-inference'),
32+
preserveComments: hasOption(options, '--preserve-comments'),
33+
useCpsIr: hasOption(options, '--use-cps-ir'),
34+
verbose: hasOption(options, '--verbose'),
35+
sourceMapUri: extractUriOption(options, '--source-map='),
36+
outputUri: extractUriOption(options, '--out='),
37+
terseDiagnostics: hasOption(options, '--terse'),
38+
deferredMapUri: extractUriOption(options, '--deferred-map='),
39+
dumpInfo: hasOption(options, '--dump-info'),
40+
buildId: extractStringOption(
41+
options, '--build-id=',
42+
"build number could not be determined"),
43+
showPackageWarnings:
44+
hasOption(options, '--show-package-warnings'),
45+
useContentSecurityPolicy: hasOption(options, '--csp'),
46+
hasIncrementalSupport:
47+
forceIncrementalSupport ||
48+
hasOption(options, '--incremental-support'),
49+
suppressWarnings: hasOption(options, '--suppress-warnings'),
50+
fatalWarnings: hasOption(options, '--fatal-warnings'),
51+
enableExperimentalMirrors:
52+
hasOption(options, '--enable-experimental-mirrors'),
53+
generateCodeWithCompileTimeErrors:
54+
hasOption(options, '--generate-code-with-compile-time-errors'),
55+
testMode: hasOption(options, '--test-mode'),
56+
allowNativeExtensions:
57+
hasOption(options, '--allow-native-extensions'),
58+
enableNullAwareOperators:
59+
hasOption(options, '--enable-null-aware-operators')) {
60+
;
61+
}
62+
}
63+
<<<
64+
class Compiler {
65+
Compiler()
66+
: this.options = options,
67+
this.allowedLibraryCategories = getAllowedLibraryCategories(options),
68+
super(
69+
outputProvider: outputProvider,
70+
enableTypeAssertions: hasOption(options, '--enable-checked-mode'),
71+
enableUserAssertions: hasOption(options, '--enable-checked-mode'),
72+
trustTypeAnnotations: hasOption(options, '--trust-type-annotations'),
73+
trustPrimitives: hasOption(options, '--trust-primitives'),
74+
enableMinification: hasOption(options, '--minify'),
75+
preserveUris: hasOption(options, '--preserve-uris'),
76+
enableNativeLiveTypeAnalysis:
77+
!hasOption(options, '--disable-native-live-type-analysis'),
78+
emitJavaScript:
79+
!(hasOption(options, '--output-type=dart') ||
80+
hasOption(options, '--output-type=dart-multi')),
81+
dart2dartMultiFile: hasOption(options, '--output-type=dart-multi'),
82+
generateSourceMap: !hasOption(options, '--no-source-maps'),
83+
analyzeAllFlag: hasOption(options, '--analyze-all'),
84+
analyzeOnly: hasOption(options, '--analyze-only'),
85+
analyzeMain: hasOption(options, '--analyze-main'),
86+
analyzeSignaturesOnly: hasOption(options, '--analyze-signatures-only'),
87+
strips: extractCsvOption(options, '--force-strip='),
88+
enableConcreteTypeInference: hasOption(
89+
options,
90+
'--enable-concrete-type-inference',
91+
),
92+
disableTypeInferenceFlag: hasOption(
93+
options,
94+
'--disable-type-inference',
95+
),
96+
preserveComments: hasOption(options, '--preserve-comments'),
97+
useCpsIr: hasOption(options, '--use-cps-ir'),
98+
verbose: hasOption(options, '--verbose'),
99+
sourceMapUri: extractUriOption(options, '--source-map='),
100+
outputUri: extractUriOption(options, '--out='),
101+
terseDiagnostics: hasOption(options, '--terse'),
102+
deferredMapUri: extractUriOption(options, '--deferred-map='),
103+
dumpInfo: hasOption(options, '--dump-info'),
104+
buildId: extractStringOption(
105+
options,
106+
'--build-id=',
107+
"build number could not be determined",
108+
),
109+
showPackageWarnings: hasOption(options, '--show-package-warnings'),
110+
useContentSecurityPolicy: hasOption(options, '--csp'),
111+
hasIncrementalSupport:
112+
forceIncrementalSupport ||
113+
hasOption(options, '--incremental-support'),
114+
suppressWarnings: hasOption(options, '--suppress-warnings'),
115+
fatalWarnings: hasOption(options, '--fatal-warnings'),
116+
enableExperimentalMirrors: hasOption(
117+
options,
118+
'--enable-experimental-mirrors',
119+
),
120+
generateCodeWithCompileTimeErrors: hasOption(
121+
options,
122+
'--generate-code-with-compile-time-errors',
123+
),
124+
testMode: hasOption(options, '--test-mode'),
125+
allowNativeExtensions: hasOption(options, '--allow-native-extensions'),
126+
enableNullAwareOperators: hasOption(
127+
options,
128+
'--enable-null-aware-operators',
129+
),
130+
) {
131+
;
132+
}
133+
}

test/tall/regression/0300/0369.stmt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
>>>
2+
return log.progress("Loading asset environment", () async {
3+
var graph = await entrypoint.loadPackageGraph();
4+
graph = _adjustPackageGraph(graph, mode, packages);
5+
var barback = new Barback(new PubPackageProvider(graph));
6+
barback.log.listen(_log);
7+
8+
var environment = new AssetEnvironment._(graph, barback, mode,
9+
watcherType, hostname, basePort, environmentConstants);
10+
11+
await environment._load(entrypoints: entrypoints, useDart2JS: useDart2JS);
12+
return environment;
13+
}, fine: true);
14+
<<<
15+
return log.progress("Loading asset environment", () async {
16+
var graph = await entrypoint.loadPackageGraph();
17+
graph = _adjustPackageGraph(graph, mode, packages);
18+
var barback = new Barback(new PubPackageProvider(graph));
19+
barback.log.listen(_log);
20+
21+
var environment = new AssetEnvironment._(
22+
graph,
23+
barback,
24+
mode,
25+
watcherType,
26+
hostname,
27+
basePort,
28+
environmentConstants,
29+
);
30+
31+
await environment._load(entrypoints: entrypoints, useDart2JS: useDart2JS);
32+
return environment;
33+
}, fine: true);

0 commit comments

Comments
 (0)