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

Unified Diff: tests/standalone/io/read_into_const_list_test.dart

Issue 899243002: Make standalone tests not dependent on current working directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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: tests/standalone/io/read_into_const_list_test.dart
diff --git a/tests/standalone/io/read_into_const_list_test.dart b/tests/standalone/io/read_into_const_list_test.dart
index f010a83916b98def83870d5598016ec5d2bda54c..3eb624a2c71928ebee3be84a0ad7fc503d7317cf 100644
--- a/tests/standalone/io/read_into_const_list_test.dart
+++ b/tests/standalone/io/read_into_const_list_test.dart
@@ -8,8 +8,13 @@
import "package:expect/expect.dart";
import "dart:io";
-String getFilename(String path) =>
- new File(path).existsSync() ? path : 'runtime/$path';
+String getFilename(String path) {
+ var testPath = Platform.script.resolve('../../../$path');
+ return new File.fromUri(testPath).existsSync()
+ ? testPath.toFilePath()
+ : Platform.script.resolve('../../../runtime/$path').toFilePath();
+}
+
void main() {
var a = const [0];

Powered by Google App Engine
This is Rietveld 408576698