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

Unified Diff: tests/standalone/src/StatusFileParserTest.dart

Issue 9309031: Fix status file parser test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/StatusFileParserTest.dart
diff --git a/tests/standalone/src/StatusFileParserTest.dart b/tests/standalone/src/StatusFileParserTest.dart
index e2e3ea08f58717c238fe98d67ef6d6608cb6e1cf..d090657c1d562fd6a490e62f54a506918e7c213d 100644
--- a/tests/standalone/src/StatusFileParserTest.dart
+++ b/tests/standalone/src/StatusFileParserTest.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -24,13 +24,20 @@ void main() {
TestReadStatusFile("client/tests/dartc/dartc.status");
}
+String getFile(String filePath) {
+ if (new File(filePath).existsSync()) {
+ return filePath;
+ } else {
+ return "../${filePath}";
+ }
+}
void TestReadStatusFile(String filePath) {
- File file = new File(getFilename(filePath));
+ File file = new File(getFile(filePath));
if (file.existsSync()) {
List<Section> sections = new List<Section>();
ReadConfigurationInto(filePath, sections, () {
- Expect.isTrue(sections.length > 0);
- });
+ Expect.isTrue(sections.length > 0);
+ });
}
}
« 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