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

Side by Side Diff: pkg/analyzer/test/reflective_tests.dart

Issue 1026093002: Fix hints in the analyzer package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « pkg/analyzer/test/generated/utilities_test.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library reflective_tests; 5 library reflective_tests;
6 6
7 @MirrorsUsed(metaTargets: 'ReflectiveTest') 7 @MirrorsUsed(metaTargets: 'ReflectiveTest')
8 import 'dart:mirrors'; 8 import 'dart:mirrors';
9 import 'dart:async'; 9 import 'dart:async';
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 }); 68 });
69 } 69 }
70 }); 70 });
71 }); 71 });
72 } 72 }
73 73
74 Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { 74 Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) {
75 var invocationResult = null; 75 var invocationResult = null;
76 try { 76 try {
77 invocationResult = instanceMirror.invoke(symbol, []).reflectee; 77 invocationResult = instanceMirror.invoke(symbol, []).reflectee;
78 } on NoSuchMethodError catch (e) {} 78 } on NoSuchMethodError {}
79 if (invocationResult is Future) { 79 if (invocationResult is Future) {
80 return invocationResult; 80 return invocationResult;
81 } else { 81 } else {
82 return new Future.value(invocationResult); 82 return new Future.value(invocationResult);
83 } 83 }
84 } 84 }
85 85
86 /** 86 /**
87 * Run a test that is expected to fail, and confirm that it fails. 87 * Run a test that is expected to fail, and confirm that it fails.
88 * 88 *
(...skipping 23 matching lines...) Expand all
112 */ 112 */
113 class ReflectiveTest { 113 class ReflectiveTest {
114 const ReflectiveTest(); 114 const ReflectiveTest();
115 } 115 }
116 116
117 /** 117 /**
118 * A marker annotation used to instruct dart2js to keep reflection information 118 * A marker annotation used to instruct dart2js to keep reflection information
119 * for the annotated classes. 119 * for the annotated classes.
120 */ 120 */
121 const ReflectiveTest reflectiveTest = const ReflectiveTest(); 121 const ReflectiveTest reflectiveTest = const ReflectiveTest();
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/utilities_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698