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

Unified Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 1490233007: Remove the old task model (Closed) Base URL: https://github.com/dart-lang/sdk.git@analyzer-breaking-0.27
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/context/cache_test.dart ('k') | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/context/context_test.dart
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 5fd792612f7a9f60891bf123071420a156fcddb5..8979840e807fcc6010578fc1b0565e377d5c9b4c 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -13,24 +13,7 @@ import 'package:analyzer/src/context/cache.dart';
import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/element.dart';
-import 'package:analyzer/src/generated/engine.dart'
- show
- AnalysisContext,
- AnalysisContextStatistics,
- AnalysisDelta,
- AnalysisEngine,
- AnalysisErrorInfo,
- AnalysisLevel,
- AnalysisNotScheduledError,
- AnalysisOptions,
- AnalysisOptionsImpl,
- AnalysisResult,
- ApplyChangesStatus,
- CacheState,
- ChangeNotice,
- ChangeSet,
- IncrementalAnalysisCache,
- TimestampedData;
+import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/resolver.dart';
@@ -854,7 +837,7 @@ part of lib;
}
void test_exists_true() {
- expect(context.exists(new AnalysisContextImplTest_Source_exists_true()),
+ expect(context.exists(new _AnalysisContextImplTest_Source_exists_true()),
isTrue);
}
@@ -1314,7 +1297,7 @@ main() {}''');
int stamp = 42;
expect(
context.getModificationStamp(
- new AnalysisContextImplTest_Source_getModificationStamp_fromSource(
+ new _AnalysisContextImplTest_Source_getModificationStamp_fromSource(
stamp)),
stamp);
}
@@ -1322,7 +1305,7 @@ main() {}''');
void test_getModificationStamp_overridden() {
int stamp = 42;
Source source =
- new AnalysisContextImplTest_Source_getModificationStamp_overridden(
+ new _AnalysisContextImplTest_Source_getModificationStamp_overridden(
stamp);
context.setContents(source, "");
expect(stamp != context.getModificationStamp(source), isTrue);
@@ -1382,16 +1365,6 @@ main() {}''');
expect(context.getSourcesWithFullName(filePath), unorderedEquals(expected));
}
- void test_getStatistics() {
- AnalysisContextStatistics statistics = context.statistics;
- expect(statistics, isNotNull);
- // The following lines are fragile.
- // The values depend on the number of libraries in the SDK.
-// assertLength(0, statistics.getCacheRows());
-// assertLength(0, statistics.getExceptions());
-// assertLength(0, statistics.getSources());
- }
-
void test_handleContentsChanged() {
ContentCache contentCache = new ContentCache();
context.contentCache = contentCache;
@@ -2727,6 +2700,27 @@ class A {
}
}
+class _AnalysisContextImplTest_Source_exists_true extends TestSource {
+ @override
+ bool exists() => true;
+}
+
+class _AnalysisContextImplTest_Source_getModificationStamp_fromSource
+ extends TestSource {
+ int stamp;
+ _AnalysisContextImplTest_Source_getModificationStamp_fromSource(this.stamp);
+ @override
+ int get modificationStamp => stamp;
+}
+
+class _AnalysisContextImplTest_Source_getModificationStamp_overridden
+ extends TestSource {
+ int stamp;
+ _AnalysisContextImplTest_Source_getModificationStamp_overridden(this.stamp);
+ @override
+ int get modificationStamp => stamp;
+}
+
class _AnalysisContextImplTest_test_applyChanges_removeContainer
implements SourceContainer {
Source libB;
« no previous file with comments | « pkg/analyzer/test/src/context/cache_test.dart ('k') | pkg/analyzer/test/src/context/mock_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698