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

Unified Diff: pkg/code_transformers/lib/src/dart_sdk.dart

Issue 200543006: Allow multiple-entry libraries in code_transformers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/code_transformers/lib/src/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/code_transformers/lib/src/dart_sdk.dart
diff --git a/pkg/code_transformers/lib/src/dart_sdk.dart b/pkg/code_transformers/lib/src/dart_sdk.dart
index 3b79f368c3cd752457a8a9cc39ad4288006675e8..d31169a8fd8f851539ce4fab7a863d1209d26255 100644
--- a/pkg/code_transformers/lib/src/dart_sdk.dart
+++ b/pkg/code_transformers/lib/src/dart_sdk.dart
@@ -47,3 +47,16 @@ String get dartSdkDirectory {
return null;
}
+
+/// Variant of [dartSdkDirectory] which includes additional cases only
+/// typically encountered in Dart's testing environment.
+String get testingDartSdkDirectory {
+ var sdkDir = dartSdkDirectory;
+ if (sdkDir == null) {
+ // If we cannot find the SDK dir, then assume this is being run from Dart's
+ // source directory and this script is the main script.
+ sdkDir = path.join(
+ path.dirname(path.fromUri(Platform.script)), '..', '..', '..', 'sdk');
+ }
+ return sdkDir;
+}
« no previous file with comments | « no previous file | pkg/code_transformers/lib/src/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698