Files
sdk/pkg/dev_compiler/test/codegen/expect/map_keys.js
T
John Messerly 9cf5a077e9 coverage: increase coverage of js_codegen
it was already decent, but this should plug the two biggest holes: source maps and maps with non-string keys

R=vsm@google.com

Review URL: https://codereview.chromium.org/1013223002
2015-03-18 09:20:36 -07:00

16 lines
536 B
JavaScript

var map_keys;
(function(exports) {
'use strict';
// Function main: () → dynamic
function main() {
core.print(dart.map({'1': 2, '3': 4, '5': 6}));
core.print(dart.map([1, 2, 3, 4, 5, 6]));
core.print(dart.map({'1': 2, [`${dart.notNull(new math.Random().nextInt(2)) + 2}`]: 4, '5': 6}));
let x = '3';
core.print(dart.map(['1', 2, x, 4, '5', 6]));
core.print(dart.map(['1', 2, null, 4, '5', 6]));
}
// Exports:
exports.main = main;
})(map_keys || (map_keys = {}));
//# sourceMappingURL=map_keys.js.map