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

Side by Side Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 1531393002: Stop using RESOLVED_UNIT_x for other libraries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/tool/task_dependency_graph/tasks.dot » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 analyzer.test.src.context.context_test; 5 library analyzer.test.src.context.context_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 context.onResultComputed(RESOLVED_UNIT).listen((event) { 1937 context.onResultComputed(RESOLVED_UNIT).listen((event) {
1938 LibrarySpecificUnit target = event.target; 1938 LibrarySpecificUnit target = event.target;
1939 Source librarySource = target.library; 1939 Source librarySource = target.library;
1940 resolvedUnitUris.add(librarySource.uri.toString()); 1940 resolvedUnitUris.add(librarySource.uri.toString());
1941 }); 1941 });
1942 // analyze 1942 // analyze
1943 addSource('/test.dart', 'main() {}'); 1943 addSource('/test.dart', 'main() {}');
1944 _analyzeAll_assertFinished(); 1944 _analyzeAll_assertFinished();
1945 // verify 1945 // verify
1946 expect(libraryElementUris, contains('file:///test.dart')); 1946 expect(libraryElementUris, contains('file:///test.dart'));
1947 expect(parsedUnitUris, contains('dart:core'));
1948 expect(parsedUnitUris, contains('file:///test.dart')); 1947 expect(parsedUnitUris, contains('file:///test.dart'));
1949 expect(resolvedUnitUris, contains('dart:core'));
1950 expect(resolvedUnitUris, contains('file:///test.dart')); 1948 expect(resolvedUnitUris, contains('file:///test.dart'));
1951 } 1949 }
1952 1950
1953 void test_performAnalysisTask_switchPackageVersion() { 1951 void test_performAnalysisTask_switchPackageVersion() {
1954 // version 1 1952 // version 1
1955 resourceProvider.newFile( 1953 resourceProvider.newFile(
1956 '/pkgs/crypto-1/lib/crypto.dart', 1954 '/pkgs/crypto-1/lib/crypto.dart',
1957 r''' 1955 r'''
1958 library crypto; 1956 library crypto;
1959 part 'src/hash_utils.dart'; 1957 part 'src/hash_utils.dart';
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
2726 int get modificationStamp => stamp; 2724 int get modificationStamp => stamp;
2727 } 2725 }
2728 2726
2729 class _AnalysisContextImplTest_test_applyChanges_removeContainer 2727 class _AnalysisContextImplTest_test_applyChanges_removeContainer
2730 implements SourceContainer { 2728 implements SourceContainer {
2731 Source libB; 2729 Source libB;
2732 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB); 2730 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB);
2733 @override 2731 @override
2734 bool contains(Source source) => source == libB; 2732 bool contains(Source source) => source == libB;
2735 } 2733 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/tool/task_dependency_graph/tasks.dot » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698