Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ee34753d
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ee34753d
编写于
12月 08, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 08, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6864 【回合monthly】【file_api】修改stat.ino类型判断为BigInt
Merge pull request !6864 from zhuhongtao666/cherry-pick-1670486745
上级
7e77c36e
1f2eaf26
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
12 deletion
+17
-12
storage/storagefileiojstest/src/main/js/test/Common.js
storage/storagefileiojstest/src/main/js/test/Common.js
+5
-0
storage/storagefileiojstest/src/main/js/test/FileIOStat.test.js
...e/storagefileiojstest/src/main/js/test/FileIOStat.test.js
+3
-3
storage/storagefileiojstest/src/main/js/test/module_fileio/members/fstat.test.js
...test/src/main/js/test/module_fileio/members/fstat.test.js
+3
-3
storage/storagefileiojstest/src/main/js/test/module_fileio/members/lstat.test.js
...test/src/main/js/test/module_fileio/members/lstat.test.js
+3
-3
storage/storagefileiojstest/src/main/js/test/module_fileio/members/stat.test.js
...stest/src/main/js/test/module_fileio/members/stat.test.js
+3
-3
未找到文件。
storage/storagefileiojstest/src/main/js/test/Common.js
浏览文件 @
ee34753d
...
...
@@ -112,6 +112,10 @@ function isIntNum(val) {
return
typeof
val
===
'
number
'
&&
val
%
1
===
0
;
}
function
isBigInt
(
val
)
{
return
typeof
val
===
'
bigint
'
;
}
function
isString
(
str
)
{
return
(
typeof
str
==
'
string
'
)
&&
str
.
constructor
==
String
;
}
...
...
@@ -127,6 +131,7 @@ function isInclude(error, message) {
export
{
fileio
,
isIntNum
,
isBigInt
,
isString
,
isBoolean
,
isInclude
,
...
...
storage/storagefileiojstest/src/main/js/test/FileIOStat.test.js
浏览文件 @
ee34753d
...
...
@@ -130,16 +130,16 @@ describe('fileIOTestStat', function () {
/**
* @tc.number SUB_STORAGE_FileIO_Stat_ino_0000
* @tc.name fileio_test_stat_ino_000
* @tc.desc Function of API. Get inode
number
.
* @tc.desc Function of API. Get inode
bigint
.
*/
it
(
'
fileio_test_stat_ino_000
'
,
0
,
async
function
()
{
let
fpath
=
await
nextFileName
(
'
fileio_test_stat_ino_000
'
);
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
try
{
let
stat
=
fileio
.
statSync
(
fpath
);
expect
(
typeof
(
stat
.
ino
)
==
'
number
'
).
assertTrue
();
expect
(
typeof
(
stat
.
ino
)
==
'
bigint
'
).
assertTrue
();
fileio
.
unlinkSync
(
fpath
);
}
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_stat_ino_000 has failed for
'
+
e
);
expect
(
null
).
assertFail
();
...
...
storage/storagefileiojstest/src/main/js/test/module_fileio/members/fstat.test.js
浏览文件 @
ee34753d
...
...
@@ -14,7 +14,7 @@
*/
import
{
fileio
,
FILE_CONTENT
,
prepareFile
,
nextFileName
,
isIntNum
,
isBoolean
,
fileio
,
FILE_CONTENT
,
prepareFile
,
nextFileName
,
isIntNum
,
isB
igInt
,
isB
oolean
,
describe
,
it
,
expect
,
}
from
'
../../Common
'
;
...
...
@@ -107,7 +107,7 @@ describe('fileio_fstat', function () {
try
{
let
fd
=
fileio
.
openSync
(
fpath
);
let
stat
=
fileio
.
fstatSync
(
fd
);
expect
(
is
IntNum
(
stat
.
ino
)).
assertTrue
();
expect
(
is
BigInt
(
stat
.
ino
)).
assertTrue
();
expect
(
fileio
.
closeSync
(
fd
)
==
null
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
();
}
catch
(
e
)
{
...
...
@@ -1043,7 +1043,7 @@ describe('fileio_fstat', function () {
try
{
let
fd
=
fileio
.
openSync
(
fpath
);
let
stat
=
await
fileio
.
fstat
(
fd
);
expect
(
is
IntNum
(
stat
.
ino
)).
assertTrue
();
expect
(
is
BigInt
(
stat
.
ino
)).
assertTrue
();
expect
(
fileio
.
closeSync
(
fd
)
==
null
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
();
done
();
...
...
storage/storagefileiojstest/src/main/js/test/module_fileio/members/lstat.test.js
浏览文件 @
ee34753d
...
...
@@ -14,7 +14,7 @@
*/
import
{
fileio
,
FILE_CONTENT
,
prepareFile
,
nextFileName
,
isIntNum
,
isBoolean
,
fileio
,
FILE_CONTENT
,
prepareFile
,
nextFileName
,
isIntNum
,
isB
igInt
,
isB
oolean
,
describe
,
it
,
expect
,
}
from
'
../../Common
'
;
...
...
@@ -103,7 +103,7 @@ describe('fileio_lstat', function () {
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
try
{
let
stat
=
fileio
.
lstatSync
(
fpath
);
expect
(
is
IntNum
(
stat
.
ino
)).
assertTrue
();
expect
(
is
BigInt
(
stat
.
ino
)).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_lstat_ino_000 has failed for
'
+
e
);
...
...
@@ -992,7 +992,7 @@ describe('fileio_lstat', function () {
try
{
let
stat
=
await
fileio
.
lstat
(
fpath
);
expect
(
is
IntNum
(
stat
.
ino
)).
assertTrue
();
expect
(
is
BigInt
(
stat
.
ino
)).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
();
done
();
}
catch
(
e
)
{
...
...
storage/storagefileiojstest/src/main/js/test/module_fileio/members/stat.test.js
浏览文件 @
ee34753d
...
...
@@ -14,7 +14,7 @@
*/
import
{
fileio
,
FILE_CONTENT
,
prepareFile
,
nextFileName
,
isIntNum
,
isBoolean
,
fileio
,
FILE_CONTENT
,
prepareFile
,
nextFileName
,
isIntNum
,
isB
igInt
,
isB
oolean
,
describe
,
it
,
expect
,
}
from
'
../../Common
'
;
...
...
@@ -106,7 +106,7 @@ describe('fileio_stat', function () {
try
{
let
stat
=
fileio
.
statSync
(
fpath
);
expect
(
is
IntNum
(
stat
.
ino
)).
assertTrue
();
expect
(
is
BigInt
(
stat
.
ino
)).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_stat_sync_ino_000 has failed for
'
+
e
);
...
...
@@ -985,7 +985,7 @@ describe('fileio_stat', function () {
try
{
let
stat
=
await
fileio
.
stat
(
fpath
);
expect
(
is
IntNum
(
stat
.
ino
)).
assertTrue
();
expect
(
is
BigInt
(
stat
.
ino
)).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
();
done
();
}
catch
(
e
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录