| 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 library analyzer.test.generated.non_hint_code_test; | 5 library analyzer.test.generated.non_hint_code_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/error.dart'; | 7 import 'package:analyzer/src/generated/error.dart'; |
| 8 import 'package:analyzer/src/generated/source_io.dart'; | 8 import 'package:analyzer/src/generated/source_io.dart'; |
| 9 | 9 |
| 10 import '../reflective_tests.dart'; | 10 import '../reflective_tests.dart'; |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 Source source = addSource(r''' | 479 Source source = addSource(r''' |
| 480 class A { | 480 class A { |
| 481 bool operator ==(x) { return x; } | 481 bool operator ==(x) { return x; } |
| 482 get hashCode => 0; | 482 get hashCode => 0; |
| 483 }'''); | 483 }'''); |
| 484 computeLibrarySourceErrors(source); | 484 computeLibrarySourceErrors(source); |
| 485 assertNoErrors(source); | 485 assertNoErrors(source); |
| 486 verify([source]); | 486 verify([source]); |
| 487 } | 487 } |
| 488 | 488 |
| 489 void test_overrideOnNonOverridingGetter_field_inInterface() { | 489 void test_overrideOnNonOverridingField_inInterface() { |
| 490 Source source = addSource(r''' | 490 Source source = addSource(r''' |
| 491 library dart.core; | 491 library dart.core; |
| 492 const override = null; | 492 const override = null; |
| 493 class A { | 493 class A { |
| 494 int get m => 0; | 494 int get a => 0; |
| 495 void set b(_) {} |
| 496 int c; |
| 495 } | 497 } |
| 496 class B implements A { | 498 class B implements A { |
| 497 @override | 499 @override |
| 498 final int m = 1; | 500 final int a = 1; |
| 501 @override |
| 502 int b; |
| 503 @override |
| 504 int c; |
| 499 }'''); | 505 }'''); |
| 500 computeLibrarySourceErrors(source); | 506 computeLibrarySourceErrors(source); |
| 501 assertNoErrors(source); | 507 assertNoErrors(source); |
| 502 verify([source]); | 508 verify([source]); |
| 503 } | 509 } |
| 504 | 510 |
| 505 void test_overrideOnNonOverridingGetter_field_inSuperclass() { | 511 void test_overrideOnNonOverridingField_inSuperclass() { |
| 506 Source source = addSource(r''' | 512 Source source = addSource(r''' |
| 507 library dart.core; | 513 library dart.core; |
| 508 const override = null; | 514 const override = null; |
| 509 class A { | 515 class A { |
| 510 int get m => 0; | 516 int get a => 0; |
| 517 void set b(_) {} |
| 518 int c; |
| 511 } | 519 } |
| 512 class B extends A { | 520 class B extends A { |
| 513 @override | 521 @override |
| 514 final int m = 1; | 522 final int a = 1; |
| 523 @override |
| 524 int b; |
| 525 @override |
| 526 int c; |
| 515 }'''); | 527 }'''); |
| 516 computeLibrarySourceErrors(source); | 528 computeLibrarySourceErrors(source); |
| 517 assertNoErrors(source); | 529 assertNoErrors(source); |
| 518 verify([source]); | 530 verify([source]); |
| 519 } | 531 } |
| 520 | 532 |
| 521 void test_overrideOnNonOverridingGetter_inInterface() { | 533 void test_overrideOnNonOverridingGetter_inInterface() { |
| 522 Source source = addSource(r''' | 534 Source source = addSource(r''' |
| 523 library dart.core; | 535 library dart.core; |
| 524 const override = null; | 536 const override = null; |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 | 1322 |
| 1311 void test_import_valid_outside_lib() { | 1323 void test_import_valid_outside_lib() { |
| 1312 cacheSource("/myproj/pubspec.yaml", ""); | 1324 cacheSource("/myproj/pubspec.yaml", ""); |
| 1313 cacheSource("/myproj/web/other.dart", ""); | 1325 cacheSource("/myproj/web/other.dart", ""); |
| 1314 Source source = | 1326 Source source = |
| 1315 addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';"); | 1327 addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';"); |
| 1316 computeLibrarySourceErrors(source); | 1328 computeLibrarySourceErrors(source); |
| 1317 assertNoErrors(source); | 1329 assertNoErrors(source); |
| 1318 } | 1330 } |
| 1319 } | 1331 } |
| OLD | NEW |