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 analyzer.test.generated.compile_time_error_code_test; | 5 library analyzer.test.generated.compile_time_error_code_test; |
6 | 6 |
7 import 'package:analyzer/src/generated/engine.dart'; | 7 import 'package:analyzer/src/generated/engine.dart'; |
8 import 'package:analyzer/src/generated/error.dart'; | 8 import 'package:analyzer/src/generated/error.dart'; |
9 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; | 9 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; |
10 import 'package:analyzer/src/generated/source_io.dart'; | 10 import 'package:analyzer/src/generated/source_io.dart'; |
(...skipping 5460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5471 | 5471 |
5472 void test_recursiveInterfaceInheritanceBaseCaseExtends() { | 5472 void test_recursiveInterfaceInheritanceBaseCaseExtends() { |
5473 Source source = addSource("class A extends A {}"); | 5473 Source source = addSource("class A extends A {}"); |
5474 computeLibrarySourceErrors(source); | 5474 computeLibrarySourceErrors(source); |
5475 assertErrors(source, [ | 5475 assertErrors(source, [ |
5476 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS | 5476 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS |
5477 ]); | 5477 ]); |
5478 verify([source]); | 5478 verify([source]); |
5479 } | 5479 } |
5480 | 5480 |
| 5481 void test_recursiveInterfaceInheritanceBaseCaseExtends_abstract() { |
| 5482 Source source = addSource(r''' |
| 5483 class C extends C { |
| 5484 var bar = 0; |
| 5485 m(); |
| 5486 } |
| 5487 '''); |
| 5488 computeLibrarySourceErrors(source); |
| 5489 assertErrors(source, [ |
| 5490 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, |
| 5491 StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, |
| 5492 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE |
| 5493 ]); |
| 5494 verify([source]); |
| 5495 } |
| 5496 |
5481 void test_recursiveInterfaceInheritanceBaseCaseImplements() { | 5497 void test_recursiveInterfaceInheritanceBaseCaseImplements() { |
5482 Source source = addSource("class A implements A {}"); | 5498 Source source = addSource("class A implements A {}"); |
5483 computeLibrarySourceErrors(source); | 5499 computeLibrarySourceErrors(source); |
5484 assertErrors(source, [ | 5500 assertErrors(source, [ |
5485 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS | 5501 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS |
5486 ]); | 5502 ]); |
5487 verify([source]); | 5503 verify([source]); |
5488 } | 5504 } |
5489 | 5505 |
5490 void test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() { | 5506 void test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() { |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6321 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); | 6337 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); |
6322 verify([source]); | 6338 verify([source]); |
6323 reset(); | 6339 reset(); |
6324 } | 6340 } |
6325 | 6341 |
6326 void _check_wrongNumberOfParametersForOperator1(String name) { | 6342 void _check_wrongNumberOfParametersForOperator1(String name) { |
6327 _check_wrongNumberOfParametersForOperator(name, ""); | 6343 _check_wrongNumberOfParametersForOperator(name, ""); |
6328 _check_wrongNumberOfParametersForOperator(name, "a, b"); | 6344 _check_wrongNumberOfParametersForOperator(name, "a, b"); |
6329 } | 6345 } |
6330 } | 6346 } |
OLD | NEW |