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

Side by Side Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1056903002: Enable dart2js hints test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/lib/src/task/dart.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) 2015, the Dart project authors. Please see the AUTHORS file 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 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 test.src.task.dart_test; 5 library test.src.task.dart_test;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 '''); 1130 ''');
1131 LibraryUnitTarget target = new LibraryUnitTarget(source, source); 1131 LibraryUnitTarget target = new LibraryUnitTarget(source, source);
1132 _computeResult(target, HINTS); 1132 _computeResult(target, HINTS);
1133 expect(task, new isInstanceOf<GenerateHintsTask>()); 1133 expect(task, new isInstanceOf<GenerateHintsTask>());
1134 // validate 1134 // validate
1135 _fillErrorListener(HINTS); 1135 _fillErrorListener(HINTS);
1136 errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.MISSING_RETURN]); 1136 errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.MISSING_RETURN]);
1137 } 1137 }
1138 1138
1139 test_perform_dart2js() { 1139 test_perform_dart2js() {
1140 // TODO(scheglov) There is a bug - we need to finish building 1140 Source source = _newSource('/test.dart', '''
1141 // TypeProvider hierarchies before validating "expr is CoreType". 1141 main(p) {
1142 // Source source = _newSource('/test.dart', ''' 1142 if (p is double) {
1143 //main(p) { 1143 print('double');
1144 // if (p is double) { 1144 }
1145 // print('double'); 1145 }
1146 // } 1146 ''');
1147 //} 1147 LibraryUnitTarget target = new LibraryUnitTarget(source, source);
1148 //'''); 1148 _computeResult(target, HINTS);
1149 // LibraryUnitTarget target = new LibraryUnitTarget(source, source); 1149 expect(task, new isInstanceOf<GenerateHintsTask>());
1150 // _computeResult(target, HINTS); 1150 // validate
1151 // expect(task, new isInstanceOf<GenerateHintsTask>()); 1151 _fillErrorListener(HINTS);
1152 // // validate 1152 errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.IS_DOUBLE]);
1153 // _fillErrorListener(HINTS);
1154 // errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.IS_DOUBLE]);
1155 } 1153 }
1156 1154
1157 test_perform_deadCode() { 1155 test_perform_deadCode() {
1158 Source source = _newSource('/test.dart', ''' 1156 Source source = _newSource('/test.dart', '''
1159 main() { 1157 main() {
1160 if (false) { 1158 if (false) {
1161 print('how?'); 1159 print('how?');
1162 } 1160 }
1163 } 1161 }
1164 '''); 1162 ''');
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 return entryMap.putIfAbsent(target, () => new CacheEntry()); 1721 return entryMap.putIfAbsent(target, () => new CacheEntry());
1724 } 1722 }
1725 1723
1726 TimestampedData<String> getContents(Source source) => source.contents; 1724 TimestampedData<String> getContents(Source source) => source.contents;
1727 1725
1728 noSuchMethod(Invocation invocation) { 1726 noSuchMethod(Invocation invocation) {
1729 print('noSuchMethod: ${invocation.memberName}'); 1727 print('noSuchMethod: ${invocation.memberName}');
1730 return super.noSuchMethod(invocation); 1728 return super.noSuchMethod(invocation);
1731 } 1729 }
1732 } 1730 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698