Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
64c69e63
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看板
提交
64c69e63
编写于
6月 08, 2022
作者:
L
luffy505
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add ACE ets testSuits
Signed-off-by:
N
luffy505
<
zhangjuan54@huawei.com
>
上级
74e6930c
变更
22
显示空白变更内容
内联
并排
Showing
22 changed file
with
82 addition
and
80 deletion
+82
-80
ace/ace_ets_component/entry/src/main/config.json
ace/ace_ets_component/entry/src/main/config.json
+1
-1
ace/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets
...omponent/entry/src/main/ets/MainAbility/pages/ellipse.ets
+2
-2
ace/ace_ets_component/entry/src/main/ets/MainAbility/test/EllipseJsunit.test.ets
...ntry/src/main/ets/MainAbility/test/EllipseJsunit.test.ets
+4
-4
ace/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets
...ry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets
+1
-1
ace/ace_ets_component_five/entry/src/main/config.json
ace/ace_ets_component_five/entry/src/main/config.json
+1
-1
ace/ace_ets_component_four/entry/src/main/config.json
ace/ace_ets_component_four/entry/src/main/config.json
+1
-1
ace/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets
...ponent_four/entry/src/main/ets/MainAbility/pages/path.ets
+2
-2
ace/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PathJsunit.test.ets
...r/entry/src/main/ets/MainAbility/test/PathJsunit.test.ets
+2
-2
ace/ace_ets_component_three/entry/src/main/config.json
ace/ace_ets_component_three/entry/src/main/config.json
+1
-1
ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets
...entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets
+2
-0
ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/CommonJsunit.test.ets
...entry/src/main/ets/MainAbility/test/CommonJsunit.test.ets
+52
-51
ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SpanJsunit.test.ets
...e/entry/src/main/ets/MainAbility/test/SpanJsunit.test.ets
+1
-1
ace/ace_ets_component_two/entry/src/main/config.json
ace/ace_ets_component_two/entry/src/main/config.json
+1
-1
ace/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets
.../entry/src/main/ets/MainAbility/pages/loadingProgress.ets
+1
-0
ace/ace_ets_component_two/entry/src/main/ets/MainAbility/test/LoadingProgressJsunit.test.ets
.../main/ets/MainAbility/test/LoadingProgressJsunit.test.ets
+1
-1
ace/ace_ets_standard/entry/src/main/config.json
ace/ace_ets_standard/entry/src/main/config.json
+1
-1
ace/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets
...ts_standard/entry/src/main/ets/MainAbility/pages/Text.ets
+4
-5
ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets
...d/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets
+0
-1
ace/ace_ets_test/entry/src/main/config.json
ace/ace_ets_test/entry/src/main/config.json
+1
-1
ace/ace_ets_third_test/entry/src/main/config.json
ace/ace_ets_third_test/entry/src/main/config.json
+1
-1
ace/ace_standard/src/main/config.json
ace/ace_standard/src/main/config.json
+1
-1
ace/ace_standard_video/src/main/config.json
ace/ace_standard_video/src/main/config.json
+1
-1
未找到文件。
ace/ace_ets_component/entry/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -9,7 +9,7 @@
"apiVersion"
:
{
"compatible"
:
7
,
"releaseType"
:
"Release"
,
"target"
:
7
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_ets_component/entry/src/main/ets/MainAbility/pages/ellipse.ets
浏览文件 @
64c69e63
...
...
@@ -19,8 +19,8 @@ import events_emitter from '@ohos.emitter';
@Entry
@Component
struct EllipseExample {
@State width: string = "200px";
@State height: string = "200px";
@State width: string = "200
.00
px";
@State height: string = "200
.00
px";
onPageShow() {
console.info('[ellipse] page show called');
...
...
ace/ace_ets_component/entry/src/main/ets/MainAbility/test/EllipseJsunit.test.ets
浏览文件 @
64c69e63
...
...
@@ -115,7 +115,7 @@ export default function ellipseJsunit() {
try {
var eventData = {
data: {
"width": '1111111111111'
"width": '1111111111111
.00px
'
}
}
var innerEvent = {
...
...
@@ -141,7 +141,7 @@ export default function ellipseJsunit() {
try {
var eventData = {
data: {
"height": '12111111111111'
"height": '12111111111111
.00px
'
}
}
var innerEvent = {
...
...
@@ -167,7 +167,7 @@ export default function ellipseJsunit() {
try {
var eventData = {
data: {
"height": '-40'
"height": '-40
.00px
'
}
}
var innerEvent = {
...
...
@@ -193,7 +193,7 @@ export default function ellipseJsunit() {
try {
var eventData = {
data: {
"width": '-10'
"width": '-10
.00px
'
}
}
var innerEvent = {
...
...
ace/ace_ets_component/entry/src/main/ets/MainAbility/test/TouchAbleJsunit.test.ets
浏览文件 @
64c69e63
...
...
@@ -51,7 +51,7 @@ export default function touchAbleJsunit() {
let strJson = getInspectorByKey('ellipse');
let obj = JSON.parse(strJson);
console.info("[testTouchAble001] component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.focusable).assertEqual(
tru
e);
expect(obj.$attrs.focusable).assertEqual(
fals
e);
done();
});
...
...
ace/ace_ets_component_five/entry/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -9,7 +9,7 @@
"apiVersion"
:
{
"compatible"
:
7
,
"releaseType"
:
"Release"
,
"target"
:
7
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_ets_component_four/entry/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -9,7 +9,7 @@
"apiVersion"
:
{
"compatible"
:
7
,
"releaseType"
:
"Release"
,
"target"
:
7
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_ets_component_four/entry/src/main/ets/MainAbility/pages/path.ets
浏览文件 @
64c69e63
...
...
@@ -20,8 +20,8 @@ import events_emitter from '@ohos.emitter'
@Component
struct PathExample {
@State commandsOne: string = 'M0 0 L900 0'
@State widthOne:
number = 300
@State heightOne:
number = 10
@State widthOne:
string = '300.00px'
@State heightOne:
string = '10.00px'
onPageShow() {
...
...
ace/ace_ets_component_four/entry/src/main/ets/MainAbility/test/PathJsunit.test.ets
浏览文件 @
64c69e63
...
...
@@ -63,9 +63,9 @@ export default function enableJsunit() {
try {
var eventData = {
data: {
"height":
200
,
"height":
'200.00px'
,
"commands": "M0 110 L900 0",
"width":
200
,
"width":
'200.00px'
,
}
}
var innerEvent = {
...
...
ace/ace_ets_component_three/entry/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -9,7 +9,7 @@
"apiVersion"
:
{
"compatible"
:
7
,
"releaseType"
:
"Release"
,
"target"
:
7
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/ButtonJsunit.test.ets
浏览文件 @
64c69e63
...
...
@@ -299,6 +299,8 @@ export default function buttonJsunit() {
console.info("[testButton12] get event state result is: " + JSON.stringify(eventData));
expect(eventData.data.ACTION).assertEqual(true)
let event = JSON.parse(eventData.data.event);
console.info("[testButton12] get event state result is: " + Math.trunc(event.screenY));
console.info("[testButton12] get event state result is: " + Math.trunc(event.screenX));
expect(event.screenX).assertEqual(135)
expect(event.screenY).assertEqual(368.80340576171875)
expect(event.x).assertEqual(100)
...
...
ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/CommonJsunit.test.ets
浏览文件 @
64c69e63
...
...
@@ -14,25 +14,59 @@
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import display from '@ohos.display';
import Utils from './Utils';
export default function commonJsunit() {
describe('commonTest', function () {
var dpiValue;
beforeAll(async function (done) {
console.info("commonJsunit beforeEach start");
await display.getDefaultDisplay().then(dsp => {
console.info('getDefaultDisplay id : ' + JSON.stringify(dsp));
dpiValue = dsp.densityDPI;
console.info('getDefaultDisplay dpiValue is : ' + JSON.stringify(dpiValue));
Utils.sleep(2000);
}, (err) => {
console.info('getDefaultDisplay failed, err :' + JSON.stringify(err));
})
done()
});
it('commonTest_0100', 0, async function (done) {
console.info('commonTest_0100 START');
display.getDefaultDisplay().then(dsp => {
console.info('getDefaultDisplay id : ' + JSON.stringify(dsp));
dpiValue = dsp.densityDPI;
setTimeout(() => {
console.info('commonTest_0100 START' + dpiValue);
}, 2000)
}, (err) => {
console.info('getDefaultDisplay failed, err :' + JSON.stringify(err));
})
console.info('commonTest_0100 START' + dpiValue);
var a = 90;
var ret = a * (dpiValue/160);
var b = vp2px(a);
console.info('commonTest_0100 vp2px result:' + b);
expect(b == 90).assertTrue();
console.info('commonTest_0100 vp2px result:' + ret);
expect(b == ret).assertTrue();
console.info('commonTest_0100 END');
done();
});
it('commonTest_0200', 0, async function (done) {
console.info('commonTest_0200 START');
console.info('commonTest_0200 START'
+ dpiValue
);
var a = -90;
var ret = a * (dpiValue/160);
var b = vp2px(a);
console.info('commonTest_0200 vp2px result:' + b);
expect(b == -90).assertTrue();
console.info('commonTest_0200 vp2px result:' + ret);
expect(b == ret).assertTrue();
console.info('commonTest_0200 END');
done();
});
...
...
@@ -50,9 +84,10 @@ export default function commonJsunit() {
it('commonTest_0400', 0, async function (done) {
console.info('commonTest_0400 START');
var a = 80;
var ret = a / (dpiValue/160);
var b = px2vp(a);
console.info('commonTest_0400 px2vp result:' + b);
expect(b ==
80
).assertTrue();
expect(b ==
ret
).assertTrue();
console.info('commonTest_0400 END');
done();
});
...
...
@@ -60,9 +95,10 @@ export default function commonJsunit() {
it('commonTest_0500', 0, async function (done) {
console.info('commonTest_0500 START');
var a = -800000000;
var ret = a / (dpiValue/160);
var b = px2vp(a);
console.info('commonTest_0500 px2vp result:' + b);
expect(b ==
-800000000
).assertTrue();
expect(b ==
ret
).assertTrue();
console.info('commonTest_0500 END');
done();
});
...
...
@@ -80,19 +116,21 @@ export default function commonJsunit() {
it('commonTest_0700', 0, async function (done) {
console.info('commonTest_0700 START');
var a = 70;
var ret = a * (dpiValue/160);
var b = fp2px(a);
console.info('commonTest_0700 fp2px result:' + b);
expect(b ==
70
).assertTrue();
expect(b ==
ret
).assertTrue();
console.info('commonTest_0700 END');
done();
});
it('commonTest_0800', 0, async function (done) {
console.info('commonTest_0800 START');
var a = -7000000000000;
var a = -70;
var ret = a * (dpiValue/160);
var b = fp2px(a);
console.info('commonTest_0800 fp2px result:' + b);
expect(b ==
-2147483648
).assertTrue();
expect(b ==
ret
).assertTrue();
console.info('commonTest_0800 END');
done();
});
...
...
@@ -110,19 +148,21 @@ export default function commonJsunit() {
it('commonTest_1000', 0, async function (done) {
console.info('commonTest_1000 START');
var a = 60;
var ret = a / (dpiValue/160);
var b = px2fp(a);
console.info('commonTest_1000 px2fp result:' + b);
expect(b ==
60
).assertTrue();
expect(b ==
ret
).assertTrue();
console.info('commonTest_1000 END');
done();
});
it('commonTest_1100', 0, async function (done) {
console.info('commonTest_1100 START');
var a = -6000000000;
var a = -60;
var ret = a / (dpiValue/160);
var b = px2fp(a);
console.info('commonTest_1100 px2fp result:' + b);
expect(b ==
-6000000000
).assertTrue();
expect(b ==
ret
).assertTrue();
console.info('commonTest_1100 END');
done();
});
...
...
@@ -137,25 +177,6 @@ export default function commonJsunit() {
done();
});
it('commonTest_1300', 0, async function (done) {
console.info('commonTest_1300 START');
var a = 50;
var b = lpx2px(a);
console.info('commonTest_1300 lpx2px result:' + b);
expect(b == 50).assertTrue();
console.info('commonTest_1300 END');
done();
});
it('commonTest_1400', 0, async function (done) {
console.info('commonTest_1400 START');
var a = -500000000;
var b = lpx2px(a);
console.info('commonTest_1400 lpx2px result:' + b);
expect(b == -500000000).assertTrue();
console.info('commonTest_1400 END');
done();
});
it('commonTest_1500', 0, async function (done) {
console.info('commonTest_1500 START');
...
...
@@ -167,26 +188,6 @@ export default function commonJsunit() {
done();
});
it('commonTest_1600', 0, async function (done) {
console.info('commonTest_1600 START');
var a = 40;
var b = px2lpx(a);
console.info('commonTest_1600 px2lpx result:' + b);
expect(b == 40).assertTrue();
console.info('commonTest_1600 END');
done();
});
it('commonTest_1700', 0, async function (done) {
console.info('commonTest_1700 START');
var a = -400000;
var b = px2lpx(a);
console.info('commonTest_1700 px2lpx result:' + b);
expect(b == -400000).assertTrue();
console.info('commonTest_1700 END');
done();
});
it('commonTest_1800', 0, async function (done) {
console.info('commonTest_1800 START');
var a = '40';
...
...
ace/ace_ets_component_three/entry/src/main/ets/MainAbility/test/SpanJsunit.test.ets
浏览文件 @
64c69e63
...
...
@@ -231,7 +231,7 @@ export default function spanJsunit() {
console.info("[testSpan009] component strJson:" + strJson);
let obj = JSON.parse(strJson);
console.info("[testSpan009] fontColor:" + obj);
expect(obj.$attrs.fontColor).assertEqual('#FF
FFFFFF
');
expect(obj.$attrs.fontColor).assertEqual('#FF
000000
');
done();
});
})
...
...
ace/ace_ets_component_two/entry/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -9,7 +9,7 @@
"apiVersion"
:
{
"compatible"
:
7
,
"releaseType"
:
"Release"
,
"target"
:
7
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_ets_component_two/entry/src/main/ets/MainAbility/pages/loadingProgress.ets
浏览文件 @
64c69e63
...
...
@@ -44,6 +44,7 @@ struct LoadingProgressExample {
Text('Orbital LoadingProgress ')
.fontSize(19)
.fontColor(0xCCCCCC)
.height(50)
.width('90%')
.key('LP')
LoadingProgress()
...
...
ace/ace_ets_component_two/entry/src/main/ets/MainAbility/test/LoadingProgressJsunit.test.ets
浏览文件 @
64c69e63
...
...
@@ -72,7 +72,7 @@ export default function loadingProgressJsunit() {
let strJson = getInspectorByKey('LP');
let obj = JSON.parse(strJson);
console.info("testLoadingProgress_300 component obj is: " + JSON.stringify(obj));
expect(obj.$attrs.height).assertEqual("
22.000000
");
expect(obj.$attrs.height).assertEqual("
50.00px
");
console.info('testLoadingProgress_300 END');
done();
});
...
...
ace/ace_ets_standard/entry/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -9,7 +9,7 @@
"apiVersion"
:
{
"compatible"
:
7
,
"releaseType"
:
"Release"
,
"target"
:
7
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_ets_standard/entry/src/main/ets/MainAbility/pages/Text.ets
浏览文件 @
64c69e63
...
...
@@ -126,10 +126,9 @@ struct text_textcase {
.enabled(this.enabled)
.zIndex(this.zIndex)
.fontColor(this.fontColor)
.fontSize(this.fontSize)
.minFontSize(this.minFontSize)
.letterSpacing(this.letterSpacing)
.maxFontSize(this.maxFontSize)
.fontSize(15)
.minFontSize(15)
.maxFontSize(15)
.fontWeight(this.fontWeight)
.fontStyle(this.fontStyle)
.fontFamily("sans-serif")
...
...
ace/ace_ets_standard/entry/src/main/ets/MainAbility/test/TextJsunit.test.ets
浏览文件 @
64c69e63
...
...
@@ -96,7 +96,6 @@ export default function textJsunit() {
console.log("cd text visibility" + JSON.stringify(obj.$attrs.visibility));
console.log("cd text fontSize" + JSON.stringify(obj.$attrs.fontSize));
console.log("cd text minFontSize" + JSON.stringify(obj.$attrs.minFontSize));
console.log("cd text letterSpacing" + JSON.stringify(obj.$attrs.letterSpacing));
console.log("cd text maxFontSize" + JSON.stringify(obj.$attrs.maxFontSize));
console.log("cd text fontWeight" + JSON.stringify(obj.$attrs.fontWeight));
console.log("cd text fontStyle" + JSON.stringify(obj.$attrs.fontStyle));
...
...
ace/ace_ets_test/entry/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -9,7 +9,7 @@
"apiVersion"
:
{
"compatible"
:
7
,
"releaseType"
:
"Release"
,
"target"
:
7
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_ets_third_test/entry/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -9,7 +9,7 @@
"apiVersion"
:
{
"compatible"
:
7
,
"releaseType"
:
"Release"
,
"target"
:
7
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_standard/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -8,7 +8,7 @@
},
"apiVersion"
:
{
"compatible"
:
4
,
"target"
:
5
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
ace/ace_standard_video/src/main/config.json
浏览文件 @
64c69e63
...
...
@@ -8,7 +8,7 @@
},
"apiVersion"
:
{
"compatible"
:
4
,
"target"
:
5
"target"
:
8
}
},
"deviceConfig"
:
{},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录