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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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
« no previous file with comments | « tests/language/closure_test.dart ('k') | tests/language/closure_type_variables_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Dart test for a closure result type test that cannot be eliminated at compile 4 // Dart test for a closure result type test that cannot be eliminated at compile
5 // time. 5 // time.
6 6
7 library closure_type_test; 7 library closure_type_test;
8 import "package:expect/expect.dart";
8 import 'dart:math' as math; 9 import 'dart:math' as math;
9 10
10 class Math { 11 class Math {
11 static int sqrt(x) => math.sqrt(x); 12 static int sqrt(x) => math.sqrt(x);
12 } 13 }
13 14
14 isCheckedMode() { 15 isCheckedMode() {
15 try { 16 try {
16 var i = 1; 17 var i = 1;
17 String s = i; 18 String s = i;
(...skipping 18 matching lines...) Expand all
36 } on TypeError catch (error) { 37 } on TypeError catch (error) {
37 got_type_error = true; 38 got_type_error = true;
38 } 39 }
39 // Type error expected in checked mode only. 40 // Type error expected in checked mode only.
40 Expect.isTrue(got_type_error == isCheckedMode()); 41 Expect.isTrue(got_type_error == isCheckedMode());
41 } 42 }
42 43
43 root(x) => Math.sqrt(x); 44 root(x) => Math.sqrt(x);
44 45
45 main() => test(root, 4); 46 main() => test(root, 4);
OLDNEW
« no previous file with comments | « tests/language/closure_test.dart ('k') | tests/language/closure_type_variables_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698