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

Unified Diff: pkg/docgen/test/only_lib_content_in_pkg_test.dart

Issue 1334353002: - Add getters for the current packageRoot or packageMap. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update tests and move to ToT. Created 5 years, 3 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
Index: pkg/docgen/test/only_lib_content_in_pkg_test.dart
diff --git a/pkg/docgen/test/only_lib_content_in_pkg_test.dart b/pkg/docgen/test/only_lib_content_in_pkg_test.dart
index b4ec488c07d2c1d03beb22bfdfd49230937fa7eb..2e5600b63f80e1161d46a572b7dffab78356ea9c 100644
--- a/pkg/docgen/test/only_lib_content_in_pkg_test.dart
+++ b/pkg/docgen/test/only_lib_content_in_pkg_test.dart
@@ -13,7 +13,10 @@ import 'package:scheduled_test/scheduled_test.dart';
import '../lib/docgen.dart' as dg;
import 'util.dart';
-void main() {
+main() async {
+
+ var packageRoot = (await Platform.packageRoot).toFilePath();
Lasse Reichstein Nielsen 2015/09/22 09:48:25 I don't think the toFilePath() should be there. Al
+ if (packageRoot == '') packageRoot = null;
setUp(() {
scheduleTempDir();
@@ -26,9 +29,6 @@ void main() {
expect(p.basename(thisPath), 'only_lib_content_in_pkg_test.dart');
expect(p.dirname(thisPath), endsWith('test'));
- var packageRoot = Platform.packageRoot;
- if (packageRoot == '') packageRoot = null;
-
var codeDir = p.normalize(p.join(thisPath, '..', '..'));
expect(FileSystemEntity.isDirectorySync(codeDir), isTrue);
return dg.docgen(['$codeDir/'], out: p.join(d.defaultRoot, 'docs'),

Powered by Google App Engine
This is Rietveld 408576698