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

Side by Side Diff: pkg/analyzer/lib/src/dart/sdk/sdk.dart

Issue 2568253002: Fix test of incorrect SDK path. (Closed)
Patch Set: Created 4 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 | « no previous file | 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) 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.src.generated.sdk2; 5 library analyzer.src.generated.sdk2;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io' as io; 9 import 'dart:io' as io;
10 10
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 } 696 }
697 // Might be "xcodebuild/ReleaseIA32/dart" with "sdk" sibling 697 // Might be "xcodebuild/ReleaseIA32/dart" with "sdk" sibling
698 String outDir = pathContext.dirname(pathContext.dirname(exec)); 698 String outDir = pathContext.dirname(pathContext.dirname(exec));
699 String sdkPath = pathContext.join(pathContext.dirname(outDir), "sdk"); 699 String sdkPath = pathContext.join(pathContext.dirname(outDir), "sdk");
700 if (resourceProvider.getFolder(sdkPath).exists) { 700 if (resourceProvider.getFolder(sdkPath).exists) {
701 // We are executing in the context of a test. sdkPath is the path to the 701 // We are executing in the context of a test. sdkPath is the path to the
702 // *source* files for the SDK. But we want to test using the path to the 702 // *source* files for the SDK. But we want to test using the path to the
703 // *built* SDK if possible. 703 // *built* SDK if possible.
704 String builtSdkPath = 704 String builtSdkPath =
705 pathContext.join(pathContext.dirname(exec), 'dart-sdk'); 705 pathContext.join(pathContext.dirname(exec), 'dart-sdk');
706 if (resourceProvider.getFolder(sdkPath).exists) { 706 if (resourceProvider.getFolder(builtSdkPath).exists) {
707 return builtSdkPath; 707 return builtSdkPath;
708 } else { 708 } else {
709 return sdkPath; 709 return sdkPath;
710 } 710 }
711 } 711 }
712 // probably be "dart-sdk/bin/dart" 712 // probably be "dart-sdk/bin/dart"
713 return pathContext.dirname(pathContext.dirname(exec)); 713 return pathContext.dirname(pathContext.dirname(exec));
714 } 714 }
715 } 715 }
716 716
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 SdkLibrariesReader_LibraryBuilder libraryBuilder = 892 SdkLibrariesReader_LibraryBuilder libraryBuilder =
893 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); 893 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths);
894 // If any syntactic errors were found then don't try to visit the AST 894 // If any syntactic errors were found then don't try to visit the AST
895 // structure. 895 // structure.
896 if (!errorListener.errorReported) { 896 if (!errorListener.errorReported) {
897 unit.accept(libraryBuilder); 897 unit.accept(libraryBuilder);
898 } 898 }
899 return libraryBuilder.librariesMap; 899 return libraryBuilder.librariesMap;
900 } 900 }
901 } 901 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698