Lines Matching defs:fail
72 if (!f.exists()) fail(f, "does not exist");
73 if (!f.isFile()) fail(f, "is not a file");
74 if (f.isDirectory()) fail(f, "is a directory");
75 if (!f.canRead()) fail(f, "is not readable");
77 fail(f, writeable ? "is not writeable" : "is writeable");
79 if (f.length() != length) fail(f, "has wrong length");
82 static void fail(File f, String why) throws Exception {
89 if (nonExistantFile.exists()) fail(nonExistantFile, "exists");
95 fail(rwFile, "could not delete");
101 if (!thisDir.exists()) fail(thisDir, "does not exist");
102 if (thisDir.isFile()) fail(thisDir, "is a file");
103 if (!thisDir.isDirectory()) fail(thisDir, "is not a directory");
104 if (!thisDir.canRead()) fail(thisDir, "is readable");
105 if (!thisDir.canWrite()) fail(thisDir, "is writeable");
107 if (fs == null) fail(thisDir, "list() returned null");
112 if (fs.length == 0) fail(thisDir, "is empty");
115 fail(nonExistantFile, "could not create");
119 fail(nonDir, "could not create");
122 fail(dir, "failed to rename");
129 fail(bigFile, "could not delete");
143 fail(bigFile, "could not delete");