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

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

Issue 2625493002: Issue 28068. Implement diagnostics domain for the new analysis driver. (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
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 28 matching lines...) Expand all
39 var request = new DiagnosticGetDiagnosticsParams().toRequest('0'); 39 var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
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 // dart:core dart:async dart:math dart:_internal 49 if (enableNewAnalysisDriver) {
50 expect(context.implicitFileCount, 4); 50 // dart:core (although it should not be here)
51 expect(context.implicitFileCount, 1);
52 } else {
53 // dart:core dart:async dart:math dart:_internal
54 expect(context.implicitFileCount, 4);
55 }
56
51 expect(context.workItemQueueLength, isNotNull); 57 expect(context.workItemQueueLength, isNotNull);
52 } 58 }
53 59
54 test_getDiagnostics_noRoot() async { 60 test_getDiagnostics_noRoot() async {
55 var request = new DiagnosticGetDiagnosticsParams().toRequest('0'); 61 var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
56 var response = handler.handleRequest(request); 62 var response = handler.handleRequest(request);
57 var result = new DiagnosticGetDiagnosticsResult.fromResponse(response); 63 var result = new DiagnosticGetDiagnosticsResult.fromResponse(response);
58 expect(result.contexts, isEmpty); 64 expect(result.contexts, isEmpty);
59 } 65 }
60 } 66 }
61 67
62 @reflectiveTest 68 @reflectiveTest
63 class DiagnosticDomainTest_Driver extends DiagnosticDomainTest { 69 class DiagnosticDomainTest_Driver extends DiagnosticDomainTest {
64 @override 70 @override
65 void setUp() { 71 void setUp() {
66 enableNewAnalysisDriver = true; 72 enableNewAnalysisDriver = true;
67 generateSummaryFiles = true; 73 generateSummaryFiles = true;
68 super.setUp(); 74 super.setUp();
69 } 75 }
70
71 @failingTest
72 @override
73 test_getDiagnostics() {
74 return super.test_getDiagnostics();
75 }
76
77 @failingTest
78 @override
79 test_getDiagnostics_noRoot() {
80 return super.test_getDiagnostics_noRoot();
81 }
82 } 76 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/domain_diagnostic.dart ('k') | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698