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

Unified Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1517723002: Server custom error severity support (#24452). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: lib_renames Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/source/test_all.dart ('k') | pkg/analyzer/test/src/task/options_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/dart_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index 2f7fe7ddc84915f78df73d39e1d0bd2f1d0f14e3..2a66ec36b9a11bc07f7d3883f34574b5a6801816 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -47,7 +47,6 @@ main() {
runReflectiveTests(ComputePropagableVariableDependenciesTaskTest);
runReflectiveTests(ContainingLibrariesTaskTest);
runReflectiveTests(DartErrorsTaskTest);
- runReflectiveTests(ErrorFilterTest);
runReflectiveTests(EvaluateUnitConstantsTaskTest);
runReflectiveTests(GatherUsedImportedElementsTaskTest);
runReflectiveTests(GatherUsedLocalElementsTaskTest);
@@ -1116,8 +1115,9 @@ class ComputeConstantValueTaskTest extends _AbstractDartTaskTest {
computeResult(target, CONSTANT_VALUE,
matcher: isComputeConstantValueTask);
expect(outputs[CONSTANT_VALUE], same(target));
- EvaluationResultImpl evaluationResult = (annotation.elementAnnotation
- as ElementAnnotationImpl).evaluationResult;
+ EvaluationResultImpl evaluationResult =
+ (annotation.elementAnnotation as ElementAnnotationImpl)
+ .evaluationResult;
return evaluationResult;
}
}
@@ -1285,8 +1285,9 @@ const x = 1;
for (String otherVariableName in otherVariables) {
PropertyInducingElement otherVariableElement =
AstFinder.getTopLevelVariableElement(unit, otherVariableName);
- _expectCircularityError((otherVariableElement
- as TopLevelVariableElementImpl).evaluationResult);
+ _expectCircularityError(
+ (otherVariableElement as TopLevelVariableElementImpl)
+ .evaluationResult);
}
}
@@ -1962,32 +1963,6 @@ class DartErrorsTaskTest extends _AbstractDartTaskTest {
}
@reflectiveTest
-class ErrorFilterTest extends _AbstractDartTaskTest {
- @override
- setUp() {
- super.setUp();
- context.setConfigurationData(CONFIGURED_ERROR_FILTERS, [
- (AnalysisError error) => error.errorCode.name == 'INVALID_ASSIGNMENT'
- ]);
- }
-
- test_error_filters() {
- AnalysisTarget library = newSource(
- '/test.dart',
- '''
-main() {
- int x = ""; // INVALID_ASSIGNMENT (suppressed)
- // UNUSED_LOCAL_VARIABLE
-}''');
- computeResult(library, DART_ERRORS, matcher: isDartErrorsTask);
- expect(outputs, hasLength(1));
- List<AnalysisError> errors = outputs[DART_ERRORS];
- expect(errors, hasLength(1));
- expect(errors.first.errorCode, HintCode.UNUSED_LOCAL_VARIABLE);
- }
-}
-
-@reflectiveTest
class EvaluateUnitConstantsTaskTest extends _AbstractDartTaskTest {
test_perform() {
Source source = newSource(
@@ -3879,8 +3854,9 @@ var tau = piFirst ? pi * 2 : 6.28;
VariableElement tau =
AstFinder.getTopLevelVariable(unit, 'tau').name.staticElement;
Expression piFirstUse = (AstFinder
- .getTopLevelVariable(unit, 'tau')
- .initializer as ConditionalExpression).condition;
+ .getTopLevelVariable(unit, 'tau')
+ .initializer as ConditionalExpression)
+ .condition;
expect(piFirstUse.staticType, context.typeProvider.boolType);
expect(piFirst.type, context.typeProvider.boolType);
« no previous file with comments | « pkg/analyzer/test/source/test_all.dart ('k') | pkg/analyzer/test/src/task/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698