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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_analysis_options_test.dart

Issue 1803203002: Fix analysis_server test to not expect redundant error. (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
« no previous file with comments | « no previous file | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 test.analysis.notification.analysis_options; 5 library test.analysis.notification.analysis_options;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:analysis_server/src/constants.dart'; 8 import 'package:analysis_server/src/constants.dart';
9 import 'package:analysis_server/src/domain_analysis.dart'; 9 import 'package:analysis_server/src/domain_analysis.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 expect(testContext.analysisOptions.lint, true); 289 expect(testContext.analysisOptions.lint, true);
290 var rules = getLints(testContext).map((rule) => rule.name); 290 var rules = getLints(testContext).map((rule) => rule.name);
291 expect(rules, unorderedEquals(lints)); 291 expect(rules, unorderedEquals(lints));
292 } 292 }
293 293
294 verifyStrongMode({bool enabled}) { 294 verifyStrongMode({bool enabled}) {
295 // Verify strong-mode enabled. 295 // Verify strong-mode enabled.
296 expect(testContext.analysisOptions.strongMode, enabled); 296 expect(testContext.analysisOptions.strongMode, enabled);
297 297
298 if (enabled) { 298 if (enabled) {
299 // Should produce a warning and an error. 299 // Should produce a type warning.
300 expect( 300 expect(
301 errors.map((error) => error.type), 301 errors.map((error) => error.type),
302 unorderedEquals([ 302 unorderedEquals([
303 AnalysisErrorType.STATIC_TYPE_WARNING, 303 AnalysisErrorType.STATIC_TYPE_WARNING
304 AnalysisErrorType.COMPILE_TIME_ERROR
305 ])); 304 ]));
306 } else { 305 } else {
307 // Should only produce a hint. 306 // Should only produce a hint.
308 expect(errors.map((error) => error.type), 307 expect(errors.map((error) => error.type),
309 unorderedEquals([AnalysisErrorType.HINT])); 308 unorderedEquals([AnalysisErrorType.HINT]));
310 } 309 }
311 } 310 }
312 } 311 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698