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

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

Issue 1013223002: coverage: increase coverage of js_codegen (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
(Empty)
1 import 'dart:math' show Random;
2 main() {
3 // Uses a JS object literal
4 print({ '1': 2, '3': 4, '5': 6 });
5 // Uses array literal
6 print({ 1: 2, 3: 4, 5: 6 });
7 // Uses ES6 enhanced object literal
8 print({ '1': 2, '${new Random().nextInt(2) + 2}': 4, '5': 6 });
9 String x = '3';
10 // Could use enhanced object literal if we knew `x` was not null
11 print({ '1': 2, x: 4, '5': 6 });
12 // Array literal
13 print({ '1': 2, null: 4, '5': 6 });
14 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698