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

Side by Side Diff: tests/language/is_object_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/is_nan_test.dart ('k') | tests/language/is_operator_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 // Dart test program for the "is" type test operator. 4 // Dart test program for the "is" type test operator.
5 5
6 import "package:expect/expect.dart";
7
6 testTryCatch(x) { 8 testTryCatch(x) {
7 try { 9 try {
8 throw x; 10 throw x;
9 Expect.fail("Exception '$x' should've been thrown"); 11 Expect.fail("Exception '$x' should've been thrown");
10 } on Object catch (obj) { 12 } on Object catch (obj) {
11 Expect.equals(obj, x); 13 Expect.equals(obj, x);
12 } 14 }
13 } 15 }
14 16
15 main() { 17 main() {
(...skipping 20 matching lines...) Expand all
36 Expect.isTrue(testEval(false) is Object); 38 Expect.isTrue(testEval(false) is Object);
37 Expect.equals(3, evalCount); 39 Expect.equals(3, evalCount);
38 Expect.isTrue(testEval(null) is Object); 40 Expect.isTrue(testEval(null) is Object);
39 Expect.equals(4, evalCount); 41 Expect.equals(4, evalCount);
40 42
41 // Verify that these objects are catchable 43 // Verify that these objects are catchable
42 testTryCatch(444); 44 testTryCatch(444);
43 testTryCatch('abc'); 45 testTryCatch('abc');
44 testTryCatch(true); 46 testTryCatch(true);
45 } 47 }
OLDNEW
« no previous file with comments | « tests/language/is_nan_test.dart ('k') | tests/language/is_operator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698