提交 4646aa52 authored 作者: Thomas Mueller's avatar Thomas Mueller

Improve code coverage.

上级 baf8e4ca
......@@ -46,7 +46,7 @@ public class FileObjectDisk extends RandomAccessFile implements FileObject {
}
public String getName() {
return name.replace('\\', '/');
return name;
}
public synchronized boolean tryLock() {
......
......@@ -42,7 +42,7 @@ public class FileObjectDiskChannel implements FileObject {
}
public String getName() {
return FileSystemDiskNio.PREFIX + name.replace('\\', '/');
return FileSystemDiskNio.PREFIX + name;
}
public long length() throws IOException {
......
......@@ -130,7 +130,7 @@ public class FileObjectDiskMapped implements FileObject {
}
public String getName() {
return FileSystemDiskNioMapped.PREFIX + name.replace('\\', '/');
return FileSystemDiskNioMapped.PREFIX + name;
}
public long length() throws IOException {
......
......@@ -176,9 +176,9 @@ public class TestFileSystem extends TestBase {
} catch (EOFException e) {
// expected
}
assertEquals(fsBase + "/test", fo.getName());
assertEquals(fsBase + "/test", fo.getName().replace('\\', '/'));
assertEquals("test", fs.getFileName(fo.getName()));
assertEquals(fsBase, fs.getParent(fo.getName()));
assertEquals(fsBase, fs.getParent(fo.getName()).replace('\\', '/'));
fo.tryLock();
fo.releaseLock();
fo.close();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论