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

Side by Side Diff: tests/compiler/dart2js_extra/deferred/deferred_function_test.dart

Issue 23701010: Switch to async_helper package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase and adapt 3 new tests. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Test that loading of a library (with top-level functions only) can 5 // Test that loading of a library (with top-level functions only) can
6 // be deferred. 6 // be deferred.
7 7
8 import '../../../async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9
10 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
11 10
12 import 'dart:async'; 11 import 'dart:async';
13 12
14 @lazy import 'deferred_function_library.dart'; 13 @lazy import 'deferred_function_library.dart';
15 14
16 const lazy = const DeferredLibrary('deferred_function_library'); 15 const lazy = const DeferredLibrary('deferred_function_library');
17 16
18 isNoSuchMethodError(e) => e is NoSuchMethodError; 17 isNoSuchMethodError(e) => e is NoSuchMethodError;
19 18
(...skipping 24 matching lines...) Expand all
44 Expect.equals(2, ++counter); 43 Expect.equals(2, ++counter);
45 print('lazy was loaded'); 44 print('lazy was loaded');
46 Expect.equals(42, foo('b')); 45 Expect.equals(42, foo('b'));
47 Expect.isNotNull(readFoo()); 46 Expect.isNotNull(readFoo());
48 asyncEnd(); 47 asyncEnd();
49 }); 48 });
50 Expect.equals(0, counter); 49 Expect.equals(0, counter);
51 Expect.throws(() { foo('a'); }, isNoSuchMethodError); 50 Expect.throws(() { foo('a'); }, isNoSuchMethodError);
52 Expect.isNull(readFoo()); 51 Expect.isNull(readFoo());
53 } 52 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/deferred/deferred_constant_test.dart ('k') | tests/isolate/global_error_handler2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698