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

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

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/src/TryCatchSyntaxTest.dart ('k') | tests/language/src/TypeChecksInFactoryMethodTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/TryCatchTest.dart
diff --git a/tests/language/src/TryCatchTest.dart b/tests/language/src/TryCatchTest.dart
deleted file mode 100644
index 2c6f9ed230baeb55cf3a49893bd8d3002836dfdc..0000000000000000000000000000000000000000
--- a/tests/language/src/TryCatchTest.dart
+++ /dev/null
@@ -1,146 +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.
-
-class MyException {
- MyException() {}
-}
-
-class MyException1 extends MyException {
- MyException1() : super() {}
-}
-
-class MyException2 extends MyException {
- MyException2() : super() {}
-}
-
-class TryCatchTest {
- static void test1() {
- var foo = 0;
- try {
- throw new MyException1();
- } catch (MyException2 e) {
- foo = 1;
- } catch (MyException1 e) {
- foo = 2;
- } catch (MyException e) {
- foo = 3;
- }
- Expect.equals(2, foo);
- }
-
- static void test2() {
- var foo = 0;
- try {
- throw new MyException1();
- } catch (MyException2 e) {
- foo = 1;
- } catch (MyException e) {
- foo = 2;
- } catch (MyException1 e) {
- foo = 3;
- }
- Expect.equals(2, foo);
- }
-
- static void test3() {
- var foo = 0;
- try {
- throw new MyException();
- } catch (MyException2 e) {
- foo = 1;
- } catch (MyException1 e) {
- foo = 2;
- } catch (MyException e) {
- foo = 3;
- }
- Expect.equals(3, foo);
- }
-
- static void test4() {
- var foo = 0;
- try {
- try {
- throw new MyException();
- } catch (MyException2 e) {
- foo = 1;
- } catch (MyException1 e) {
- foo = 2;
- }
- } catch (MyException e) {
- Expect.equals(0, foo);
- foo = 3;
- }
- Expect.equals(3, foo);
- }
-
- static void test5() {
- var foo = 0;
- try {
- throw new MyException1();
- } catch (MyException2 e) {
- foo = 1;
- } catch (var e) {
- foo = 2;
- }
- Expect.equals(2, foo);
- }
-
- static void test6() {
- var foo = 0;
- try {
- throw new MyException();
- } catch (MyException2 e) {
- foo = 1;
- } catch (MyException1 e) {
- foo = 2;
- } catch (var e) {
- foo = 3;
- }
- Expect.equals(3, foo);
- }
-
- static void test7() {
- var foo = 0;
- try {
- try {
- throw new MyException();
- } catch (MyException2 e) {
- foo = 1;
- } catch (MyException1 e) {
- foo = 2;
- }
- } catch (var e) {
- Expect.equals(0, foo);
- foo = 3;
- }
- Expect.equals(3, foo);
- }
-
- static void test8() {
- var e = 3;
- var caught = false;
- try {
- throw new MyException();
- } catch (var exc) {
- caught = true;
- }
- Expect.equals(true, caught);
- Expect.equals(3, e);
- }
-
- static void testMain() {
- test1();
- test2();
- test3();
- test4();
- test5();
- test6();
- test7();
- test8();
- }
-}
-
-main() {
- TryCatchTest.testMain();
-}
« no previous file with comments | « tests/language/src/TryCatchSyntaxTest.dart ('k') | tests/language/src/TypeChecksInFactoryMethodTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698