OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 import "package:expect/expect.dart"; |
| 6 |
| 7 var cyclicStatic = cyclicStatic + 1; |
| 8 |
| 9 cyclicInitialization() { |
| 10 return cyclicStatic; |
| 11 } |
| 12 |
| 13 main() { |
| 14 bool hasThrown = false; |
| 15 try { |
| 16 cyclicStatic + 1; |
| 17 } catch(e) { |
| 18 hasThrown = true; |
| 19 Expect.isTrue(e.stackTrace is StackTrace, |
| 20 "$e doesn't have a non-null stack trace"); |
| 21 } |
| 22 Expect.isTrue(hasThrown); |
| 23 } |
OLD | NEW |