OLD | NEW |
---|---|
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
10 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1328 class A { | 1328 class A { |
1329 int foo( bar<T extends B>() ) {} | 1329 int foo( bar<T extends B>() ) {} |
1330 } | 1330 } |
1331 class B {} | 1331 class B {} |
1332 '''); | 1332 '''); |
1333 | 1333 |
1334 AnalysisResult result = await driver.getResult(testFile); | 1334 AnalysisResult result = await driver.getResult(testFile); |
1335 expect(result.path, testFile); | 1335 expect(result.path, testFile); |
1336 } | 1336 } |
1337 | 1337 |
1338 // solo_test_getResult_XXX() async { | |
Paul Berry
2017/06/29 21:34:34
Remove this
scheglov
2017/06/29 21:39:54
Done.
| |
1339 // addTestFile(r''' | |
1340 //var tests = [ | |
1341 // () { | |
1342 // var a = <int>[]; | |
1343 // var b = a.singleWhere((v) => v != 0); | |
1344 // }, | |
1345 //]; | |
1346 //'''); | |
1347 // | |
1348 // AnalysisResult result = await driver.getResult(testFile); | |
1349 // expect(result.path, testFile); | |
1350 // } | |
1351 | |
1338 test_getResult_genericFunctionType_parameter_named() async { | 1352 test_getResult_genericFunctionType_parameter_named() async { |
1339 String content = ''' | 1353 String content = ''' |
1340 class C { | 1354 class C { |
1341 test({bool Function(String) p}) {} | 1355 test({bool Function(String) p}) {} |
1342 } | 1356 } |
1343 '''; | 1357 '''; |
1344 addTestFile(content, priority: true); | 1358 addTestFile(content, priority: true); |
1345 | 1359 |
1346 var result = await driver.getResult(testFile); | 1360 var result = await driver.getResult(testFile); |
1347 expect(result.errors, isEmpty); | 1361 expect(result.errors, isEmpty); |
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2857 var path = _p('/test.dart'); | 2871 var path = _p('/test.dart'); |
2858 expect(() { | 2872 expect(() { |
2859 driver.removeFile(path); | 2873 driver.removeFile(path); |
2860 }, throwsStateError); | 2874 }, throwsStateError); |
2861 } | 2875 } |
2862 | 2876 |
2863 String _p(String path) => provider.convertPath(path); | 2877 String _p(String path) => provider.convertPath(path); |
2864 } | 2878 } |
2865 | 2879 |
2866 class _SourceMock extends TypedMock implements Source {} | 2880 class _SourceMock extends TypedMock implements Source {} |
OLD | NEW |