OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015, 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 'regress_22443_lib.dart' deferred as D; |
| 6 import 'package:expect/expect.dart'; |
| 7 |
| 8 int fooCount = 0; |
| 9 |
| 10 foo() { |
| 11 fooCount++; |
| 12 return new D.LazyClass(); |
| 13 } |
| 14 |
| 15 main() { |
| 16 var caughtIt = false; |
| 17 try { foo(); } catch (e) { caughtIt = true; }; |
| 18 D.loadLibrary().then((_) { |
| 19 foo(); |
| 20 Expect.isTrue(caughtIt); |
| 21 Expect.equals(2, fooCount); |
| 22 }); |
| 23 } |
OLD | NEW |