| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.analysis; | 5 library test.domain.analysis; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/analysis_server.dart'; | 9 import 'package:analysis_server/src/analysis_server.dart'; |
| 10 import 'package:analysis_server/src/constants.dart'; | 10 import 'package:analysis_server/src/constants.dart'; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 OPTIONS: null | 148 OPTIONS: null |
| 149 }); | 149 }); |
| 150 var response = handler.handleRequest(request); | 150 var response = handler.handleRequest(request); |
| 151 expect(response, isResponseSuccess('0')); | 151 expect(response, isResponseSuccess('0')); |
| 152 }); | 152 }); |
| 153 // TODO(paulberry): disabled because analyzeAngular is currently not in | 153 // TODO(paulberry): disabled because analyzeAngular is currently not in |
| 154 // the API. | 154 // the API. |
| 155 // test('valid', () { | 155 // test('valid', () { |
| 156 // engine.AnalysisOptions oldOptions = server.contextDirectoryManager.def
aultOptions; | 156 // engine.AnalysisOptions oldOptions = server.contextDirectoryManager.def
aultOptions; |
| 157 // bool analyzeAngular = !oldOptions.analyzeAngular; | 157 // bool analyzeAngular = !oldOptions.analyzeAngular; |
| 158 // bool enableDeferredLoading = oldOptions.enableDeferredLoading; | 158 // var newOptions = new AnalysisOptions(analyzeAngular: analyzeAngular); |
| 159 // var newOptions = new AnalysisOptions(analyzeAngular: analyzeAngular, | |
| 160 // enableDeferredLoading: enableDeferredLoading, enableEnums: false); | |
| 161 // var request = new AnalysisUpdateOptionsParams(newOptions).toRequest('0
'); | 159 // var request = new AnalysisUpdateOptionsParams(newOptions).toRequest('0
'); |
| 162 // var response = handler.handleRequest(request); | 160 // var response = handler.handleRequest(request); |
| 163 // expect(response, isResponseSuccess('0')); | 161 // expect(response, isResponseSuccess('0')); |
| 164 // expect(oldOptions.analyzeAngular, equals(analyzeAngular)); | 162 // expect(oldOptions.analyzeAngular, equals(analyzeAngular)); |
| 165 // expect(oldOptions.enableDeferredLoading, equals(enableDeferredLoading)
); | |
| 166 // }); | 163 // }); |
| 167 }); | 164 }); |
| 168 }); | 165 }); |
| 169 } | 166 } |
| 170 | 167 |
| 171 | 168 |
| 172 void test_setSubscriptions() { | 169 void test_setSubscriptions() { |
| 173 test('before analysis', () { | 170 test('before analysis', () { |
| 174 AnalysisTestHelper helper = new AnalysisTestHelper(); | 171 AnalysisTestHelper helper = new AnalysisTestHelper(); |
| 175 // subscribe | 172 // subscribe |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 return waitForServerOperationsPerformed(server); | 637 return waitForServerOperationsPerformed(server); |
| 641 } | 638 } |
| 642 | 639 |
| 643 static String _getCodeString(code) { | 640 static String _getCodeString(code) { |
| 644 if (code is List<String>) { | 641 if (code is List<String>) { |
| 645 code = code.join('\n'); | 642 code = code.join('\n'); |
| 646 } | 643 } |
| 647 return code as String; | 644 return code as String; |
| 648 } | 645 } |
| 649 } | 646 } |
| OLD | NEW |