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

Side by Side Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 1183773002: Add self-reference sources into INCLUDED_PARTS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | 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) 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.compile_time_error_code_test; 5 library engine.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 4687 matching lines...) Expand 10 before | Expand all | Expand 10 after
4698 void test_partOfNonPart() { 4698 void test_partOfNonPart() {
4699 Source source = addSource(r''' 4699 Source source = addSource(r'''
4700 library l1; 4700 library l1;
4701 part 'l2.dart';'''); 4701 part 'l2.dart';''');
4702 addNamedSource("/l2.dart", "library l2;"); 4702 addNamedSource("/l2.dart", "library l2;");
4703 computeLibrarySourceErrors(source); 4703 computeLibrarySourceErrors(source);
4704 assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]); 4704 assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]);
4705 verify([source]); 4705 verify([source]);
4706 } 4706 }
4707 4707
4708 void test_partOfNonPart_self() {
4709 Source source = addSource(r'''
4710 library lib;
4711 part 'test.dart';''');
4712 computeLibrarySourceErrors(source);
4713 assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]);
4714 verify([source]);
4715 }
4716
4708 void test_prefix_conditionalPropertyAccess_call() { 4717 void test_prefix_conditionalPropertyAccess_call() {
4709 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); 4718 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
4710 options.enableNullAwareOperators = true; 4719 options.enableNullAwareOperators = true;
4711 resetWithOptions(options); 4720 resetWithOptions(options);
4712 addNamedSource('/lib.dart', ''' 4721 addNamedSource('/lib.dart', '''
4713 library lib; 4722 library lib;
4714 g() {} 4723 g() {}
4715 '''); 4724 ''');
4716 Source source = addSource(''' 4725 Source source = addSource('''
4717 import 'lib.dart' as p; 4726 import 'lib.dart' as p;
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
6046 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); 6055 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
6047 verify([source]); 6056 verify([source]);
6048 reset(); 6057 reset();
6049 } 6058 }
6050 6059
6051 void _check_wrongNumberOfParametersForOperator1(String name) { 6060 void _check_wrongNumberOfParametersForOperator1(String name) {
6052 _check_wrongNumberOfParametersForOperator(name, ""); 6061 _check_wrongNumberOfParametersForOperator(name, "");
6053 _check_wrongNumberOfParametersForOperator(name, "a, b"); 6062 _check_wrongNumberOfParametersForOperator(name, "a, b");
6054 } 6063 }
6055 } 6064 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698