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

Unified Diff: tests/kernel/unsorted/mapliteral_test.dart

Issue 2434123003: Merge more Kernel infrastructure from kernel_sdk SDK fork. (Closed)
Patch Set: Created 4 years, 2 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
Index: tests/kernel/unsorted/mapliteral_test.dart
diff --git a/tests/kernel/unsorted/mapliteral_test.dart b/tests/kernel/unsorted/mapliteral_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..b4224e5906de5639641c6ffcdd376d368c5f2d70
--- /dev/null
+++ b/tests/kernel/unsorted/mapliteral_test.dart
@@ -0,0 +1,23 @@
+import 'expect.dart';
Kevin Millikin (Google) 2016/10/21 09:10:57 Copyright header.
Vyacheslav Egorov (Google) 2016/10/21 13:39:43 Done.
+
+main() {
+ var map = {
+ 'k1': 'v1',
+ 'k2': 'v2',
+ 1: 2,
+ 1.5 : 1.2,
+ 3: 3.14,
+ };
+
+ Expect.isTrue(map.length == 5);
+
+ map['foo'] = 'bar';
+
+ Expect.isTrue(map['k1'] == 'v1');
+ Expect.isTrue(map['k2'] == 'v2');
+ Expect.isTrue(map[1] == 2);
+ Expect.isTrue(map[1.5] == 1.2);
+ Expect.isTrue(map[3] == 3.14);
+ Expect.isTrue(map['foo'] == 'bar');
+ Expect.isTrue(map.length == 6);
+}

Powered by Google App Engine
This is Rietveld 408576698