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

Side by Side Diff: pkg/analysis_server/test/domain_diagnostic_test.dart

Issue 2640793006: Don't create FileState(s) for SDK source in _ContentCacheWrapper. (Closed)
Patch Set: Created 3 years, 11 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 | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | 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.domain.diagnostic; 5 library test.domain.diagnostic;
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/domain_diagnostic.dart'; 8 import 'package:analysis_server/src/domain_diagnostic.dart';
9 import 'package:test/test.dart'; 9 import 'package:test/test.dart';
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; 10 import 'package:test_reflective_loader/test_reflective_loader.dart';
(...skipping 29 matching lines...) Expand all
40 var response = handler.handleRequest(request); 40 var response = handler.handleRequest(request);
41 var result = new DiagnosticGetDiagnosticsResult.fromResponse(response); 41 var result = new DiagnosticGetDiagnosticsResult.fromResponse(response);
42 42
43 expect(result.contexts, hasLength(1)); 43 expect(result.contexts, hasLength(1));
44 44
45 ContextData context = result.contexts[0]; 45 ContextData context = result.contexts[0];
46 expect(context.name, '/project'); 46 expect(context.name, '/project');
47 expect(context.explicitFileCount, 1); /* test.dart */ 47 expect(context.explicitFileCount, 1); /* test.dart */
48 48
49 if (enableNewAnalysisDriver) { 49 if (enableNewAnalysisDriver) {
50 // dart:core (although it should not be here) 50 expect(context.implicitFileCount, 0);
51 expect(context.implicitFileCount, 1);
52 } else { 51 } else {
53 // dart:core dart:async dart:math dart:_internal 52 // dart:core dart:async dart:math dart:_internal
54 expect(context.implicitFileCount, 4); 53 expect(context.implicitFileCount, 4);
55 } 54 }
56 55
57 expect(context.workItemQueueLength, isNotNull); 56 expect(context.workItemQueueLength, isNotNull);
58 } 57 }
59 58
60 test_getDiagnostics_noRoot() async { 59 test_getDiagnostics_noRoot() async {
61 var request = new DiagnosticGetDiagnosticsParams().toRequest('0'); 60 var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
62 var response = handler.handleRequest(request); 61 var response = handler.handleRequest(request);
63 var result = new DiagnosticGetDiagnosticsResult.fromResponse(response); 62 var result = new DiagnosticGetDiagnosticsResult.fromResponse(response);
64 expect(result.contexts, isEmpty); 63 expect(result.contexts, isEmpty);
65 } 64 }
66 } 65 }
67 66
68 @reflectiveTest 67 @reflectiveTest
69 class DiagnosticDomainTest_Driver extends DiagnosticDomainTest { 68 class DiagnosticDomainTest_Driver extends DiagnosticDomainTest {
70 @override 69 @override
71 void setUp() { 70 void setUp() {
72 enableNewAnalysisDriver = true; 71 enableNewAnalysisDriver = true;
73 generateSummaryFiles = true; 72 generateSummaryFiles = true;
74 super.setUp(); 73 super.setUp();
75 } 74 }
76 } 75 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698