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

Unified Diff: pkg/analysis_server/test/domain_analysis_test.dart

Issue 2525693002: Use single unit/node/element. (Closed)
Patch Set: Created 4 years, 1 month 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/analysis_server/lib/src/search/search_domain.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/domain_analysis_test.dart
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index 76d12c8586b7a8a34bba4f7de34ccb25b5e2b30d..2c2c5fdb4d3a71a5c025d3bc2b2d8839f096d605 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -116,8 +116,8 @@ main() {
// unit "a" is resolved eventually
// unit "b" is not resolved
return server.onAnalysisComplete.then((_) {
- expect(serverRef.getResolvedCompilationUnits(fileA), hasLength(1));
- expect(serverRef.getResolvedCompilationUnits(fileB), isEmpty);
+ expect(serverRef.getResolvedCompilationUnit(fileA), isNotNull);
+ expect(serverRef.getResolvedCompilationUnit(fileB), isNull);
});
});
@@ -148,8 +148,8 @@ main() {
expect(response, isResponseSuccess('0'));
// verify that unit is resolved eventually
return server.onAnalysisComplete.then((_) {
- var units = serverRef.getResolvedCompilationUnits(file);
- expect(units, hasLength(1));
+ var unit = serverRef.getResolvedCompilationUnit(file);
+ expect(unit, isNotNull);
});
});
@@ -162,7 +162,7 @@ main() {
// Non-existence of /project_a should not prevent files in /project_b
// from being analyzed.
await server.onAnalysisComplete;
- expect(serverRef.getResolvedCompilationUnits(fileB), hasLength(1));
+ expect(serverRef.getResolvedCompilationUnit(fileB), isNotNull);
});
test('not absolute', () async {
« no previous file with comments | « pkg/analysis_server/lib/src/search/search_domain.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698