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

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

Issue 2657533004: Update MockSdk to be more consistent with the actual SDK, switch x_Driver tests to it. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | pkg/analyzer/test/generated/resolver_test_case.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 analyzer.test.generated.compile_time_error_code_test; 5 library analyzer.test.generated.compile_time_error_code_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/error/error.dart'; 9 import 'package:analyzer/error/error.dart';
10 import 'package:analyzer/src/error/codes.dart'; 10 import 'package:analyzer/src/error/codes.dart';
(...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 // we could prevent the hint from being generated by testing the import 2766 // we could prevent the hint from being generated by testing the import
2767 // directive for the error, this is such a minor corner case that we don't 2767 // directive for the error, this is such a minor corner case that we don't
2768 // think we should add the additional computation time to figure out such 2768 // think we should add the additional computation time to figure out such
2769 // cases. 2769 // cases.
2770 await computeAnalysisResult(source); 2770 await computeAnalysisResult(source);
2771 assertErrors(source, 2771 assertErrors(source,
2772 [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]); 2772 [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
2773 verify([source]); 2773 verify([source]);
2774 } 2774 }
2775 2775
2776 test_importInternalLibrary_js_helper() async {
2777 Source source = addSource("import 'dart:_js_helper';");
2778 // Note, in these error cases we may generate an UNUSED_IMPORT hint, while
2779 // we could prevent the hint from being generated by testing the import
2780 // directive for the error, this is such a minor corner case that we don't
2781 // think we should add the additional computation time to figure out such
2782 // cases.
2783 await computeAnalysisResult(source);
2784 assertErrors(source,
2785 [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
2786 verify([source]);
2787 }
2788
2789 test_importOfNonLibrary() async { 2776 test_importOfNonLibrary() async {
2790 Source source = addSource(r''' 2777 Source source = addSource(r'''
2791 library lib; 2778 library lib;
2792 import 'part.dart'; 2779 import 'part.dart';
2793 A a;'''); 2780 A a;''');
2794 addNamedSource( 2781 addNamedSource(
2795 "/part.dart", 2782 "/part.dart",
2796 r''' 2783 r'''
2797 part of lib; 2784 part of lib;
2798 class A{}'''); 2785 class A{}''');
(...skipping 3658 matching lines...) Expand 10 before | Expand all | Expand 10 after
6457 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); 6444 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
6458 verify([source]); 6445 verify([source]);
6459 reset(); 6446 reset();
6460 } 6447 }
6461 6448
6462 Future<Null> _check_wrongNumberOfParametersForOperator1(String name) async { 6449 Future<Null> _check_wrongNumberOfParametersForOperator1(String name) async {
6463 await _check_wrongNumberOfParametersForOperator(name, ""); 6450 await _check_wrongNumberOfParametersForOperator(name, "");
6464 await _check_wrongNumberOfParametersForOperator(name, "a, b"); 6451 await _check_wrongNumberOfParametersForOperator(name, "a, b");
6465 } 6452 }
6466 } 6453 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/resolver_test_case.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698