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

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

Issue 1372433003: Remove CompilationUnit name requirement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months 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/context/context.dart ('k') | no next file » | 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 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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 expect(context.getResolvedCompilationUnit(source, null), isNull); 1247 expect(context.getResolvedCompilationUnit(source, null), isNull);
1248 } 1248 }
1249 1249
1250 void test_getResolvedCompilationUnit_source_dart() { 1250 void test_getResolvedCompilationUnit_source_dart() {
1251 Source source = addSource("/lib.dart", "library lib;"); 1251 Source source = addSource("/lib.dart", "library lib;");
1252 expect(context.getResolvedCompilationUnit2(source, source), isNull); 1252 expect(context.getResolvedCompilationUnit2(source, source), isNull);
1253 context.resolveCompilationUnit2(source, source); 1253 context.resolveCompilationUnit2(source, source);
1254 expect(context.getResolvedCompilationUnit2(source, source), isNotNull); 1254 expect(context.getResolvedCompilationUnit2(source, source), isNotNull);
1255 } 1255 }
1256 1256
1257 void test_getResolvedCompilationUnit_source_html() {
1258 Source source = addSource("/test.html", "<html></html>");
1259 expect(context.getResolvedCompilationUnit2(source, source), isNull);
1260 expect(context.resolveCompilationUnit2(source, source), isNull);
1261 expect(context.getResolvedCompilationUnit2(source, source), isNull);
1262 }
1263
1264 void test_getSourceFactory() { 1257 void test_getSourceFactory() {
1265 expect(context.sourceFactory, same(sourceFactory)); 1258 expect(context.sourceFactory, same(sourceFactory));
1266 } 1259 }
1267 1260
1268 void test_getSourcesWithFullName() { 1261 void test_getSourcesWithFullName() {
1269 String filePath = '/foo/lib/file.dart'; 1262 String filePath = '/foo/lib/file.dart';
1270 List<Source> expected = <Source>[]; 1263 List<Source> expected = <Source>[];
1271 ChangeSet changeSet = new ChangeSet(); 1264 ChangeSet changeSet = new ChangeSet();
1272 1265
1273 TestSourceWithUri source1 = 1266 TestSourceWithUri source1 =
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 } 2515 }
2523 } 2516 }
2524 2517
2525 class _AnalysisContextImplTest_test_applyChanges_removeContainer 2518 class _AnalysisContextImplTest_test_applyChanges_removeContainer
2526 implements SourceContainer { 2519 implements SourceContainer {
2527 Source libB; 2520 Source libB;
2528 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB); 2521 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB);
2529 @override 2522 @override
2530 bool contains(Source source) => source == libB; 2523 bool contains(Source source) => source == libB;
2531 } 2524 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698