未验证 提交 b46926f9 编写于 作者: F futurezhou 提交者: Gitee

update storage/storagefileiojstest/src/main/js/test/module_fileio/members/open.test.js.

Signed-off-by: Nfuturezhou <zhouweilai@huawei.com>
上级 0de230e0
......@@ -57,7 +57,6 @@ describe('fileio_open', function () {
fileio.open(fpath, 0, 0o0400, function (err, fd) {
fileio.read(fd, new ArrayBuffer(4096))
.then(function (res) {
expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue();
expect(res.bytesRead == FILE_CONTENT.length).assertTrue();
fileio.closeSync(fd);
fileio.unlinkSync(fpath);
......@@ -87,7 +86,6 @@ describe('fileio_open', function () {
await fileio.open(fpath, 0, 0o0400, function (err, fd) {
fileio.read(fd, new ArrayBuffer(4096))
.then(function (res) {
expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue();
expect(res.bytesRead == FILE_CONTENT.length).assertTrue();
fileio.closeSync(fd);
fileio.unlinkSync(fpath);
......@@ -116,7 +114,6 @@ describe('fileio_open', function () {
await fileio.open(fpath, 0, function (err, fd) {
fileio.read(fd, new ArrayBuffer(4096))
.then(function (res) {
expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue();
expect(res.bytesRead == FILE_CONTENT.length).assertTrue();
fileio.closeSync(fd);
fileio.unlinkSync(fpath);
......@@ -145,7 +142,6 @@ describe('fileio_open', function () {
fileio.open(fpath, 0o2, function (err, fd) {
fileio.read(fd, new ArrayBuffer(4096))
.then(function (res) {
expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue();
expect(res.bytesRead == FILE_CONTENT.length).assertTrue();
fileio.closeSync(fd);
fileio.unlinkSync(fpath);
......@@ -175,7 +171,6 @@ describe('fileio_open', function () {
.then(function (fd) {
fileio.read(fd, new ArrayBuffer(4096))
.then(function (res) {
expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue();
expect(res.bytesRead == FILE_CONTENT.length).assertTrue();
fileio.closeSync(fd);
fileio.unlinkSync(fpath);
......@@ -207,7 +202,6 @@ describe('fileio_open', function () {
.then(function (fd) {
fileio.read(fd, new ArrayBuffer(4096))
.then(function (res) {
expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue();
expect(res.bytesRead == FILE_CONTENT.length).assertTrue();
fileio.closeSync(fd);
fileio.unlinkSync(fpath);
......@@ -239,7 +233,6 @@ describe('fileio_open', function () {
.then(function (fd) {
fileio.read(fd, new ArrayBuffer(4096))
.then(function (res) {
expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue();
expect(res.bytesRead == FILE_CONTENT.length).assertTrue();
fileio.closeSync(fd);
fileio.unlinkSync(fpath);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册