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

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

Issue 10414002: More String + elimination in tests (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/file_test.dart » ('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
===================================================================
--- tests/standalone/io/file_invalid_arguments_test.dart (revision 7745)
+++ tests/standalone/io/file_invalid_arguments_test.dart (working copy)
@@ -89,7 +89,7 @@
static void testWriteByteInvalidArgs(value) {
String filename = getFilename("tests/vm/data/fixed_length_file");
- var file = (new File(filename + "_out")).openSync(FileMode.WRITE);
+ var file = (new File(filename.concat("_out"))).openSync(FileMode.WRITE);
siva 2012/05/18 19:56:10 Why do you use concat here and not: new File("${fi
hausner 2012/05/18 21:03:46 No particular reason, it just seemed more readable
try {
file.writeByteSync(value);
Expect.fail('exception expected');
@@ -112,7 +112,7 @@
static void testWriteListInvalidArgs(buffer, offset, bytes) {
String filename = getFilename("tests/vm/data/fixed_length_file");
- var file = (new File(filename + "_out")).openSync(FileMode.WRITE);
+ var file = (new File(filename.concat("_out"))).openSync(FileMode.WRITE);
try {
file.writeListSync(buffer, offset, bytes);
Expect.fail('exception expected');
@@ -135,7 +135,7 @@
static void testWriteStringInvalidArgs(string) {
String filename = getFilename("tests/vm/data/fixed_length_file");
- var file = new File(filename + "_out");
+ var file = new File(filename.concat("_out"));
file.openSync(FileMode.WRITE);
try {
file.writeString(string);
@@ -181,7 +181,7 @@
}
static String getFilename(String path) =>
- new File(path).existsSync() ? path : 'runtime/' + path;
+ new File(path).existsSync() ? path : 'runtime/$path';
}
main() {
« no previous file with comments | « tests/standalone/io/file_input_stream_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698