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

Side by Side Diff: tests/language/f_bounded_quantification_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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";
6
5 // Test for F-Bounded Quantification. 7 // Test for F-Bounded Quantification.
6 8
7 class FBound<F extends FBound<F>> {} 9 class FBound<F extends FBound<F>> {}
8 10
9 class Bar extends FBound<Bar> {} 11 class Bar extends FBound<Bar> {}
10 12
11 class SubBar extends Bar {} 13 class SubBar extends Bar {}
12 14
13 class Baz<T> extends FBound<Baz<T>> {} 15 class Baz<T> extends FBound<Baz<T>> {}
14 16
(...skipping 27 matching lines...) Expand all
42 bool got_type_error = false; 44 bool got_type_error = false;
43 try { 45 try {
44 FBound<SubBaz<Bar>> fsb = new FBound<SubBaz<Bar>>(); /// 02: static type warning 46 FBound<SubBaz<Bar>> fsb = new FBound<SubBaz<Bar>>(); /// 02: static type warning
45 } on TypeError catch (error) { 47 } on TypeError catch (error) {
46 got_type_error = true; 48 got_type_error = true;
47 } 49 }
48 // Type error in checked mode only. 50 // Type error in checked mode only.
49 Expect.isTrue(got_type_error == isCheckedMode()); /// 02: continued 51 Expect.isTrue(got_type_error == isCheckedMode()); /// 02: continued
50 } 52 }
51 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698