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

Side by Side Diff: tests/language/f_bounded_quantification_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
« no previous file with comments | « tests/language/external_test.dart ('k') | tests/language/factory1_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Test for F-Bounded Quantification. 7 // Test for F-Bounded Quantification.
8 8
9 class FBound<F extends FBound<F>> {} 9 class FBound<F extends FBound<F>> {}
10 10
11 class Bar extends FBound<Bar> {} 11 class Bar extends FBound<Bar> {}
12 12
13 class SubBar extends Bar {} 13 class SubBar extends Bar {}
14 14
15 class Baz<T> extends FBound<Baz<T>> {} 15 class Baz<T> extends FBound<Baz<T>> {}
16 16
17 class SubBaz<T> extends Baz<T> {} 17 class SubBaz<T> extends Baz<T> {}
18 18
19
20 isCheckedMode() { 19 isCheckedMode() {
21 try { 20 try {
22 var i = 1; 21 var i = 1;
23 String s = i; 22 String s = i;
24 return false; 23 return false;
25 } catch (e) { 24 } catch (e) {
26 return true; 25 return true;
27 } 26 }
28 } 27 }
29 28
(...skipping 14 matching lines...) Expand all
44 bool got_type_error = false; 43 bool got_type_error = false;
45 try { 44 try {
46 FBound<SubBaz<Bar>> fsb = new FBound<SubBaz<Bar>>(); // //# 02: static typ e warning 45 FBound<SubBaz<Bar>> fsb = new FBound<SubBaz<Bar>>(); // //# 02: static typ e warning
47 } on TypeError catch (error) { 46 } on TypeError catch (error) {
48 got_type_error = true; 47 got_type_error = true;
49 } 48 }
50 // Type error in checked mode only. 49 // Type error in checked mode only.
51 Expect.isTrue(got_type_error == isCheckedMode()); // //# 02: continued 50 Expect.isTrue(got_type_error == isCheckedMode()); // //# 02: continued
52 } 51 }
53 } 52 }
OLDNEW
« no previous file with comments | « tests/language/external_test.dart ('k') | tests/language/factory1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698