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

Side by Side Diff: tests/standalone/assert_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/lib/math/random_test.dart ('k') | tests/standalone/constant_left_shift_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 // VMOptions=--enable_asserts 4 // VMOptions=--enable_asserts
5 //
6 // Dart test program testing assert statements. 5 // Dart test program testing assert statements.
6 import "package:expect/expect.dart";
7 7
8 class AssertTest { 8 class AssertTest {
9 static test() { 9 static test() {
10 try { 10 try {
11 assert(false); 11 assert(false);
12 Expect.fail("Assertion 'false' didn't fail."); 12 Expect.fail("Assertion 'false' didn't fail.");
13 } on AssertionError catch (error) { 13 } on AssertionError catch (error) {
14 Expect.equals("false", error.failedAssertion); 14 Expect.equals("false", error.failedAssertion);
15 int pos = error.url.lastIndexOf("/", error.url.length); 15 int pos = error.url.lastIndexOf("/", error.url.length);
16 if (pos == -1) { 16 if (pos == -1) {
(...skipping 24 matching lines...) Expand all
41 41
42 static testMain() { 42 static testMain() {
43 test(); 43 test();
44 testClosure(); 44 testClosure();
45 } 45 }
46 } 46 }
47 47
48 main() { 48 main() {
49 AssertTest.testMain(); 49 AssertTest.testMain();
50 } 50 }
OLDNEW
« no previous file with comments | « tests/lib/math/random_test.dart ('k') | tests/standalone/constant_left_shift_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698