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

Side by Side Diff: tests/compiler/dart2js/unused_empty_map_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 unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/unparser_test.dart ('k') | tests/compiler/dart2js/uri_extras_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Ensure that unused empty HashMap nodes are dropped from the output. 5 // Ensure that unused empty HashMap nodes are dropped from the output.
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'memory_compiler.dart'; 9 import 'memory_compiler.dart';
10 10
11 const TEST_SOURCE = const {"main.dart": r""" 11 const TEST_SOURCE = const {
12 "main.dart": r"""
12 void main() { 13 void main() {
13 var x = {}; 14 var x = {};
14 return; 15 return;
15 } 16 }
16 """}; 17 """
18 };
17 19
18 const HASHMAP_EMPTY_CONSTRUCTOR = r"LinkedHashMap_LinkedHashMap$_empty"; 20 const HASHMAP_EMPTY_CONSTRUCTOR = r"LinkedHashMap_LinkedHashMap$_empty";
19 21
20 main() { 22 main() {
21 asyncTest(() async { 23 asyncTest(() async {
22 var collector = new OutputCollector(); 24 var collector = new OutputCollector();
23 var result = await runCompiler( 25 var result = await runCompiler(
24 memorySourceFiles: TEST_SOURCE, outputProvider: collector); 26 memorySourceFiles: TEST_SOURCE, outputProvider: collector);
25 var compiler = result.compiler; 27 var compiler = result.compiler;
26 String generated = collector.getOutput('', 'js'); 28 String generated = collector.getOutput('', 'js');
27 Expect.isFalse(generated.contains(HASHMAP_EMPTY_CONSTRUCTOR)); 29 Expect.isFalse(generated.contains(HASHMAP_EMPTY_CONSTRUCTOR));
28 }); 30 });
29 } 31 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/unparser_test.dart ('k') | tests/compiler/dart2js/uri_extras_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698