| 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/src/cancelable_future.dart'; | 9 import 'package:analyzer/src/cancelable_future.dart'; |
| 10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
| (...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 void test_performAnalysisTask_IOException() { | 1581 void test_performAnalysisTask_IOException() { |
| 1582 TestSource source = _addSourceWithException2("/test.dart", "library test;"); | 1582 TestSource source = _addSourceWithException2("/test.dart", "library test;"); |
| 1583 source.generateExceptionOnRead = false; | 1583 source.generateExceptionOnRead = false; |
| 1584 _analyzeAll_assertFinished(); | 1584 _analyzeAll_assertFinished(); |
| 1585 expect(source.readCount, 1); | 1585 expect(source.readCount, 1); |
| 1586 _changeSource(source, ""); | 1586 _changeSource(source, ""); |
| 1587 source.generateExceptionOnRead = true; | 1587 source.generateExceptionOnRead = true; |
| 1588 _analyzeAll_assertFinished(); | 1588 _analyzeAll_assertFinished(); |
| 1589 expect(source.readCount, 5); | 1589 if (AnalysisEngine.instance.limitInvalidationInTaskModel) { |
| 1590 expect(source.readCount, 5); |
| 1591 } else { |
| 1592 expect(source.readCount, 3); |
| 1593 } |
| 1590 } | 1594 } |
| 1591 | 1595 |
| 1592 void test_performAnalysisTask_missingPart() { | 1596 void test_performAnalysisTask_missingPart() { |
| 1593 Source source = | 1597 Source source = |
| 1594 addSource("/test.dart", "library lib; part 'no-such-file.dart';"); | 1598 addSource("/test.dart", "library lib; part 'no-such-file.dart';"); |
| 1595 _analyzeAll_assertFinished(); | 1599 _analyzeAll_assertFinished(); |
| 1596 expect(context.getLibraryElement(source), isNotNull, | 1600 expect(context.getLibraryElement(source), isNotNull, |
| 1597 reason: "performAnalysisTask failed to compute an element model"); | 1601 reason: "performAnalysisTask failed to compute an element model"); |
| 1598 } | 1602 } |
| 1599 | 1603 |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 } | 2270 } |
| 2267 } | 2271 } |
| 2268 | 2272 |
| 2269 class _AnalysisContextImplTest_test_applyChanges_removeContainer | 2273 class _AnalysisContextImplTest_test_applyChanges_removeContainer |
| 2270 implements SourceContainer { | 2274 implements SourceContainer { |
| 2271 Source libB; | 2275 Source libB; |
| 2272 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB); | 2276 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB); |
| 2273 @override | 2277 @override |
| 2274 bool contains(Source source) => source == libB; | 2278 bool contains(Source source) => source == libB; |
| 2275 } | 2279 } |
| OLD | NEW |