提交 f2376058 编写于 作者: G gsl_1234

modified the format of xts

Signed-off-by: Ngsl_1234 <gaoshunli@huawei.com>
上级 7349fae1
......@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// import fileIO from '@ohos.file.fs';
import {
fileio, fileIO, FILE_CONTENT, prepareFile, nextFileName, isIntNum,
describe, it, expect,
......@@ -244,7 +244,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPEN_FILE_ASYNC_0000
* @tc.name fileIO_open_async_000
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -269,7 +269,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPENIO_ASYNC_0010
* @tc.name fileIO_open_async_001
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -277,17 +277,18 @@ import {
*/
it('fileIO_open_async_001', 0, function () {
try {
fileIO.openAsync();
fileIO.open();
expect(null).assertFail();
} catch (e) {
console.log('fileIO_open_async_001 has failed for ' + e.message + ', code: ' + e.code);
expect(e.code == 13900020 && e.message == 'Invalid argument').assertTrue;
}
});
/**
* @tc.number SUB_DF_FILEIO_OPEN_FILE_ASYNC_0020
* @tc.name fileIO_open_async_002
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -312,7 +313,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPEN_FILE_ASYNC_0030
* @tc.name fileIO_open_async_003
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -337,7 +338,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPEN_FILE_ASYNC_0040
* @tc.name fileIO_open_async_004
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -365,7 +366,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPEN_ASYNC_0050
* @tc.name fileIO_open_async_005
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -390,7 +391,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPEN_FILE_ASYNC_0060
* @tc.name fileIO_open_async_006
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -414,7 +415,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPEN_FILE_ASYNC_0070
* @tc.name fileIO_open_async_007
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -439,7 +440,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPEN_FILE_ASYNC_0080
* @tc.name fileIO_open_async_007
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -464,7 +465,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_OPENIO_ASYNC_0090
* @tc.name fileIO_open_async_009
* @tc.desc Test openAsync() interfaces.
* @tc.desc Test open() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -475,7 +476,7 @@ import {
expect(prepareFile(fpath, FILE_CONTENT)).assertTrue();
try {
fileIO.open(fpath, 0o102, function (err,file) {
fileIO.open(fpath, 0o102, function (err, file) {
console.info('fileIO_open_async_009, fd: ' + file.fd);
expect(isIntNum(file.fd)).assertTrue();
expect(fileio.unlinkSync(fpath) == null).assertTrue();
......
......@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// import fileIO from '@ohos.file.fs';
import {
fileio, fileIO, FILE_CONTENT, prepareFile, nextFileName, isIntNum,
describe, it, expect,
......@@ -184,7 +184,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_READ_ASYNC_0000
* @tc.name fileIO_test_read_async_000
* @tc.desc Test readAsync() interfaces.
* @tc.desc Test read() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -211,7 +211,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_READ_ASYNC_0010
* @tc.name fileIO_test_read_async_001
* @tc.desc Test readAsync() interfaces.
* @tc.desc Test read() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -239,7 +239,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_READ_ASYNC_0020
* @tc.name fileIO_test_read_async_002
* @tc.desc Test readAsync() interfaces.
* @tc.desc Test read() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -266,7 +266,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_READ_ASYNC_0030
* @tc.name fileIO_test_read_async_003
* @tc.desc Test readAsync() interfaces.
* @tc.desc Test read() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -295,7 +295,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_READ_ASYNC_0040
* @tc.name fileIO_test_read_async_004
* @tc.desc Test readAsync() interface.
* @tc.desc Test read() interface.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -324,7 +324,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_READ_ASYNC_0050
* @tc.name fileIO_test_read_async_005
* @tc.desc Test readAsync() interfaces.
* @tc.desc Test read() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -353,7 +353,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_READ_ASYNC_0060
* @tc.name fileIO_test_read_async_006
* @tc.desc Test readAsync() interfaces.
* @tc.desc Test read() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -369,6 +369,5 @@ import {
done();
}
});
});
}
......@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// import fileIO from '@ohos.file.fs';
import {
fileio, fileIO, FILE_CONTENT, prepareFile, nextFileName, isIntNum,
describe, it, expect,
......@@ -24,7 +24,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_ASYNC_0000
* @tc.name fileIO_truncate_async_000
* @tc.desc Test the truncateAsync() interface that receives the fpath parameter.
* @tc.desc Test the truncate() interface that receives the fpath parameter.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -53,7 +53,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_ASYNC_0010
* @tc.name fileIO_truncate_async_001
* @tc.desc Test the truncateAsync() interface that receives the fd parameter.
* @tc.desc Test the truncate() interface that receives the fd parameter.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -83,7 +83,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_ASYNC_0020
* @tc.name fileIO_truncate_async_002
* @tc.desc Test the truncateAsync() interface that receives the fpath parameter.
* @tc.desc Test the truncate() interface that receives the fpath parameter.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -119,7 +119,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_ASYNC_0030
* @tc.name fileIO_truncate_async_003
* @tc.desc Test the truncateAsync() interface that receives the fd parameter.
* @tc.desc Test the truncate() interface that receives the fd parameter.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -154,7 +154,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_ASYNC_0040
* @tc.name fileIO_truncate_async_004
* @tc.desc Test the truncateAsync() interface that receives the fpath parameter.
* @tc.desc Test the truncate() interface that receives the fpath parameter.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -200,7 +200,7 @@ import {
});
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0000
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0010
* @tc.name fileIO_test_truncate_sync_001
* @tc.desc Test the truncateSync() interface that receives the fd parameter.
* @tc.size MEDIUM
......@@ -228,7 +228,7 @@ import {
});
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0010
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0020
* @tc.name fileIO_test_truncate_sync_002
* @tc.desc Test the truncateSync() interface that receives the fpath parameter.
* @tc.size MEDIUM
......@@ -249,7 +249,7 @@ import {
});
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0010
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0030
* @tc.name fileIO_test_truncate_sync_003
* @tc.desc Test the truncateSync() interface that receives the fd parameter.
* @tc.size MEDIUM
......@@ -276,7 +276,7 @@ import {
});
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0020
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0040
* @tc.name fileIO_test_truncate_sync_004
* @tc.desc Test truncateSync() interfaces.
* @tc.size MEDIUM
......@@ -294,8 +294,8 @@ import {
});
/**
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0020
* @tc.name fileio_test_truncate_sync_v9_005
* @tc.number SUB_DF_FILEIO_TRUNCATE_SYNC_0050
* @tc.name fileio_test_truncate_sync_005
* @tc.desc Test truncateSync() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
......@@ -312,7 +312,6 @@ import {
expect(!!e).assertTrue();
}
});
});
}
......@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// import fileIO from '@ohos.file.fs';
import {
fileio, fileIO, FILE_CONTENT, nextFileName, isIntNum,
describe, it, expect,
......@@ -205,7 +205,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_WRITE_ASYNC_0000
* @tc.name fileIO_test_write_async_000
* @tc.desc Test writeAsync() interfaces.
* @tc.desc Test write() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -230,7 +230,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_WRITE_ASYNC_0010
* @tc.name fileIO_test_write_async_001
* @tc.desc Test writeAsync() interfaces.
* @tc.desc Test write() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -258,7 +258,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_WRITE_ASYNC_0020
* @tc.name fileIO_test_write_async_002
* @tc.desc Test writeAsync() interfaces.
* @tc.desc Test write() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -287,7 +287,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_WRITE_ASYNC_0030
* @tc.name fileIO_test_write_async_003
* @tc.desc Test writeAsync() interfaces.
* @tc.desc Test write() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -317,7 +317,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_WRITE_ASYNC_0040
* @tc.name fileIO_test_write_async_004
* @tc.desc Test writeAsync() interfaces.
* @tc.desc Test write() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -336,7 +336,8 @@ import {
expect(bytesWritten == 4096).assertTrue();
expect(fileio.closeSync(fd) == null).assertTrue();
expect(fileio.unlinkSync(fpath) == null).assertTrue();
});
}
);
done();
} catch (e) {
console.log('fileIO_test_write_async_004 has failed for ' + e.message + ', code: ' + e.code);
......@@ -347,7 +348,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_WRITE_ASYNC_0050
* @tc.name fileIO_test_write_async_005
* @tc.desc Test writeAsync() interfaces.
* @tc.desc Test write() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -380,7 +381,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_WRITE_ASYNC_0060
* @tc.name fileIO_test_write_async_006
* @tc.desc Test writeAsync() interfaces.
* @tc.desc Test write() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -414,7 +415,7 @@ import {
/**
* @tc.number SUB_DF_FILEIO_WRITE_ASYNC_0070
* @tc.name fileIO_test_write_async_007
* @tc.desc Test writeAsync() interfaces.
* @tc.desc Test write() interfaces.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
......@@ -445,7 +446,5 @@ import {
expect(null).assertFail();
}
});
});
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册