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

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

Issue 2235583003: Convert ContextBuilder to use FolderBasedSdk (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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_builder_test; 5 library analyzer.test.src.context.context_builder_test;
6 6
7 import 'dart:io' as io; 7 import 'dart:io' as io;
8 8
9 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
10 import 'package:analyzer/file_system/memory_file_system.dart'; 10 import 'package:analyzer/file_system/memory_file_system.dart';
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 ContentCache contentCache; 450 ContentCache contentCache;
451 451
452 /** 452 /**
453 * The context builder to be used in the test. 453 * The context builder to be used in the test.
454 */ 454 */
455 ContextBuilder builder; 455 ContextBuilder builder;
456 456
457 @override 457 @override
458 void setUp() { 458 void setUp() {
459 resourceProvider = new MemoryResourceProvider(); 459 resourceProvider = new MemoryResourceProvider();
460 sdkManager = new DartSdkManager('', false, (_) => new MockSdk()); 460 new MockSdk(resourceProvider: resourceProvider);
461 sdkManager = new DartSdkManager('/', false, (_) {
462 fail('Should not be used to create an SDK');
463 });
461 contentCache = new ContentCache(); 464 contentCache = new ContentCache();
462 builder = new ContextBuilder(resourceProvider, sdkManager, contentCache); 465 builder = new ContextBuilder(resourceProvider, sdkManager, contentCache);
463 } 466 }
464 467
465 void test_convertPackagesToMap_noPackages() { 468 void test_convertPackagesToMap_noPackages() {
466 expect(builder.convertPackagesToMap(Packages.noPackages), isNull); 469 expect(builder.convertPackagesToMap(Packages.noPackages), isNull);
467 } 470 }
468 471
469 void test_convertPackagesToMap_null() { 472 void test_convertPackagesToMap_null() {
470 expect(builder.convertPackagesToMap(null), isNull); 473 expect(builder.convertPackagesToMap(null), isNull);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 expect(locator.embedderYamls, hasLength(0)); 716 expect(locator.embedderYamls, hasLength(0));
714 } 717 }
715 718
716 void test_valid() { 719 void test_valid() {
717 EmbedderYamlLocator locator = new EmbedderYamlLocator({ 720 EmbedderYamlLocator locator = new EmbedderYamlLocator({
718 'fox': [pathTranslator.getResource('/tmp')] 721 'fox': [pathTranslator.getResource('/tmp')]
719 }); 722 });
720 expect(locator.embedderYamls, hasLength(1)); 723 expect(locator.embedderYamls, hasLength(1));
721 } 724 }
722 } 725 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698