test/java/io/File/Basic.java
Print this page
@@ -73,11 +73,11 @@
if (!f.isFile()) fail(f, "is not a file");
if (f.isDirectory()) fail(f, "is a directory");
if (!f.canRead()) fail(f, "is not readable");
if (f.canWrite() != writeable)
fail(f, writeable ? "is not writeable" : "is writeable");
- int rwLen = (File.separatorChar == '/' ? 6 : 7);
+ int rwLen = 6;
if (f.length() != length) fail(f, "has wrong length");
}
static void fail(File f, String why) throws Exception {
throw new Exception(f + " " + why);
@@ -87,11 +87,11 @@
show(nonExistantFile);
if (nonExistantFile.exists()) fail(nonExistantFile, "exists");
show(rwFile);
- testFile(rwFile, true, File.separatorChar == '/' ? 6 : 7);
+ testFile(rwFile, true, 6);
rwFile.delete();
if (rwFile.exists())
fail(rwFile, "could not delete");
show(roFile);