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

Unified Diff: tests/language/type_cast_vm_test.dart

Issue 10977078: Rename CastException to CastError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Now without the TODO. Created 8 years, 3 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/co19/co19-runtime.status ('k') | tests/language/type_error_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/type_cast_vm_test.dart
diff --git a/tests/language/type_cast_vm_test.dart b/tests/language/type_cast_vm_test.dart
index a54da72789307b93aa745721614cd2b9df704f3d..d95742aaa8100699738351bcd9251785b69c43b5 100644
--- a/tests/language/type_cast_vm_test.dart
+++ b/tests/language/type_cast_vm_test.dart
@@ -12,10 +12,10 @@ class TypeTest {
static test() {
int result = 0;
try {
- var i = "hello" as int; // Throws a CastException
+ var i = "hello" as int; // Throws a CastError
} on TypeError catch (error) {
result = 1;
- Expect.isTrue(error is CastException);
+ Expect.isTrue(error is CastError);
Expect.equals("int", error.dstType);
Expect.equals("String", error.srcType);
Expect.equals("type cast", error.dstName);
@@ -54,10 +54,10 @@ class TypeTest {
return i;
}
try {
- int i = f("hello" as int); // Throws a CastException
+ int i = f("hello" as int); // Throws a CastError
} on TypeError catch (error) {
result = 1;
- Expect.isTrue(error is CastException);
+ Expect.isTrue(error is CastError);
Expect.equals("int", error.dstType);
Expect.equals("String", error.srcType);
Expect.equals("type cast", error.dstName);
@@ -76,13 +76,13 @@ class TypeTest {
static testReturn() {
int result = 0;
int f(String s) {
- return s as int; // Throws a CastException
+ return s as int; // Throws a CastError
}
try {
int i = f("hello");
} on TypeError catch (error) {
result = 1;
- Expect.isTrue(error is CastException);
+ Expect.isTrue(error is CastError);
Expect.equals("int", error.dstType);
Expect.equals("String", error.srcType);
Expect.equals("type cast", error.dstName);
@@ -103,7 +103,7 @@ class TypeTest {
int result = 0;
Expect.equals(5, (field as String).length);
try {
- field as int; // Throws a CastException
+ field as int; // Throws a CastError
} on TypeError catch (error) {
result = 1;
Expect.equals("int", error.dstType);
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/language/type_error_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698