Index: tests/standalone/io/file_invalid_arguments_test.dart |
diff --git a/tests/standalone/io/file_invalid_arguments_test.dart b/tests/standalone/io/file_invalid_arguments_test.dart |
index 335e5748754f43d6a6b37f5286d6c942b5207a1d..db15b775698973428dfa9c72c0b895b8975b8497 100644 |
--- a/tests/standalone/io/file_invalid_arguments_test.dart |
+++ b/tests/standalone/io/file_invalid_arguments_test.dart |
@@ -2,6 +2,8 @@ |
// 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. |
+// OtherResources=fixed_length_file |
+ |
import "dart:async"; |
import "dart:io"; |
@@ -9,7 +11,7 @@ import "package:async_helper/async_helper.dart"; |
import "package:expect/expect.dart"; |
void testReadInvalidArgs(arg) { |
- String filename = getFilename("tests/vm/data/fixed_length_file"); |
+ String filename = getFilename("fixed_length_file"); |
var file = (new File(filename)).openSync(); |
Expect.throws(() => file.readSync(arg), |
(e) => e is ArgumentError); |
@@ -20,7 +22,7 @@ void testReadInvalidArgs(arg) { |
} |
void testReadIntoInvalidArgs(buffer, start, end) { |
- String filename = getFilename("tests/vm/data/fixed_length_file"); |
+ String filename = getFilename("fixed_length_file"); |
var file = (new File(filename)).openSync(); |
Expect.throws(() => file.readIntoSync(buffer, start, end), |
(e) => e is ArgumentError); |
@@ -31,7 +33,7 @@ void testReadIntoInvalidArgs(buffer, start, end) { |
} |
void testWriteByteInvalidArgs(value) { |
- String filename = getFilename("tests/vm/data/fixed_length_file"); |
+ String filename = getFilename("fixed_length_file"); |
var file = (new File("${filename}_out")).openSync(mode: FileMode.WRITE); |
Expect.throws(() => file.writeByteSync(value), |
(e) => e is ArgumentError); |
@@ -42,7 +44,7 @@ void testWriteByteInvalidArgs(value) { |
} |
void testWriteFromInvalidArgs(buffer, start, end) { |
- String filename = getFilename("tests/vm/data/fixed_length_file"); |
+ String filename = getFilename("fixed_length_file"); |
var file = (new File("${filename}_out")).openSync(mode: FileMode.WRITE); |
Expect.throws(() => file.writeFromSync(buffer, start, end), |
(e) => e is ArgumentError); |
@@ -53,7 +55,7 @@ void testWriteFromInvalidArgs(buffer, start, end) { |
} |
void testWriteStringInvalidArgs(string, encoding) { |
- String filename = getFilename("tests/vm/data/fixed_length_file"); |
+ String filename = getFilename("fixed_length_file"); |
var file = new File("${filename}_out").openSync(mode: FileMode.WRITE); |
Expect.throws(() => file.writeStringSync(string, encoding: encoding), |
(e) => e is ArgumentError); |
@@ -99,10 +101,7 @@ void testFileSystemEntity() { |
} |
String getFilename(String path) { |
- var testPath = Platform.script.resolve('../../../$path'); |
- return new File.fromUri(testPath).existsSync() |
- ? testPath.toFilePath() |
- : Platform.script.resolve('../../../runtime/$path').toFilePath(); |
+ return Platform.script.resolve(path).toFilePath(); |
} |
main() { |