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

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

Issue 2232863004: Create new error message for missing generated files (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« pkg/analyzer/lib/src/task/dart.dart ('K') | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | 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 c274834f21eb82be4032781a5b44118dbd4b3b86..83053ef4dea51a61d77d80f8beac97fb69940efd 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -3544,6 +3544,7 @@ class C {
SimpleIdentifier reference = statement.expression;
expect(reference.staticElement, isResolved ? isNotNull : isNull);
}
+
//
// The reference to 'A' in 'f1' should not be resolved.
//
@@ -5682,7 +5683,21 @@ const int x = p.y;
]);
}
- test_perform_directiveError() {
+ test_perform_directiveError_generated() {
+ Source source = newSource(
+ '/test.dart',
+ '''
+import 'generated-file.g.dart';
+''');
+ LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+ computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
+ // validate
+ _fillErrorListener(VERIFY_ERRORS);
+ errorListener.assertErrorsWithCodes(
+ <ErrorCode>[CompileTimeErrorCode.URI_HAS_NOT_BEEN_GENERATED]);
+ }
+
+ test_perform_directiveError_nonGenerated() {
Source source = newSource(
'/test.dart',
'''
@@ -5785,6 +5800,7 @@ class _AbstractDartTaskTest extends AbstractContextTest {
matcher: matcher);
return outputs[result];
}
+
return sources.map(compute).toList();
}
@@ -5795,6 +5811,7 @@ class _AbstractDartTaskTest extends AbstractContextTest {
computeResult(source, result, matcher: matcher);
return outputs;
}
+
return sources.map(compute).toList();
}
« pkg/analyzer/lib/src/task/dart.dart ('K') | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698