Chromium Code Reviews| Index: tests/language/src/TryCatch8NegativeTest.dart |
| diff --git a/tests/language/src/TryCatch8NegativeTest.dart b/tests/language/src/TryCatch8NegativeTest.dart |
| deleted file mode 100644 |
| index f71d74af6a3271cfaf391a505ef0134f5580953e..0000000000000000000000000000000000000000 |
| --- a/tests/language/src/TryCatch8NegativeTest.dart |
| +++ /dev/null |
| @@ -1,35 +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. |
| -// Dart test program for testing try/catch statement without any exceptions |
| -// being thrown. |
| -// Negative test should fail compilation, illegal throw specifier. |
| - |
| -class Helper { |
| - static int f1(int i) { |
| - var a; |
| - try { |
| - int j; |
| - j = 10; |
| - } catch (var e) { |
| - i = 200; |
| - a = function f() { |
| - int i = 0; |
| - i = i + 20; |
| - throw; // An exception object is needed here. |
|
zundel
2012/01/09 21:39:38
This should be legal according to spec section 11.
|
| - }; |
| - } |
| - a(); |
|
zundel
2012/01/09 21:39:38
nothing actually throws in the try block, so this
|
| - return i; |
| - } |
| -} |
| - |
| -class TryCatch8NegativeTest { |
| - static testMain() { |
| - Expect.equals(1, Helper.f1(1)); |
| - } |
| -} |
| - |
| -main() { |
| - TryCatch8NegativeTest.testMain(); |
| -} |