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

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

Issue 1782463002: Split resolver_test.dart into smaller files. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
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 import 'package:analyzer/src/generated/error.dart'; 5 import 'package:analyzer/src/generated/error.dart';
6 import 'package:analyzer/src/generated/source.dart'; 6 import 'package:analyzer/src/generated/source.dart';
7 import 'package:analyzer/src/generated/source_io.dart'; 7 import 'package:analyzer/src/generated/source_io.dart';
8 8
9 import '../reflective_tests.dart'; 9 import '../reflective_tests.dart';
10 import '../utils.dart'; 10 import '../utils.dart';
11 import 'resolver_test.dart'; 11 import 'resolver_test_case.dart';
12 12
13 main() { 13 main() {
14 initializeTestEnvironment(); 14 initializeTestEnvironment();
15 runReflectiveTests(ErrorSuppressionTest); 15 runReflectiveTests(ErrorSuppressionTest);
16 } 16 }
17 17
18 @reflectiveTest 18 @reflectiveTest
19 class ErrorSuppressionTest extends ResolverTestCase { 19 class ErrorSuppressionTest extends ResolverTestCase {
20 void test_error_code_mismatch() { 20 void test_error_code_mismatch() {
21 Source source = addSource(''' 21 Source source = addSource('''
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 int x = ''; //INVALID_ASSIGNMENT 143 int x = ''; //INVALID_ASSIGNMENT
144 const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE 144 const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
145 '''); 145 ''');
146 computeLibrarySourceErrors(source); 146 computeLibrarySourceErrors(source);
147 assertErrors(source, [ 147 assertErrors(source, [
148 StaticTypeWarningCode.INVALID_ASSIGNMENT, 148 StaticTypeWarningCode.INVALID_ASSIGNMENT,
149 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE 149 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
150 ]); 150 ]);
151 } 151 }
152 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698