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

Side by Side Diff: tests/compiler/dart2js/mirrors_test.dart

Issue 23512008: Call asyncEnd only on success. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. 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
« no previous file with comments | « tests/compiler/dart2js/class_codegen2_test.dart ('k') | tests/utils/dummy_compiler_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart' ; 7 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart' ;
8 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util. dart'; 8 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util. dart';
9 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro r.dart'; 9 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro r.dart';
10 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart' 10 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 Uri inputUri = scriptUri.resolve('mirrors_helper.dart'); 48 Uri inputUri = scriptUri.resolve('mirrors_helper.dart');
49 var provider = new SourceFileProvider(); 49 var provider = new SourceFileProvider();
50 var diagnosticHandler = 50 var diagnosticHandler =
51 new FormattingDiagnosticHandler(provider).diagnosticHandler; 51 new FormattingDiagnosticHandler(provider).diagnosticHandler;
52 asyncStart(); 52 asyncStart();
53 var result = analyze([inputUri], libUri, null, 53 var result = analyze([inputUri], libUri, null,
54 provider.readStringFromUri, diagnosticHandler, 54 provider.readStringFromUri, diagnosticHandler,
55 <String>['--preserve-comments']); 55 <String>['--preserve-comments']);
56 result.then((MirrorSystem mirrors) { 56 result.then((MirrorSystem mirrors) {
57 test(mirrors); 57 test(mirrors);
58 }).whenComplete(() => asyncEnd()); 58 }).then(asyncSuccess);
59 } 59 }
60 60
61 void test(MirrorSystem mirrors) { 61 void test(MirrorSystem mirrors) {
62 Expect.isNotNull(mirrors, "No mirror system returned from compilation"); 62 Expect.isNotNull(mirrors, "No mirror system returned from compilation");
63 63
64 var libraries = mirrors.libraries; 64 var libraries = mirrors.libraries;
65 Expect.isNotNull(libraries, "No libraries map returned"); 65 Expect.isNotNull(libraries, "No libraries map returned");
66 Expect.isFalse(libraries.isEmpty, "Empty libraries map returned"); 66 Expect.isFalse(libraries.isEmpty, "Empty libraries map returned");
67 67
68 var helperLibrary = findMirror(libraries.values, "mirrors_helper"); 68 var helperLibrary = findMirror(libraries.values, "mirrors_helper");
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 Expect.isTrue(privateFactoryConstructor.isPrivate); 1026 Expect.isTrue(privateFactoryConstructor.isPrivate);
1027 Expect.isFalse(privateFactoryConstructor.isConstConstructor); 1027 Expect.isFalse(privateFactoryConstructor.isConstConstructor);
1028 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); 1028 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor);
1029 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); 1029 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor);
1030 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); 1030 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor);
1031 1031
1032 var metadata = privateClass.metadata; 1032 var metadata = privateClass.metadata;
1033 Expect.isNotNull(metadata); 1033 Expect.isNotNull(metadata);
1034 Expect.equals(0, metadata.length); 1034 Expect.equals(0, metadata.length);
1035 } 1035 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/class_codegen2_test.dart ('k') | tests/utils/dummy_compiler_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698