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.src.context.context_test; | 5 library test.src.context.context_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analyzer/file_system/memory_file_system.dart'; | 9 import 'package:analyzer/file_system/memory_file_system.dart'; |
10 import 'package:analyzer/src/cancelable_future.dart'; | 10 import 'package:analyzer/src/cancelable_future.dart'; |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 }); | 658 }); |
659 return pumpEventQueue().then((_) { | 659 return pumpEventQueue().then((_) { |
660 expect(completed, isFalse); | 660 expect(completed, isFalse); |
661 _performPendingAnalysisTasks(); | 661 _performPendingAnalysisTasks(); |
662 }).then((_) => pumpEventQueue()).then((_) { | 662 }).then((_) => pumpEventQueue()).then((_) { |
663 expect(completed, isTrue); | 663 expect(completed, isTrue); |
664 }); | 664 }); |
665 } | 665 } |
666 | 666 |
667 void test_configurationData() { | 667 void test_configurationData() { |
668 var key = new ResultDescriptor('test_key', ''); | 668 var key = new ResultDescriptor('test_key', 'TEST_DEFAULT'); |
669 var testData = ['test', 'data']; | 669 var testData = ['test', 'data']; |
670 context.setConfigurationData(key, testData); | 670 context.setConfigurationData(key, testData); |
671 expect(context.getConfigurationData(key), testData); | 671 expect(context.getConfigurationData(key), testData); |
672 var unusedKey = new ResultDescriptor('unused_key', ''); | 672 var unusedKey = new ResultDescriptor('unused_key', 'UNUSED_DEFAULT'); |
673 expect(context.getConfigurationData(unusedKey), null); | 673 expect(context.getConfigurationData(unusedKey), 'UNUSED_DEFAULT'); |
674 } | 674 } |
675 | 675 |
676 void test_dispose() { | 676 void test_dispose() { |
677 expect(context.isDisposed, isFalse); | 677 expect(context.isDisposed, isFalse); |
678 context.dispose(); | 678 context.dispose(); |
679 expect(context.isDisposed, isTrue); | 679 expect(context.isDisposed, isTrue); |
680 } | 680 } |
681 | 681 |
682 void test_ensureResolvedDartUnits_definingUnit_hasResolved() { | 682 void test_ensureResolvedDartUnits_definingUnit_hasResolved() { |
683 Source source = addSource('/test.dart', ''); | 683 Source source = addSource('/test.dart', ''); |
(...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2586 } | 2586 } |
2587 } | 2587 } |
2588 | 2588 |
2589 class _AnalysisContextImplTest_test_applyChanges_removeContainer | 2589 class _AnalysisContextImplTest_test_applyChanges_removeContainer |
2590 implements SourceContainer { | 2590 implements SourceContainer { |
2591 Source libB; | 2591 Source libB; |
2592 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB); | 2592 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB); |
2593 @override | 2593 @override |
2594 bool contains(Source source) => source == libB; | 2594 bool contains(Source source) => source == libB; |
2595 } | 2595 } |
OLD | NEW |