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

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

Issue 2774783002: Re-land "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 const A(); 8 const A();
9 const factory A.B() = B; 9 const factory A.B() = B;
10 const factory A.C() = C; 10 const factory A.C() = C;
(...skipping 16 matching lines...) Expand all
27 int get x => 0; 27 int get x => 0;
28 const factory D() = C.fromD; 28 const factory D() = C.fromD;
29 } 29 }
30 30
31 main() { 31 main() {
32 switch (new B()) { 32 switch (new B()) {
33 case const A.B(): Expect.fail("bad switch"); break; // //# 00: continued 33 case const A.B(): Expect.fail("bad switch"); break; // //# 00: continued
34 } 34 }
35 35
36 switch (new C()) { 36 switch (new C()) {
37 case const C(): Expect.fail("bad switch"); break; 37 case const C():
38 case const A.C(): Expect.fail("bad switch"); break; 38 Expect.fail("bad switch");
39 case const A.C2(): Expect.fail("bad switch"); break; 39 break;
40 case const A.C():
41 Expect.fail("bad switch");
42 break;
43 case const A.C2():
44 Expect.fail("bad switch");
45 break;
40 case const A(): Expect.fail("bad switch"); break; // //# 01: compile-time er ror 46 case const A(): Expect.fail("bad switch"); break; // //# 01: compile-time er ror
41 } 47 }
42 48
43 switch (new A()) { 49 switch (new A()) {
44 case const A(): Expect.fail("bad switch"); break; 50 case const A():
51 Expect.fail("bad switch");
52 break;
45 case const A.B(): Expect.fail("bad switch"); break; // //# 02: compile-time error 53 case const A.B(): Expect.fail("bad switch"); break; // //# 02: compile-time error
46 } 54 }
47 } 55 }
OLDNEW
« no previous file with comments | « tests/language_strong/super_operator_index_test.dart ('k') | tests/language_strong/symbol_literal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698