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

Side by Side Diff: pkg/dev_compiler/test/codegen/language/map_literal5_test.dart

Issue 2354383003: Runtime fixes on DDC tests (Closed)
Patch Set: 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 | « no previous file | pkg/dev_compiler/test/codegen/language/string_optimizations_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Test the use of general expression as keys in map literals. 5 // Test the use of general expression as keys in map literals.
6 6
7 library map_literal5_test; 7 library map_literal5_test;
8 8
9 import "package:expect/expect.dart"; 9 import "package:expect/expect.dart";
10 10
(...skipping 14 matching lines...) Expand all
25 Expect.equals(0, m[true]); 25 Expect.equals(0, m[true]);
26 Expect.equals(3, m[2]); 26 Expect.equals(3, m[2]);
27 Expect.equals(2, m[1]); 27 Expect.equals(2, m[1]);
28 } else { 28 } else {
29 Expect.equals(0, m[false]); 29 Expect.equals(0, m[false]);
30 Expect.equals("baz", m["bar"]); 30 Expect.equals("baz", m["bar"]);
31 Expect.equals(2, m["foo"]); 31 Expect.equals(2, m["foo"]);
32 } 32 }
33 } 33 }
34 34
35 create(bool b) { 35 Map create(bool b) {
36 return { 36 return {
37 b: 0, 37 b: 0,
38 m(b): n(b), 38 m(b): n(b),
39 b ? 1 : "foo": 2, 39 b ? 1 : "foo": 2,
40 }; 40 };
41 } 41 }
42 42
43 m(bool b) => b ? 2 : "bar"; 43 Object m(bool b) => b ? 2 : "bar";
44 n(bool b) => b ? 3 : "baz"; 44 Object n(bool b) => b ? 3 : "baz";
OLDNEW
« no previous file with comments | « no previous file | pkg/dev_compiler/test/codegen/language/string_optimizations_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698