Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(685)

Unified Diff: tests/compiler/dart2js/combinator_hint_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/codegen_helper.dart ('k') | tests/compiler/dart2js/command_line_split_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/combinator_hint_test.dart
diff --git a/tests/compiler/dart2js/combinator_hint_test.dart b/tests/compiler/dart2js/combinator_hint_test.dart
index f8b9c26fa05a877957ece7d21562e40a354fba78..0518285c2be84a1f0b51576fa4c58c4345f7841a 100644
--- a/tests/compiler/dart2js/combinator_hint_test.dart
+++ b/tests/compiler/dart2js/combinator_hint_test.dart
@@ -17,38 +17,33 @@ import 'lib.dart' show Foo;
main() {}
""",
-
'hide_local.dart': """
import 'lib.dart' hide Foo;
main() {}
""",
-
'show_package.dart': """
import 'package:pkg/pkg.dart' show Foo;
main() {}
""",
-
'hide_package.dart': """
import 'package:pkg/pkg.dart' hide Foo;
main() {}
""",
-
'lib.dart': '',
-
'pkg/pkg/pkg.dart': '',
};
Future<Compiler> test(Uri entryPoint,
- {bool showPackageWarnings: false,
- bool suppressHints: false,
- int hints: 0,
- Compiler cachedCompiler}) async {
+ {bool showPackageWarnings: false,
+ bool suppressHints: false,
+ int hints: 0,
+ Compiler cachedCompiler}) async {
print('==================================================================');
print('test: $entryPoint showPackageWarnings=$showPackageWarnings '
- 'suppressHints=$suppressHints');
+ 'suppressHints=$suppressHints');
var options = [Flags.analyzeOnly];
if (showPackageWarnings) {
options.add(Flags.showPackageWarnings);
@@ -64,41 +59,36 @@ Future<Compiler> test(Uri entryPoint,
packageRoot: Uri.parse('memory:pkg/'),
diagnosticHandler: collector,
cachedCompiler: cachedCompiler);
- Expect.equals(0, collector.errors.length,
- 'Unexpected errors: ${collector.errors}');
+ Expect.equals(
+ 0, collector.errors.length, 'Unexpected errors: ${collector.errors}');
Expect.equals(0, collector.warnings.length,
- 'Unexpected warnings: ${collector.warnings}');
- Expect.equals(hints, collector.hints.length,
- 'Unexpected hints: ${collector.hints}');
- Expect.equals(0, collector.infos.length,
- 'Unexpected infos: ${collector.infos}');
+ 'Unexpected warnings: ${collector.warnings}');
+ Expect.equals(
+ hints, collector.hints.length, 'Unexpected hints: ${collector.hints}');
+ Expect.equals(
+ 0, collector.infos.length, 'Unexpected infos: ${collector.infos}');
print('==================================================================');
return result.compiler;
}
Future<Compiler> testUri(Uri entrypoint,
- {bool suppressed: false,
- Compiler cachedCompiler}) async {
- cachedCompiler = await test(
- entrypoint,
+ {bool suppressed: false, Compiler cachedCompiler}) async {
+ cachedCompiler = await test(entrypoint,
showPackageWarnings: true,
suppressHints: false,
hints: 1,
cachedCompiler: cachedCompiler);
- cachedCompiler = await test(
- entrypoint,
+ cachedCompiler = await test(entrypoint,
showPackageWarnings: false,
suppressHints: false,
hints: suppressed ? 0 : 1,
cachedCompiler: cachedCompiler);
- cachedCompiler = await test(
- entrypoint,
+ cachedCompiler = await test(entrypoint,
showPackageWarnings: true,
suppressHints: true,
hints: 0,
cachedCompiler: cachedCompiler);
- cachedCompiler = await test(
- entrypoint,
+ cachedCompiler = await test(entrypoint,
showPackageWarnings: false,
suppressHints: true,
hints: 0,
@@ -108,18 +98,13 @@ Future<Compiler> testUri(Uri entrypoint,
void main() {
asyncTest(() async {
- Compiler cachedCompiler = await testUri(
- Uri.parse('memory:show_local.dart'));
- cachedCompiler = await testUri(
- Uri.parse('memory:hide_local.dart'),
- cachedCompiler: cachedCompiler);
- cachedCompiler = await testUri(
- Uri.parse('memory:show_package.dart'),
+ Compiler cachedCompiler =
+ await testUri(Uri.parse('memory:show_local.dart'));
+ cachedCompiler = await testUri(Uri.parse('memory:hide_local.dart'),
cachedCompiler: cachedCompiler);
- cachedCompiler = await testUri(
- Uri.parse('memory:hide_package.dart'),
- suppressed: true,
+ cachedCompiler = await testUri(Uri.parse('memory:show_package.dart'),
cachedCompiler: cachedCompiler);
+ cachedCompiler = await testUri(Uri.parse('memory:hide_package.dart'),
+ suppressed: true, cachedCompiler: cachedCompiler);
});
}
-
« no previous file with comments | « tests/compiler/dart2js/codegen_helper.dart ('k') | tests/compiler/dart2js/command_line_split_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698