| OLD | NEW |
| 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 engine.non_error_resolver_test; | 5 library engine.non_error_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3386 m(p); | 3386 m(p); |
| 3387 } | 3387 } |
| 3388 class B extends A { | 3388 class B extends A { |
| 3389 noSuchMethod(v) => ''; | 3389 noSuchMethod(v) => ''; |
| 3390 }'''); | 3390 }'''); |
| 3391 computeLibrarySourceErrors(source); | 3391 computeLibrarySourceErrors(source); |
| 3392 assertNoErrors(source); | 3392 assertNoErrors(source); |
| 3393 verify([source]); | 3393 verify([source]); |
| 3394 } | 3394 } |
| 3395 | 3395 |
| 3396 void test_nonAbstractClassInheritsAbstractMemberOne_overridesMethodInObject()
{ |
| 3397 Source source = addSource(r''' |
| 3398 class A { |
| 3399 String toString([String prefix = '']) => '${prefix}Hello'; |
| 3400 } |
| 3401 class C {} |
| 3402 class B extends A with C {}'''); |
| 3403 computeLibrarySourceErrors(source); |
| 3404 assertNoErrors(source); |
| 3405 verify([source]); |
| 3406 } |
| 3407 |
| 3396 void test_nonBoolExpression_functionType() { | 3408 void test_nonBoolExpression_functionType() { |
| 3397 Source source = addSource(r''' | 3409 Source source = addSource(r''' |
| 3398 bool makeAssertion() => true; | 3410 bool makeAssertion() => true; |
| 3399 f() { | 3411 f() { |
| 3400 assert(makeAssertion); | 3412 assert(makeAssertion); |
| 3401 }'''); | 3413 }'''); |
| 3402 computeLibrarySourceErrors(source); | 3414 computeLibrarySourceErrors(source); |
| 3403 assertNoErrors(source); | 3415 assertNoErrors(source); |
| 3404 verify([source]); | 3416 verify([source]); |
| 3405 } | 3417 } |
| (...skipping 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5518 reset(); | 5530 reset(); |
| 5519 } | 5531 } |
| 5520 | 5532 |
| 5521 void _check_wrongNumberOfParametersForOperator1(String name) { | 5533 void _check_wrongNumberOfParametersForOperator1(String name) { |
| 5522 _check_wrongNumberOfParametersForOperator(name, "a"); | 5534 _check_wrongNumberOfParametersForOperator(name, "a"); |
| 5523 } | 5535 } |
| 5524 | 5536 |
| 5525 CompilationUnit _getResolvedLibraryUnit(Source source) => | 5537 CompilationUnit _getResolvedLibraryUnit(Source source) => |
| 5526 analysisContext.getResolvedCompilationUnit2(source, source); | 5538 analysisContext.getResolvedCompilationUnit2(source, source); |
| 5527 } | 5539 } |
| OLD | NEW |