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

Side by Side Diff: tests/language_strong/const_map3_test.dart

Issue 2768073002: Format all multitests (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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 class A { 7 class A {
8 static const b = const B(); 8 static const b = const B();
9 } 9 }
10 10
11 class B implements A { 11 class B implements A {
12 const B(); 12 const B();
13 13
14 operator ==(o) => true; // //# 00: compile-time error 14 operator ==(o) => true; // //# 00: compile-time error
15 } 15 }
16 16
17 main() { 17 main() {
18 // It is a compile-time error if the key type overrides operator ==. 18 // It is a compile-time error if the key type overrides operator ==.
19 var m = const { A.b: 42 }; 19 var m = const {A.b: 42};
20 Expect.equals(42, m[const B()]); 20 Expect.equals(42, m[const B()]);
21 21
22 m = const { "foo": 99, A.b: 499 }; 22 m = const {"foo": 99, A.b: 499};
23 Expect.equals(499, m[const B()]); 23 Expect.equals(499, m[const B()]);
24 } 24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698