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

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

Issue 2423593002: Add test directive to include other files used by a test in its compiled output directory. (Closed)
Patch Set: Created 4 years, 2 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 | « tests/standalone/io/file_input_stream_test.dart ('k') | tests/standalone/io/fixed_length_file » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « tests/standalone/io/file_input_stream_test.dart ('k') | tests/standalone/io/fixed_length_file » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698