Modify resource file of tests to enable running it on shards.

Bug:
Change-Id: Ic55a0f0e351482e470a508dca0b1c097c015628e
Reviewed-on: https://dart-review.googlesource.com/20201
Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
Morten Krogh-Jespersen 2017-11-10 19:25:24 +00:00 committed by Morten Krogh-jespersen
parent cb499c92c3
commit d42c44069a
2 changed files with 7 additions and 6 deletions

View file

@ -2,7 +2,7 @@
// 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
// OtherResources=fixed_length_file_invalid_arguments
import "dart:async";
import "dart:io";
@ -11,7 +11,7 @@ import "package:async_helper/async_helper.dart";
import "package:expect/expect.dart";
void testReadInvalidArgs(arg) {
String filename = getFilename("fixed_length_file");
String filename = getFilename("fixed_length_file_invalid_arguments");
var file = (new File(filename)).openSync();
Expect.throws(() => file.readSync(arg), (e) => e is ArgumentError);
@ -20,7 +20,7 @@ void testReadInvalidArgs(arg) {
}
void testReadIntoInvalidArgs(buffer, start, end) {
String filename = getFilename("fixed_length_file");
String filename = getFilename("fixed_length_file_invalid_arguments");
var file = (new File(filename)).openSync();
Expect.throws(
() => file.readIntoSync(buffer, start, end), (e) => e is ArgumentError);
@ -31,7 +31,7 @@ void testReadIntoInvalidArgs(buffer, start, end) {
}
void testWriteByteInvalidArgs(value) {
String filename = getFilename("fixed_length_file");
String filename = getFilename("fixed_length_file_invalid_arguments");
var file = (new File("${filename}_out")).openSync(mode: FileMode.WRITE);
Expect.throws(() => file.writeByteSync(value), (e) => e is ArgumentError);
@ -40,7 +40,7 @@ void testWriteByteInvalidArgs(value) {
}
void testWriteFromInvalidArgs(buffer, start, end) {
String filename = getFilename("fixed_length_file");
String filename = getFilename("fixed_length_file_invalid_arguments");
var file = (new File("${filename}_out")).openSync(mode: FileMode.WRITE);
Expect.throws(
() => file.writeFromSync(buffer, start, end), (e) => e is ArgumentError);
@ -51,7 +51,7 @@ void testWriteFromInvalidArgs(buffer, start, end) {
}
void testWriteStringInvalidArgs(string, encoding) {
String filename = getFilename("fixed_length_file");
String filename = getFilename("fixed_length_file_invalid_arguments");
var file = new File("${filename}_out").openSync(mode: FileMode.WRITE);
Expect.throws(() => file.writeStringSync(string, encoding: encoding),
(e) => e is ArgumentError);

View file

@ -0,0 +1 @@
This file should contain exactly 42 bytes.