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

Unified Diff: tests/language/src/AssertTest.dart

Issue 8294005: Rename class AssertError to AssertionError in the VM (fix issue 119). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/language.status ('k') | tests/standalone/src/AssertTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/AssertTest.dart
===================================================================
--- tests/language/src/AssertTest.dart (revision 457)
+++ tests/language/src/AssertTest.dart (working copy)
@@ -1,54 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--enable_asserts
-//
-// Dart test program testing assert statements.
-
-class AssertTest {
- static test() {
- int i = 0;
- try {
- assert(false);
- } catch (AssertError error) {
- i = 1;
- Expect.equals("false", error.failedAssertion);
- int pos = error.url.lastIndexOf("/", error.url.length);
- if (pos == -1) {
- pos = error.url.lastIndexOf("\\", error.url.length);
- }
- String subs = error.url.substring(pos + 1, error.url.length);
- Expect.equals("AssertTest.dart", subs);
- Expect.equals(12, error.line);
- Expect.equals(14, error.column);
- }
- return i;
- }
- static testClosure() {
- int i = 0;
- try {
- assert(() => false);
- } catch (AssertError error) {
- i = 1;
- Expect.equals("() => false", error.failedAssertion);
- int pos = error.url.lastIndexOf("/", error.url.length);
- if (pos == -1) {
- pos = error.url.lastIndexOf("\\", error.url.length);
- }
- String subs = error.url.substring(pos + 1, error.url.length);
- Expect.equals("AssertTest.dart", subs);
- Expect.equals(30, error.line);
- Expect.equals(14, error.column);
- }
- return i;
- }
-
- static testMain() {
- Expect.equals(1, test());
- Expect.equals(1, testClosure());
- }
-}
-
-main() {
- AssertTest.testMain();
-}
« no previous file with comments | « tests/language/language.status ('k') | tests/standalone/src/AssertTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698