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

Side by Side Diff: pkg/dev_compiler/test/codegen/map_keys.dart

Issue 2752163002: Format all dart dev compiler files (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // compile options: --source-map 1 // compile options: --source-map
2 // TODO(jmesserly): more comprehensive strategy for testing the source map. 2 // TODO(jmesserly): more comprehensive strategy for testing the source map.
3 // (this is used so we're covering it in at least one test) 3 // (this is used so we're covering it in at least one test)
4 4
5 import 'dart:math' show Random; 5 import 'dart:math' show Random;
6
6 main() { 7 main() {
7 // Uses a JS object literal 8 // Uses a JS object literal
8 print({ '1': 2, '3': 4, '5': 6 }); 9 print({'1': 2, '3': 4, '5': 6});
9 // Uses array literal 10 // Uses array literal
10 print({ 1: 2, 3: 4, 5: 6 }); 11 print({1: 2, 3: 4, 5: 6});
11 // Uses ES6 enhanced object literal 12 // Uses ES6 enhanced object literal
12 print({ '1': 2, '${new Random().nextInt(2) + 2}': 4, '5': 6 }); 13 print({'1': 2, '${new Random().nextInt(2) + 2}': 4, '5': 6});
13 String x = '3'; 14 String x = '3';
14 // Could use enhanced object literal if we knew `x` was not null 15 // Could use enhanced object literal if we knew `x` was not null
15 print({ '1': 2, x: 4, '5': 6 }); 16 print({'1': 2, x: 4, '5': 6});
16 // Array literal 17 // Array literal
17 print({ '1': 2, null: 4, '5': 6 }); 18 print({'1': 2, null: 4, '5': 6});
18 } 19 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/codegen/js_test.dart ('k') | pkg/dev_compiler/test/codegen/node_modules.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698