未验证 提交 a85b8ff5 编写于 作者: O openharmony_ci 提交者: Gitee

!8328 【ACE子系统】修改layout测试用例

Merge pull request !8328 from hekun/master
......@@ -81,7 +81,7 @@ export default function flex_AlignContent_SpaceBetween_TextOffsetTest() {
expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首贴边行尾溢出
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom));
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(distanceBefore);
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(distanceBefore));
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1000] END');//其余组件行间距相等,未改变
done();
});
......
......@@ -110,7 +110,7 @@ export default function AlignCenter_AddLayoutWeight() {
expect(Center_AddLayoutWeight_013.right).assertEqual(Center_AddLayoutWeight_01.right);
let oneWidth = Math.round(Center_AddLayoutWeight_011.right - Center_AddLayoutWeight_011.left);
let twoWidth = Math.round(Center_AddLayoutWeight_012.right - Center_AddLayoutWeight_012.left);
expect(twoWidth / oneWidth).assertEqual(2);
expect(Math.round(twoWidth / oneWidth)).assertEqual(2);
expect(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(Math.round(Center_AddLayoutWeight_013.right - Center_AddLayoutWeight_013.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddLayoutWeight_011.bottom - Center_AddLayoutWeight_011.top)).assertEqual(vp2px(50));
......
......@@ -110,7 +110,7 @@ export default function AlignEnd_AddLayoutWeight() {
expect(End_AddLayoutWeight_013.right).assertEqual(End_AddLayoutWeight_01.right);
let oneWidth = Math.round(End_AddLayoutWeight_011.right - End_AddLayoutWeight_011.left);
let twoWidth = Math.round(End_AddLayoutWeight_012.right - End_AddLayoutWeight_012.left);
expect(twoWidth / oneWidth).assertEqual(2);
expect(Math.round(twoWidth / oneWidth)).assertEqual(2);
expect(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(Math.round(End_AddLayoutWeight_013.right - End_AddLayoutWeight_013.left)).assertEqual(vp2px(150));
expect(Math.round(End_AddLayoutWeight_011.bottom - End_AddLayoutWeight_011.top)).assertEqual(vp2px(50));
......
......@@ -74,9 +74,9 @@ export default function AlignEnd_AddPadding() {
expect(Math.round(End_AddPadding_011.bottom - End_AddPadding_011.top)).assertEqual(vp2px(50));
expect(Math.round(End_AddPadding_012.bottom - End_AddPadding_012.top)).assertEqual(vp2px(100));
expect(Math.round(End_AddPadding_013.bottom - End_AddPadding_013.top)).assertEqual(vp2px(150));
expect(Math.round(End_AddPadding_011.right - End_AddPadding_011.left)).assertEqual(vp2px(440/3));
expect(Math.round(End_AddPadding_012.right - End_AddPadding_012.left)).assertEqual(vp2px(440/3));
expect(Math.round(End_AddPadding_013.right - End_AddPadding_013.left)).assertEqual(vp2px(440/3));
expect(Math.round(End_AddPadding_011.right - End_AddPadding_011.left)).assertEqual(Math.round(vp2px(440/3)));
expect(Math.round(End_AddPadding_012.right - End_AddPadding_012.left)).assertEqual(Math.round(vp2px(440/3)));
expect(Math.round(End_AddPadding_013.right - End_AddPadding_013.left)).assertEqual(Math.round(vp2px(440/3)));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0300] END');
done();
});
......
......@@ -77,9 +77,9 @@ export default function AlignSpaceEvenly_AddAllSpace() {
expect(Math.round(SpaceEvenly_AddAllSpace_011.bottom - SpaceEvenly_AddAllSpace_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddAllSpace_012.bottom - SpaceEvenly_AddAllSpace_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddAllSpace_013.bottom - SpaceEvenly_AddAllSpace_013.top)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddAllSpace_011.right - SpaceEvenly_AddAllSpace_011.left)).assertEqual(vp2px(440/3));
expect(Math.round(SpaceEvenly_AddAllSpace_012.right - SpaceEvenly_AddAllSpace_012.left)).assertEqual(vp2px(440/3));
expect(Math.round(SpaceEvenly_AddAllSpace_013.right - SpaceEvenly_AddAllSpace_013.left)).assertEqual(vp2px(440/3));
expect(Math.round(SpaceEvenly_AddAllSpace_011.right - SpaceEvenly_AddAllSpace_011.left)).assertEqual(Math.round(vp2px(440/3)));
expect(Math.round(SpaceEvenly_AddAllSpace_012.right - SpaceEvenly_AddAllSpace_012.left)).assertEqual(Math.round(vp2px(440/3)));
expect(Math.round(SpaceEvenly_AddAllSpace_013.right - SpaceEvenly_AddAllSpace_013.left)).assertEqual(Math.round(vp2px(440/3)));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0600] END');
done();
});
......
......@@ -122,7 +122,7 @@ export default function AlignSpaceEvenly_AddLayoutWeight() {
.assertEqual(vp2px(150));
let oneWidth = Math.round(SpaceEvenly_AddLayoutWeight_011.right - SpaceEvenly_AddLayoutWeight_011.left);
let twoWidth = Math.round(SpaceEvenly_AddLayoutWeight_012.right - SpaceEvenly_AddLayoutWeight_012.left);
expect(twoWidth / oneWidth).assertEqual(2);
expect(Math.round(twoWidth / oneWidth)).assertEqual(2);
expect(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(Math.round(SpaceEvenly_AddLayoutWeight_013.right - SpaceEvenly_AddLayoutWeight_013.left)).
assertEqual(vp2px(150));
......
......@@ -110,7 +110,7 @@ export default function AlignStart_AddLayoutWeight() {
expect(Start_AddLayoutWeight_013.right).assertEqual(Start_AddLayoutWeight_01.right);
let oneWidth = Math.round(Start_AddLayoutWeight_011.right - Start_AddLayoutWeight_011.left);
let twoWidth = Math.round(Start_AddLayoutWeight_012.right - Start_AddLayoutWeight_012.left);
expect(twoWidth / oneWidth).assertEqual(2);
expect(Math.round(twoWidth / oneWidth)).assertEqual(2);
expect(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(Math.round(Start_AddLayoutWeight_013.right - Start_AddLayoutWeight_013.left)).assertEqual(vp2px(150));
expect(Math.round(Start_AddLayoutWeight_011.bottom - Start_AddLayoutWeight_011.top)).assertEqual(vp2px(50));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册