Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f8cde247
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看板
未验证
提交
f8cde247
编写于
3月 29, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 29, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8279 test:Fix testcase of arkui decimal point rounding issues
Merge pull request !8279 from 李伟明/fix_issue
上级
e7d8f65f
fd67c4db
变更
76
隐藏空白更改
内联
并排
Showing
76 changed file
with
1356 addition
and
1134 deletion
+1356
-1134
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Column/spaceChanged/Column_Space.ets
...ts/MainAbility/pages/Column/spaceChanged/Column_Space.ets
+2
-2
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Row/spaceChanged/Row_Space.ets
...main/ets/MainAbility/pages/Row/spaceChanged/Row_Space.ets
+2
-2
arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space.test.ets
...c/main/ets/test/Column/spaceChanged/Column_Space.test.ets
+45
-33
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.test.ets
...paceAround/Flex_AlignContent_SpaceAround_FlexMar.test.ets
+9
-9
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.test.ets
...eAround/Flex_AlignContent_SpaceAround_FlexMarPad.test.ets
+19
-18
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.test.ets
...paceAround/Flex_AlignContent_SpaceAround_FlexPad.test.ets
+16
-15
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.test.ets
...aceAround/Flex_AlignContent_SpaceAround_FlexSize.test.ets
+15
-13
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.test.ets
...paceAround/Flex_AlignContent_SpaceAround_TextMar.test.ets
+19
-16
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.test.ets
...eAround/Flex_AlignContent_SpaceAround_TextOffset.test.ets
+9
-9
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.test.ets
...aceAround/Flex_AlignContent_SpaceAround_TextSize.test.ets
+15
-13
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.test.ets
...und/Flex_AlignContent_SpaceAround_TextVisibility.test.ets
+19
-15
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMar.test.ets
...ceBeTween/Flex_AlignContent_SpaceBetween_FlexMar.test.ets
+7
-7
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMarPad.test.ets
...eTween/Flex_AlignContent_SpaceBetween_FlexMarPad.test.ets
+18
-18
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexPad.test.ets
...ceBeTween/Flex_AlignContent_SpaceBetween_FlexPad.test.ets
+15
-15
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexSize.test.ets
...eBeTween/Flex_AlignContent_SpaceBetween_FlexSize.test.ets
+11
-11
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextMar.test.ets
...ceBeTween/Flex_AlignContent_SpaceBetween_TextMar.test.ets
+16
-16
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextOffset.test.ets
...eTween/Flex_AlignContent_SpaceBetween_TextOffset.test.ets
+8
-8
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextSize.test.ets
...eBeTween/Flex_AlignContent_SpaceBetween_TextSize.test.ets
+11
-11
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets
...en/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets
+11
-11
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexAlignSelfJsunit.test.ets
...ex/alignItems/ItemAlign_Auto/FlexAlignSelfJsunit.test.ets
+11
-11
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexBaseJsunit.test.ets
...st/Flex/alignItems/ItemAlign_Auto/FlexBaseJsunit.test.ets
+15
-15
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexExceedJsunit.test.ets
.../Flex/alignItems/ItemAlign_Auto/FlexExceedJsunit.test.ets
+23
-17
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexHeightModifyJsunit.test.ets
...alignItems/ItemAlign_Auto/FlexHeightModifyJsunit.test.ets
+41
-8
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexMarginJsunit.test.ets
.../Flex/alignItems/ItemAlign_Auto/FlexMarginJsunit.test.ets
+12
-9
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexOffsetJsunit.test.ets
.../Flex/alignItems/ItemAlign_Auto/FlexOffsetJsunit.test.ets
+14
-14
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexPaddingJsunit.test.ets
...Flex/alignItems/ItemAlign_Auto/FlexPaddingJsunit.test.ets
+21
-16
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexTextMarginJsunit.test.ets
...x/alignItems/ItemAlign_Auto/FlexTextMarginJsunit.test.ets
+37
-31
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets
...x/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets
+31
-27
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAlign.test.ets
.../Flex/justifyContent/Center/AlignCenter_AddAlign.test.ets
+10
-8
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAllSpace.test.ets
...ex/justifyContent/Center/AlignCenter_AddAllSpace.test.ets
+24
-22
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.test.ets
...ustifyContent/Center/AlignCenter_AddLayoutWeight.test.ets
+12
-12
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddMargin.test.ets
...Flex/justifyContent/Center/AlignCenter_AddMargin.test.ets
+12
-10
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOffset.test.ets
...Flex/justifyContent/Center/AlignCenter_AddOffset.test.ets
+12
-9
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneMargin.test.ets
...x/justifyContent/Center/AlignCenter_AddOneMargin.test.ets
+26
-19
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneWidth.test.ets
...ex/justifyContent/Center/AlignCenter_AddOneWidth.test.ets
+8
-8
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddPadding.test.ets
...lex/justifyContent/Center/AlignCenter_AddPadding.test.ets
+20
-18
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddVisibility.test.ets
.../justifyContent/Center/AlignCenter_AddVisibility.test.ets
+26
-22
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_NoSpace.test.ets
...t/Flex/justifyContent/Center/AlignCenter_NoSpace.test.ets
+15
-15
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAlign.test.ets
...s/test/Flex/justifyContent/End/AlignEnd_AddAlign.test.ets
+7
-7
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAllSpace.test.ets
...est/Flex/justifyContent/End/AlignEnd_AddAllSpace.test.ets
+22
-22
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.test.ets
...Flex/justifyContent/End/AlignEnd_AddLayoutWeight.test.ets
+12
-12
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddMargin.test.ets
.../test/Flex/justifyContent/End/AlignEnd_AddMargin.test.ets
+9
-9
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOffset.test.ets
.../test/Flex/justifyContent/End/AlignEnd_AddOffset.test.ets
+9
-9
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneMargin.test.ets
...st/Flex/justifyContent/End/AlignEnd_AddOneMargin.test.ets
+18
-18
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneWidth.test.ets
...est/Flex/justifyContent/End/AlignEnd_AddOneWidth.test.ets
+7
-7
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddPadding.test.ets
...test/Flex/justifyContent/End/AlignEnd_AddPadding.test.ets
+18
-18
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets
...t/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets
+19
-19
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_NoSpace.test.ets
...ts/test/Flex/justifyContent/End/AlignEnd_NoSpace.test.ets
+13
-13
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.test.ets
...ifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.test.ets
+14
-12
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.test.ets
...Content/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.test.ets
+28
-25
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.test.ets
...ent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.test.ets
+22
-12
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.test.ets
...fyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.test.ets
+14
-11
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.test.ets
...fyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.test.ets
+16
-12
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.test.ets
...ontent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.test.ets
+29
-22
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.test.ets
...Content/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.test.ets
+9
-9
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.test.ets
...yContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.test.ets
+28
-20
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets
...ntent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets
+54
-27
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.test.ets
...tifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.test.ets
+23
-16
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets
...st/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets
+7
-7
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets
...Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets
+22
-22
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.test.ets
.../justifyContent/Start/AlignStart_AddLayoutWeight.test.ets
+12
-12
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets
...t/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets
+8
-8
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets
...t/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets
+9
-9
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneMargin.test.ets
...lex/justifyContent/Start/AlignStart_AddOneMargin.test.ets
+23
-18
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets
...Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets
+7
-7
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddPadding.test.ets
.../Flex/justifyContent/Start/AlignStart_AddPadding.test.ets
+18
-18
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets
...ex/justifyContent/Start/AlignStart_AddVisibility.test.ets
+19
-19
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets
...est/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets
+13
-13
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.test.ets
...d/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.test.ets
+62
-38
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.test.ets
...dTemplatesAllSet/GridChange/Grid_RowCol_GridSize.test.ets
+17
-17
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.test.ets
...tesAllSet/GridChange/Grid_RowCol_LayoutDirection.test.ets
+14
-8
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.test.ets
...ridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.test.ets
+40
-40
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.test.ets
...emplatesAllSet/GridChange/Grid_RowCol_cellLength.test.ets
+8
-8
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.test.ets
...dTemplatesAllSet/GridChange/Grid_RowCol_maxCount.test.ets
+8
-8
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.test.ets
...et/GridTemplateChange/Grid_RowCol_TemplateChange.test.ets
+16
-16
arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space.test.ets
...try/src/main/ets/test/Row/spaceChanged/Row_Space.test.ets
+45
-33
未找到文件。
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Column/spaceChanged/Column_Space.ets
浏览文件 @
f8cde247
...
...
@@ -16,11 +16,11 @@
import {MessageManager,Callback} from './../../../common/MessageManager';
@Entry
@Component
struct
AlignStart_AddAlign
{
struct
Column_Space
{
@State addSpace: number = 10
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('
AlignSpaceEvenly_No
Space onPageShow');
console.info('
Column_
Space onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Row/spaceChanged/Row_Space.ets
浏览文件 @
f8cde247
...
...
@@ -15,11 +15,11 @@
import {MessageManager,Callback} from '../../../common/MessageManager';
@Entry
@Component
struct Row_
FlexPad_TextMarPad
{
struct Row_
Space
{
@State addSpace: number = 5
messageManager:MessageManager = new MessageManager()
onPageShow() {
console.info('
AlignSpaceEvenly_No
Space onPageShow');
console.info('
Row_
Space onPageShow');
globalThis.value = {
name:'messageManager',message:this.messageManager
}
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space.test.ets
浏览文件 @
f8cde247
...
...
@@ -57,19 +57,23 @@ export default function Column_Space() {
let Column_Space_012 = CommonFunc.getComponentRect('Column_Space_012');
let Column_Space_013 = CommonFunc.getComponentRect('Column_Space_013');
let Column_Space_01 = CommonFunc.getComponentRect('Column_Space_01');
expect(Column_Space_011.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_011.right);
expect(Column_Space_012.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_012.right);
expect(Column_Space_013.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_013.right);
expect(Column_Space_012.top - Column_Space_011.bottom).assertEqual(Column_Space_013.top - Column_Space_012.bottom)
expect(Column_Space_012.top - Column_Space_011.bottom).assertEqual(vp2px(30));
expect(Math.round(Column_Space_011.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_011.right));
expect(Math.round(Column_Space_012.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_012.right));
expect(Math.round(Column_Space_013.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_013.right));
expect(Math.round(Column_Space_012.top - Column_Space_011.bottom))
.assertEqual(Math.round(Column_Space_013.top - Column_Space_012.bottom));
expect(Math.round(Column_Space_012.top - Column_Space_011.bottom)).assertEqual(vp2px(30));
expect(Column_Space_01.top).assertEqual(Column_Space_011.top);
expect(Column_Space_013.bottom).assertLess(Column_Space_01.bottom);
expect(
Column_Space_011.bottom - Column_Space_011.top
).assertEqual(vp2px(50));
expect(
Column_Space_012.bottom - Column_Space_012.top
).assertEqual(vp2px(100));
expect(
Column_Space_013.bottom - Column_Space_013.top
).assertEqual(vp2px(150));
expect(
Column_Space_011.right - Column_Space_011.left
).assertEqual(vp2px(300));
expect(
Column_Space_012.right - Column_Space_012.left
).assertEqual(vp2px(300));
expect(
Column_Space_013.right - Column_Space_013.left
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_011.bottom - Column_Space_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Column_Space_012.bottom - Column_Space_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Column_Space_013.bottom - Column_Space_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Column_Space_011.right - Column_Space_011.left)
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_012.right - Column_Space_012.left)
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_013.right - Column_Space_013.left)
).assertEqual(vp2px(300));
console.info('[SUB_ACE_COLUMN_SPACE_TEST_0100] END');
done();
});
...
...
@@ -86,19 +90,23 @@ export default function Column_Space() {
let Column_Space_012 = CommonFunc.getComponentRect('Column_Space_012');
let Column_Space_013 = CommonFunc.getComponentRect('Column_Space_013');
let Column_Space_01 = CommonFunc.getComponentRect('Column_Space_01');
expect(Column_Space_011.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_011.right);
expect(Column_Space_012.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_012.right);
expect(Column_Space_013.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_013.right);
expect(Column_Space_012.top - Column_Space_011.bottom).assertEqual(Column_Space_013.top - Column_Space_012.bottom);
expect(Column_Space_012.top - Column_Space_011.bottom).assertEqual(vp2px(50));
expect(Math.round(Column_Space_011.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_011.right));
expect(Math.round(Column_Space_012.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_012.right));
expect(Math.round(Column_Space_013.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_013.right));
expect(Math.round(Column_Space_012.top - Column_Space_011.bottom))
.assertEqual(Math.round(Column_Space_013.top - Column_Space_012.bottom));
expect(Math.round(Column_Space_012.top - Column_Space_011.bottom)).assertEqual(vp2px(50));
expect(Column_Space_01.top).assertEqual(Column_Space_011.top);
expect(Column_Space_013.bottom).assertEqual(Column_Space_01.bottom);
expect(
Column_Space_011.bottom - Column_Space_011.top
).assertEqual(vp2px(50));
expect(
Column_Space_012.bottom - Column_Space_012.top
).assertEqual(vp2px(100));
expect(
Column_Space_013.bottom - Column_Space_013.top
).assertEqual(vp2px(150));
expect(
Column_Space_011.right - Column_Space_011.left
).assertEqual(vp2px(300));
expect(
Column_Space_012.right - Column_Space_012.left
).assertEqual(vp2px(300));
expect(
Column_Space_013.right - Column_Space_013.left
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_011.bottom - Column_Space_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Column_Space_012.bottom - Column_Space_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Column_Space_013.bottom - Column_Space_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Column_Space_011.right - Column_Space_011.left)
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_012.right - Column_Space_012.left)
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_013.right - Column_Space_013.left)
).assertEqual(vp2px(300));
console.info('[SUB_ACE_COLUMN_SPACE_TEST_0200] END');
done();
});
...
...
@@ -115,19 +123,23 @@ export default function Column_Space() {
let Column_Space_012 = CommonFunc.getComponentRect('Column_Space_012');
let Column_Space_013 = CommonFunc.getComponentRect('Column_Space_013');
let Column_Space_01 = CommonFunc.getComponentRect('Column_Space_01');
expect(Column_Space_011.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_011.right);
expect(Column_Space_012.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_012.right);
expect(Column_Space_013.left - Column_Space_01.left).assertEqual(Column_Space_01.right - Column_Space_013.right);
expect(Column_Space_012.top - Column_Space_011.bottom).assertEqual(Column_Space_013.top - Column_Space_012.bottom);
expect(Column_Space_012.top - Column_Space_011.bottom).assertEqual(vp2px(70));
expect(Math.round(Column_Space_011.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_011.right));
expect(Math.round(Column_Space_012.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_012.right));
expect(Math.round(Column_Space_013.left - Column_Space_01.left))
.assertEqual(Math.round(Column_Space_01.right - Column_Space_013.right));
expect(Math.round(Column_Space_012.top - Column_Space_011.bottom))
.assertEqual(Math.round(Column_Space_013.top - Column_Space_012.bottom));
expect(Math.round(Column_Space_012.top - Column_Space_011.bottom)).assertEqual(vp2px(70));
expect(Column_Space_01.top).assertEqual(Column_Space_011.top);
expect(Column_Space_013.bottom).assertLarger(Column_Space_01.bottom);
expect(
Column_Space_011.bottom - Column_Space_011.top
).assertEqual(vp2px(50));
expect(
Column_Space_012.bottom - Column_Space_012.top
).assertEqual(vp2px(100));
expect(
Column_Space_013.bottom - Column_Space_013.top
).assertEqual(vp2px(150));
expect(
Column_Space_011.right - Column_Space_011.left
).assertEqual(vp2px(300));
expect(
Column_Space_012.right - Column_Space_012.left
).assertEqual(vp2px(300));
expect(
Column_Space_013.right - Column_Space_013.left
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_011.bottom - Column_Space_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Column_Space_012.bottom - Column_Space_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Column_Space_013.bottom - Column_Space_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Column_Space_011.right - Column_Space_011.left)
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_012.right - Column_Space_012.left)
).assertEqual(vp2px(300));
expect(
Math.round(Column_Space_013.right - Column_Space_013.left)
).assertEqual(vp2px(300));
console.info('[SUB_ACE_COLUMN_SPACE_TEST_0300] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.test.ets
浏览文件 @
f8cde247
...
...
@@ -65,22 +65,22 @@ export default function flex_AlignContent_SpaceAround_FlexMarTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
flexContainer.top - columnContainer.top
).assertEqual(vp2px(10)); //margin =10
expect(
Math.round(flexContainer.top - columnContainer.top)
).assertEqual(vp2px(10)); //margin =10
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(
secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //行间距相等
expect(
Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //行间距相等
expect(
firstText.top - flexContainer.top).assertEqual(flexContainer.bottom - fourthText.bottom
);
expect(
firstText.top - flexContainer.top).assertEqual((secondText.top - firstText.bottom) / 2
); //上下间距是组件间距的一半
expect(
Math.round(firstText.top - flexContainer.top)).assertEqual(Math.round(flexContainer.bottom - fourthText.bottom)
);
expect(
Math.round(firstText.top - flexContainer.top)).assertEqual(Math.round((secondText.top - firstText.bottom) / 2)
); //上下间距是组件间距的一半
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0100] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.test.ets
浏览文件 @
f8cde247
...
...
@@ -66,13 +66,13 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() {
expect(flexContainerObj.$type).assertEqual('Flex');
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
flexContainer.top - columnContainer.top
).assertEqual(vp2px(20)); //margin =20
expect(
firstText.top - flexContainer.top
).assertEqual(vp2px(50));
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(50)); //padding =50
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
Math.round(flexContainer.top - columnContainer.top)
).assertEqual(vp2px(20)); //margin =20
expect(
Math.round(firstText.top - flexContainer.top)
).assertEqual(vp2px(50));
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(50)); //padding =50
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
...
...
@@ -80,7 +80,7 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() {
expect(firstText.bottom).assertEqual(secondText.top);
expect(secondText.bottom).assertEqual(thirdText.top);
expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(10)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(10)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0200] END');
done();
});
...
...
@@ -107,21 +107,22 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(10)); //padding =10
expect(
flexContainer.top - columnContainer.top
).assertEqual(vp2px(30)); //margin =30
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(10)); //padding =10
expect(
Math.round(flexContainer.top - columnContainer.top)
).assertEqual(vp2px(30)); //margin =30
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(flexContainer.bottom - fourthText.bottom).assertEqual(firstText.top - flexContainer.top); //行首行尾间距相等
expect(Math.round(flexContainer.bottom - fourthText.bottom))
.assertEqual(Math.round(firstText.top - flexContainer.top)); //行首行尾间距相等
expect(
secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom); //行间距相等
expect((thirdText.top - secondText.bottom) / 2).assertEqual(firstText.top - flexContainer.top - vp2px(10
))
expect(
Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round((thirdText.top - secondText.bottom) / 2))
.assertEqual(Math.round(firstText.top - flexContainer.top - vp2px(10)
))
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0300] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.test.ets
浏览文件 @
f8cde247
...
...
@@ -63,12 +63,12 @@ export default function flex_AlignContent_SpaceAround_FlexPadTest() {
expect(flexContainerObj.$type).assertEqual('Flex');
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(50)); //padding =50
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(50)); //padding =50
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
...
...
@@ -76,7 +76,7 @@ export default function flex_AlignContent_SpaceAround_FlexPadTest() {
expect(firstText.bottom).assertEqual(secondText.top);
expect(secondText.bottom).assertEqual(thirdText.top);
expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(10)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(10)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0400] END');
done();
});
...
...
@@ -101,20 +101,21 @@ export default function flex_AlignContent_SpaceAround_FlexPadTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(10)); //padding =10
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(10)); //padding =10
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(
flexContainer.bottom - fourthText.bottom).assertEqual(firstText.top - flexContainer.top
); //行首行尾间距相等
expect(
Math.round(flexContainer.bottom - fourthText.bottom)).assertEqual(Math.round(firstText.top - flexContainer.top)
); //行首行尾间距相等
expect(secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom);
expect(thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom); //行间距相等
expect((thirdText.top - secondText.bottom) / 2).assertEqual(firstText.top - flexContainer.top - vp2px(10));
expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom));
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等
expect(Math.round((thirdText.top - secondText.bottom) / 2))
.assertEqual(Math.round(firstText.top - flexContainer.top - vp2px(10)));
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0500] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.test.ets
浏览文件 @
f8cde247
...
...
@@ -65,20 +65,22 @@ export default function flex_AlignContent_SpaceAround_FlexSizeTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom);
expect(thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom); //行间距相等
expect(firstText.top - flexContainer.top).assertEqual(flexContainer.bottom - fourthText.bottom);
expect(firstText.top - flexContainer.top).assertEqual((secondText.top - firstText.bottom) / 2); //上下间距是组件间距的一半
expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom));
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等
expect(Math.round(firstText.top - flexContainer.top))
.assertEqual(Math.round(flexContainer.bottom - fourthText.bottom));
expect(Math.round(firstText.top - flexContainer.top))
.assertEqual(Math.round((secondText.top - firstText.bottom) / 2)); //上下间距是组件间距的一半
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0600] END');
done();
});
...
...
@@ -104,10 +106,10 @@ export default function flex_AlignContent_SpaceAround_FlexSizeTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(firstText.bottom).assertEqual(secondText.top);
expect(secondText.bottom).assertEqual(thirdText.top);
...
...
@@ -118,7 +120,7 @@ export default function flex_AlignContent_SpaceAround_FlexSizeTest() {
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(firstText.top).assertEqual(flexContainer.top);
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(50)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(50)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.test.ets
浏览文件 @
f8cde247
...
...
@@ -63,20 +63,20 @@ export default function flex_AlignContent_SpaceAround_TextMarTest() {
expect(flexContainerObj.$type).assertEqual('Flex');
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
firstText.left - flexContainer.left).assertEqual(vp2px(65)
); //margin =65
expect(
Math.round((firstText.left - flexContainer.left)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10
); //margin =65
expect(flexContainer.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(
secondText.top - firstText.bottom).assertEqual(vp2px(65)
);
expect(
Math.round((secondText.top - firstText.bottom)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10
);
expect(secondText.bottom).assertEqual(thirdText.top);
expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(30)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(30)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0800] END');
done();
});
...
...
@@ -101,19 +101,22 @@ export default function flex_AlignContent_SpaceAround_TextMarTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(10)); //margin =10
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(10)); //margin =10
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(firstText.top - flexContainer.top - vp2px(10)).assertEqual(flexContainer.bottom - fourthText.bottom);
expect(Math.round(firstText.top - flexContainer.top - vp2px(10)))
.assertEqual(Math.round(flexContainer.bottom - fourthText.bottom));
expect(secondText.top - firstText.bottom - vp2px(10)).assertEqual(thirdText.top - secondText.bottom);
expect(thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom); //行间距相等
expect(flexContainer.bottom - fourthText.bottom).assertEqual((fourthText.top - thirdText.bottom) / 2); //行首行尾距离是组件间距的一半
expect(Math.round(secondText.top - firstText.bottom - vp2px(10)))
.assertEqual(Math.round(thirdText.top - secondText.bottom));
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等
expect(Math.round(flexContainer.bottom - fourthText.bottom))
.assertEqual(Math.round((fourthText.top - thirdText.bottom) / 2)); //行首行尾距离是组件间距的一半
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0900] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.test.ets
浏览文件 @
f8cde247
...
...
@@ -70,22 +70,22 @@ export default function flex_AlignContent_SpaceAround_TextOffsetTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
firstText.top - firstTextTop
).assertEqual(vp2px(10));
expect(
firstText.left - firstTextLeft
).assertEqual(vp2px(10)); //offset =10
expect(
Math.round(firstText.top - firstTextTop)
).assertEqual(vp2px(10));
expect(
Math.round(firstText.left - firstTextLeft)
).assertEqual(vp2px(10)); //offset =10
expect(secondText.top).assertEqual(secondTextTop);
expect(flexContainer.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(distanceBefore
);
expect(
flexContainer.bottom - fourthText.bottom).assertEqual(distanceBefore / 2
); //其余组件行间距相等,未改变
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(distanceBefore)
);
expect(
Math.round(flexContainer.bottom - fourthText.bottom)).assertEqual(Math.round(distanceBefore / 2)
); //其余组件行间距相等,未改变
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1000] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.test.ets
浏览文件 @
f8cde247
...
...
@@ -64,21 +64,23 @@ export default function flex_AlignContent_SpaceAround_TextSizeTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(70));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为70、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(70));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为70、100、50、100
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(
secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //行间距相等
expect(
Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //行间距相等
expect(firstText.top - flexContainer.top).assertEqual(flexContainer.bottom - fourthText.bottom);
expect(firstText.top - flexContainer.top).assertEqual((secondText.top - firstText.bottom) / 2);
expect(Math.round(firstText.top - flexContainer.top))
.assertEqual(Math.round(flexContainer.bottom - fourthText.bottom));
expect(Math.round(firstText.top - flexContainer.top))
.assertEqual(Math.round((secondText.top - firstText.bottom) / 2));
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1100] END');
done();
});
...
...
@@ -103,10 +105,10 @@ export default function flex_AlignContent_SpaceAround_TextSizeTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(200));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为200、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(200));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为200、100、50、100
expect(firstText.bottom).assertEqual(secondText.top);
expect(secondText.bottom).assertEqual(thirdText.top);
...
...
@@ -118,7 +120,7 @@ export default function flex_AlignContent_SpaceAround_TextSizeTest() {
expect(fourthText.left).assertEqual(flexContainer.left); //子组件靠左
expect(firstText.top).assertEqual(flexContainer.top);
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(50)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(50)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1200] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.test.ets
浏览文件 @
f8cde247
...
...
@@ -66,18 +66,20 @@ export default function flex_AlignContent_SpaceAround_TextVisibilityTest() {
expect(flexContainerObj.$type).assertEqual('Flex');
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(secondText.top - flexContainer.top).assertEqual(distanceBefore * 1.5 + vp2px(50)); //text1占位
expect(Math.round((secondText.top - flexContainer.top)*100)/100)
.assertEqual(Math.round((distanceBefore * 1.5 + vp2px(50))*100)/100); //text1占位
expect(thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom); //剩余子组件行间距相等
expect(thirdText.top - secondText.bottom).assertEqual(distanceBefore); //子组件距离不变
expect(flexContainer.bottom -fourthText.bottom).assertEqual(distanceBefore / 2); //行首距离为子组件距离一半
expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //剩余子组件行间距相等
expect(Math.round((thirdText.top - secondText.bottom)*10)/10).assertEqual(Math.round(distanceBefore*10)/10); //子组件距离不变
expect(Math.round((flexContainer.bottom -fourthText.bottom)*100)/100)
.assertEqual(Math.round((distanceBefore / 2)*100)/100); //行首距离为子组件距离一半
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1300] END');
done();
});
...
...
@@ -91,7 +93,7 @@ export default function flex_AlignContent_SpaceAround_TextVisibilityTest() {
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1400] START');
let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextVisibility01');
let secondText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextVisibility02');
let distanceBefore =
secondText.top - firstText.bottom
;
let distanceBefore =
Math.round(secondText.top - firstText.bottom)
;
globalThis.value.message.notify({name:'visibility', value:Visibility.None})
await CommonFunc.sleep(3000);
secondText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextVisibility02');
...
...
@@ -104,19 +106,21 @@ export default function flex_AlignContent_SpaceAround_TextVisibilityTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceAround');
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //剩余子组件行间距相等
expect(
thirdText.top - secondText.bottom
).assertLarger(distanceBefore); //行距大于设置前
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //剩余子组件行间距相等
expect(
Math.round(thirdText.top - secondText.bottom)
).assertLarger(distanceBefore); //行距大于设置前
expect(secondText.top - flexContainer.top).assertEqual(flexContainer.bottom - fourthText.bottom); //text1不参与占位
expect(secondText.top - flexContainer.top).assertEqual((thirdText.top - secondText.bottom) / 2); //行首行尾间距为子组件间距一半
expect(Math.round(secondText.top - flexContainer.top))
.assertEqual(Math.round(flexContainer.bottom - fourthText.bottom)); //text1不参与占位
expect(Math.round(secondText.top - flexContainer.top))
.assertEqual(Math.round((thirdText.top - secondText.bottom) / 2)); //行首行尾间距为子组件间距一半
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1400] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMar.test.ets
浏览文件 @
f8cde247
...
...
@@ -65,11 +65,11 @@ export default function flex_AlignContent_SpaceBetween_FlexMarTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
flexContainer.top - columnContainer.top
).assertEqual(vp2px(10)); //margin =10
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
Math.round(flexContainer.top - columnContainer.top)
).assertEqual(vp2px(10)); //margin =10
expect(firstText.left).assertEqual(flexContainer.left);
expect(firstText.left).assertEqual(secondText.left);
...
...
@@ -79,8 +79,8 @@ export default function flex_AlignContent_SpaceBetween_FlexMarTest() {
expect(firstText.top).assertEqual(flexContainer.top);
expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边
expect(
secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //行间距相等
expect(
Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //行间距相等
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0100] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMarPad.test.ets
浏览文件 @
f8cde247
...
...
@@ -67,14 +67,14 @@ export default function flex_AlignContent_SpaceBetween_FlexMarPadTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
flexContainer.top - columnContainer.left
).assertEqual(vp2px(20)); //margin =20
expect(
firstText.top - flexContainer.top
).assertEqual(vp2px(50));
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(50)); //padding =50
expect(
Math.round(flexContainer.top - columnContainer.left)
).assertEqual(vp2px(20)); //margin =20
expect(
Math.round(firstText.top - flexContainer.top)
).assertEqual(vp2px(50));
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(50)); //padding =50
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
...
...
@@ -82,7 +82,7 @@ export default function flex_AlignContent_SpaceBetween_FlexMarPadTest() {
expect(firstText.bottom).assertEqual(secondText.top);
expect(secondText.bottom).assertEqual(thirdText.top);
expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(10)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(10)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0200] END');
done();
});
...
...
@@ -109,21 +109,21 @@ export default function flex_AlignContent_SpaceBetween_FlexMarPadTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
firstText.top - flexContainer.top
).assertEqual(vp2px(10));
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(10)); //padding =10
expect(
flexContainer.top - columnContainer.left
).assertEqual(vp2px(30)); //margin =30
expect(
Math.round(firstText.top - flexContainer.top)
).assertEqual(vp2px(10));
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(10)); //padding =10
expect(
Math.round(flexContainer.top - columnContainer.left)
).assertEqual(vp2px(30)); //margin =30
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(
flexContainer.bottom - fourthText.bottom
).assertEqual(vp2px(10));
expect(
Math.round(flexContainer.bottom - fourthText.bottom)
).assertEqual(vp2px(10));
expect(
secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //行间距相等
expect(
Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //行间距相等
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0300] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexPad.test.ets
浏览文件 @
f8cde247
...
...
@@ -64,13 +64,13 @@ export default function flex_AlignContent_SpaceBetween_FlexPadTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
firstText.top - flexContainer.top
).assertEqual(vp2px(50)); //padding =50
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(50)); //padding =50
expect(
Math.round(firstText.top - flexContainer.top)
).assertEqual(vp2px(50)); //padding =50
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(50)); //padding =50
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
...
...
@@ -78,7 +78,7 @@ export default function flex_AlignContent_SpaceBetween_FlexPadTest() {
expect(firstText.bottom).assertEqual(secondText.top);
expect(secondText.bottom).assertEqual(thirdText.top);
expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(10)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(10)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0400] END');
done();
});
...
...
@@ -102,20 +102,20 @@ export default function flex_AlignContent_SpaceBetween_FlexPadTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(150));
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(150));
expect(fourthText.bottom - fourthText.top).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(10)); //padding =10
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(10)); //padding =10
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(
firstText.top - flexContainer.top
).assertEqual(vp2px(10));
expect(
flexContainer.bottom - fourthText.bottom
).assertEqual(vp2px(10)); //行首偏移行尾未溢出
expect(
Math.round(firstText.top - flexContainer.top)
).assertEqual(vp2px(10));
expect(
Math.round(flexContainer.bottom - fourthText.bottom)
).assertEqual(vp2px(10)); //行首偏移行尾未溢出
expect(
secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //行间距相等
expect(
Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //行间距相等
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0500] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexSize.test.ets
浏览文件 @
f8cde247
...
...
@@ -65,10 +65,10 @@ export default function flex_AlignContent_SpaceBetween_FlexSizeTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
...
...
@@ -77,8 +77,8 @@ export default function flex_AlignContent_SpaceBetween_FlexSizeTest() {
expect(firstText.top).assertEqual(flexContainer.top);
expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边
expect(
secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //行间距相等
expect(
Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //行间距相等
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0600] END');
done();
});
...
...
@@ -104,10 +104,10 @@ export default function flex_AlignContent_SpaceBetween_FlexSizeTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(firstText.top).assertEqual(flexContainer.top);
expect(firstText.bottom).assertEqual(secondText.top);
...
...
@@ -119,7 +119,7 @@ export default function flex_AlignContent_SpaceBetween_FlexSizeTest() {
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(50)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(50)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextMar.test.ets
浏览文件 @
f8cde247
...
...
@@ -64,21 +64,21 @@ export default function flex_AlignContent_SpaceBetween_TextMarTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
firstText.top - flexContainer.top).assertEqual(vp2px(65)
); //margin =65
expect(
firstText.left - flexContainer.left).assertEqual(vp2px(65)
); //margin =65
expect(
Math.round((firstText.top - flexContainer.top)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10
); //margin =65
expect(
Math.round((firstText.left - flexContainer.left)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10
); //margin =65
expect(flexContainer.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(
secondText.top - firstText.bottom).assertEqual(vp2px(65)
);
expect(
Math.round((secondText.top - firstText.bottom)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10
);
expect(secondText.bottom).assertEqual(thirdText.top);
expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(30)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(30)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0800] END');
done();
});
...
...
@@ -103,20 +103,20 @@ export default function flex_AlignContent_SpaceBetween_TextMarTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(10)); //margin =10
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(10)); //margin =10
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(
firstText.top - flexContainer.top
).assertEqual(vp2px(10));
expect(
Math.round(firstText.top - flexContainer.top)
).assertEqual(vp2px(10));
expect(flexContainer.bottom).assertEqual(fourthText.bottom); //行首偏移行尾未溢出
expect(
secondText.top - firstText.bottom - vp2px(10)).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //行间距相等
expect(
Math.round(secondText.top - firstText.bottom - vp2px(10))).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //行间距相等
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0900] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextOffset.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,20 +68,20 @@ export default function flex_AlignContent_SpaceBetween_TextOffsetTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(50));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(50));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100
expect(
firstText.top - flexContainer.top
).assertEqual(vp2px(10));
expect(
firstText.left - flexContainer.left
).assertEqual(vp2px(10)); //offset =10
expect(
Math.round(firstText.top - flexContainer.top)
).assertEqual(vp2px(10));
expect(
Math.round(firstText.left - flexContainer.left)
).assertEqual(vp2px(10)); //offset =10
expect(flexContainer.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首贴边行尾溢出
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
);
expect(
thirdText.top - secondText.bottom
).assertEqual(distanceBefore);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)
).assertEqual(distanceBefore);
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1000] END');//其余组件行间距相等,未改变
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextSize.test.ets
浏览文件 @
f8cde247
...
...
@@ -64,10 +64,10 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(70));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为70、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(70));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为70、100、50、100
expect(firstText.left).assertEqual(secondText.left);
expect(secondText.left).assertEqual(thirdText.left);
...
...
@@ -76,8 +76,8 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() {
expect(firstText.top).assertEqual(flexContainer.top);
expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边
expect(
secondText.top - firstText.bottom).assertEqual(thirdText.top - secondText.bottom
);
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //行间距相等
expect(
Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //行间距相等
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1100] END');
done();
});
...
...
@@ -102,10 +102,10 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
firstText.bottom - firstText.top
).assertEqual(vp2px(200));
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //四个子组件的高度分别为200、100、50、100
expect(
Math.round(firstText.bottom - firstText.top)
).assertEqual(vp2px(200));
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //四个子组件的高度分别为200、100、50、100
expect(firstText.bottom).assertEqual(secondText.top);
expect(secondText.bottom).assertEqual(thirdText.top);
...
...
@@ -117,7 +117,7 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() {
expect(fourthText.left).assertEqual(flexContainer.left);
expect(firstText.top).assertEqual(flexContainer.top);
expect(
fourthText.bottom - flexContainer.bottom
).assertEqual(vp2px(50)); //行首贴边行尾溢出
expect(
Math.round(fourthText.bottom - flexContainer.bottom)
).assertEqual(vp2px(50)); //行首贴边行尾溢出
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1200] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets
浏览文件 @
f8cde247
...
...
@@ -67,18 +67,18 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
expect(fourthText.left).assertEqual(flexContainer.left);
expect(
secondText.top - flexContainer.top).assertEqual(distanceBefore + vp2px(50
)); //text1占位
expect(
Math.round(secondText.top - flexContainer.top)).assertEqual(Math.round(distanceBefore + vp2px(50)
)); //text1占位
expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //剩余子组件行间距相等
expect(
thirdText.top - secondText.bottom).assertEqual(distanceBefore
);
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //剩余子组件行间距相等
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(distanceBefore)
);
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1300] END');
done();
});
...
...
@@ -105,9 +105,9 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
expect(flexContainerObj.$attrs.constructor.wrap).assertEqual('FlexWrap.Wrap');
expect(flexContainerObj.$attrs.constructor.alignContent).assertEqual('FlexAlign.SpaceBetween');
expect(
secondText.bottom - secondText.top
).assertEqual(vp2px(100));
expect(
thirdText.bottom - thirdText.top
).assertEqual(vp2px(50));
expect(
fourthText.bottom - fourthText.top
).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(
Math.round(secondText.bottom - secondText.top)
).assertEqual(vp2px(100));
expect(
Math.round(thirdText.bottom - thirdText.top)
).assertEqual(vp2px(50));
expect(
Math.round(fourthText.bottom - fourthText.top)
).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100
expect(secondText.left).assertEqual(thirdText.left);
expect(thirdText.left).assertEqual(fourthText.left);
...
...
@@ -115,8 +115,8 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() {
expect(secondText.top).assertEqual(flexContainer.top); //text1不参与占位
expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边
expect(
thirdText.top - secondText.bottom).assertEqual(fourthText.top - thirdText.bottom
); //剩余子组件行间距相等
expect(
thirdText.top - secondText.bottom).assertLarger(distanceBefore
); //行距大于设置前
expect(
Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)
); //剩余子组件行间距相等
expect(
Math.round(thirdText.top - secondText.bottom)).assertLarger(Math.round(distanceBefore)
); //行距大于设置前
console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexAlignSelfJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -46,12 +46,12 @@ export default function flexAlignSelf_AutoJsunit() {
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
2
00
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
3
00
* @tc.name ItemAlign_Auto_FlexAlignSelf
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
The first subcomponent set ItemAlign.End attribute.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
2
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
2
00 START');
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
3
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
3
00 START');
let strJson1 = getInspectorByKey('flexAlignSelf');
let obj1 = JSON.parse(strJson1);
let strJson2 = getInspectorByKey('textAlignSelf01');
...
...
@@ -66,17 +66,17 @@ export default function flexAlignSelf_AutoJsunit() {
expect(textAlignSelf02.top).assertEqual(textAlignSelf03.top)
expect(textAlignSelf01.bottom).assertEqual(flexAlignSelf01.bottom)
expect(
textAlignSelf01.bottom - textAlignSelf01.top
).assertEqual(vp2px(50))
expect(
textAlignSelf01.right - textAlignSelf01.left
).assertEqual(vp2px(150))
expect(
textAlignSelf02.bottom - textAlignSelf02.top
).assertEqual(vp2px(100))
expect(
textAlignSelf02.right - textAlignSelf02.left
).assertEqual(vp2px(150))
expect(
textAlignSelf03.bottom - textAlignSelf03.top
).assertEqual(vp2px(150))
expect(
textAlignSelf03.right - textAlignSelf03.left
).assertEqual(vp2px(150))
expect(
Math.round(textAlignSelf01.bottom - textAlignSelf01.top)
).assertEqual(vp2px(50))
expect(
Math.round(textAlignSelf01.right - textAlignSelf01.left)
).assertEqual(vp2px(150))
expect(
Math.round(textAlignSelf02.bottom - textAlignSelf02.top)
).assertEqual(vp2px(100))
expect(
Math.round(textAlignSelf02.right - textAlignSelf02.left)
).assertEqual(vp2px(150))
expect(
Math.round(textAlignSelf03.bottom - textAlignSelf03.top)
).assertEqual(vp2px(150))
expect(
Math.round(textAlignSelf03.right - textAlignSelf03.left)
).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
expect(obj2.$attrs.alignSelf).assertEqual("ItemAlign.End")
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
2
00 END');
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
3
00 END');
done();
});
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexBaseJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -47,7 +47,7 @@ export default function flexBase_AutoJsunit() {
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0100
* @tc.name ItemAlign_Auto_FlexBase
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
The subcomponent is inside the parent component.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_0100', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0100 START');
...
...
@@ -66,14 +66,14 @@ export default function flexBase_AutoJsunit() {
expect(textFlex01.right).assertEqual(textFlex02.left)
expect(textFlex02.right).assertEqual(textFlex03.left)
expect(
flex01.right - textFlex03.right
).assertEqual(vp2px(50))
expect(
Math.round(flex01.right - textFlex03.right)
).assertEqual(vp2px(50))
expect(
textFlex01.bottom - textFlex01.top
).assertEqual(vp2px(50))
expect(
textFlex02.bottom - textFlex02.top
).assertEqual(vp2px(100))
expect(
textFlex03.bottom - textFlex03.top
).assertEqual(vp2px(150))
expect(
textFlex01.right - textFlex01.left
).assertEqual(vp2px(150))
expect(
textFlex02.right - textFlex02.left
).assertEqual(vp2px(150))
expect(
textFlex03.right - textFlex03.left
).assertEqual(vp2px(150))
expect(
Math.round(textFlex01.bottom - textFlex01.top)
).assertEqual(vp2px(50))
expect(
Math.round(textFlex02.bottom - textFlex02.top)
).assertEqual(vp2px(100))
expect(
Math.round(textFlex03.bottom - textFlex03.top)
).assertEqual(vp2px(150))
expect(
Math.round(textFlex01.right - textFlex01.left)
).assertEqual(vp2px(150))
expect(
Math.round(textFlex02.right - textFlex02.left)
).assertEqual(vp2px(150))
expect(
Math.round(textFlex03.right - textFlex03.left)
).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0100 END');
...
...
@@ -83,7 +83,7 @@ export default function flexBase_AutoJsunit() {
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0200
* @tc.name ItemAlign_Auto_FlexBase
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
The subcomponent exceeds the parent component.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_0200', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0200 START');
...
...
@@ -102,12 +102,12 @@ export default function flexBase_AutoJsunit() {
expect(textFlex03.right).assertEqual(flex01.right)
expect(textFlex03.bottom).assertLarger(flex01.bottom)
expect(
textFlex01.bottom - textFlex01.top
).assertEqual(vp2px(50))
expect(
textFlex02.bottom - textFlex02.top
).assertEqual(vp2px(100))
expect(
textFlex03.bottom - textFlex03.top
).assertEqual(vp2px(150))
expect(
textFlex01.right - textFlex01.left
).assertEqual(vp2px(140))
expect(
textFlex02.right - textFlex02.left
).assertEqual(vp2px(140))
expect(
textFlex03.right - textFlex03.left
).assertEqual(vp2px(140))
expect(
Math.round(textFlex01.bottom - textFlex01.top)
).assertEqual(vp2px(50))
expect(
Math.round(textFlex02.bottom - textFlex02.top)
).assertEqual(vp2px(100))
expect(
Math.round(textFlex03.bottom - textFlex03.top)
).assertEqual(vp2px(150))
expect(
Math.round(textFlex01.right - textFlex01.left)
).assertEqual(vp2px(140))
expect(
Math.round(textFlex02.right - textFlex02.left)
).assertEqual(vp2px(140))
expect(
Math.round(textFlex03.right - textFlex03.left)
).assertEqual(vp2px(140))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexExceedJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -47,7 +47,7 @@ export default function flexExceed_AutoJsunit() {
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0600
* @tc.name ItemAlign_Auto_FlexExceed
* @tc.desc
aceEtsTest
* @tc.desc
Subcomponent inside when parent component set margin and padding.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_0600', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0600 START');
...
...
@@ -60,17 +60,20 @@ export default function flexExceed_AutoJsunit() {
let textExceed02 = CommonFunc.getComponentRect('textExceed02');
let textExceed03 = CommonFunc.getComponentRect('textExceed03');
let flexExceed01 = CommonFunc.getComponentRect('flexExceed01');
expect(Math.round(textExceed01.left - flexExceed01.left)).assertEqual(vp2px(10))
expect(textExceed01.right).assertEqual(textExceed02.left)
expect(textExceed02.right).assertEqual(textExceed03.left)
expect(Math.round(textExceed01.top - flexExceed01.top)).assertEqual(vp2px(10))
expect(textExceed01.top).assertEqual(textExceed02.top)
expect(textExceed02.top).assertEqual(textExceed03.top)
expect(textExceed01.top).assertLarger(flexExceed01.top)
expect(textExceed01.left).assertLarger(flexExceed01.left)
expect(textExceed03.right).assertLess(flexExceed01.right)
expect(textExceed01.bottom - textExceed01.top).assertEqual(vp2px(50))
expect(textExceed02.bottom - textExceed02.top).assertEqual(vp2px(100))
expect(textExceed03.bottom - textExceed03.top).assertEqual(vp2px(150))
expect(textExceed01.right - textExceed01.left).assertEqual(vp2px(150))
expect(textExceed02.right - textExceed02.left).assertEqual(vp2px(150))
expect(textExceed03.right - textExceed03.left).assertEqual(vp2px(150))
expect(Math.round(textExceed01.bottom - textExceed01.top)).assertEqual(vp2px(50))
expect(Math.round(textExceed02.bottom - textExceed02.top)).assertEqual(vp2px(100))
expect(Math.round(textExceed03.bottom - textExceed03.top)).assertEqual(vp2px(150))
expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(vp2px(150))
expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(vp2px(150))
expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0600 END');
...
...
@@ -80,7 +83,7 @@ export default function flexExceed_AutoJsunit() {
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0700
* @tc.name ItemAlign_Auto_FlexExceed
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
Subcomponent outside when parent component set margin and padding.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_0700', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0700 START');
...
...
@@ -93,14 +96,17 @@ export default function flexExceed_AutoJsunit() {
let textExceed02 = CommonFunc.getComponentRect('textExceed02');
let textExceed03 = CommonFunc.getComponentRect('textExceed03');
let flexExceed01 = CommonFunc.getComponentRect('flexExceed01');
expect(Math.round(textExceed01.left - flexExceed01.left)).assertEqual(vp2px(30))
expect(textExceed01.right).assertEqual(textExceed02.left)
expect(textExceed02.right).assertEqual(textExceed03.left)
expect(Math.round(textExceed01.top - flexExceed01.top)).assertEqual(vp2px(30))
expect(textExceed01.top).assertEqual(textExceed02.top)
expect(textExceed02.top).assertEqual(textExceed03.top)
expect(textExceed01.top).assertLarger(flexExceed01.top)
expect(textExceed01.left).assertLarger(flexExceed01.left)
expect(textExceed03.right).assertLess(flexExceed01.right)
expect(textExceed01.bottom - textExceed01.top).assertEqual(vp2px(50))
expect(textExceed02.bottom - textExceed02.top).assertEqual(vp2px(100))
expect(textExceed03.bottom - textExceed03.top).assertEqual(vp2px(150))
expect(Math.round(textExceed01.bottom - textExceed01.top)).assertEqual(vp2px(50))
expect(Math.round(textExceed02.bottom - textExceed02.top)).assertEqual(vp2px(100))
expect(Math.round(textExceed03.bottom - textExceed03.top)).assertEqual(vp2px(150))
expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(Math.round(vp2px(440/3)))
expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(Math.round(vp2px(440/3)))
expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(Math.round(vp2px(440/3)))
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexHeightModifyJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -47,10 +47,43 @@ export default function flexHeightModify_AutoJsunit() {
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0800
* @tc.name ItemAlign_Auto_FlexHeightModify
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
Check the the default height of the first subcomponent.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_0800', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0800 START');
let strJson1 = getInspectorByKey('flexHeightModify');
let obj1 = JSON.parse(strJson1);
let textHeightModify01 = CommonFunc.getComponentRect('textHeightModify01');
let textHeightModify02 = CommonFunc.getComponentRect('textHeightModify02');
let textHeightModify03 = CommonFunc.getComponentRect('textHeightModify03');
let flexHeightModify = CommonFunc.getComponentRect('flexHeightModify');
expect(textHeightModify01.top).assertEqual(textHeightModify02.top)
expect(textHeightModify02.top).assertEqual(textHeightModify03.top)
expect(textHeightModify01.top).assertEqual(flexHeightModify.top)
expect(textHeightModify01.left).assertEqual(flexHeightModify.left)
expect(textHeightModify02.left).assertEqual(textHeightModify01.right)
expect(Math.round(textHeightModify01.bottom - textHeightModify01.top)).assertEqual(vp2px(50))
expect(Math.round(textHeightModify02.bottom - textHeightModify02.top)).assertEqual(vp2px(100))
expect(Math.round(textHeightModify03.bottom - textHeightModify03.top)).assertEqual(vp2px(150))
expect(Math.round(textHeightModify01.right - textHeightModify01.left)).assertEqual(vp2px(150))
expect(Math.round(textHeightModify02.right - textHeightModify02.left)).assertEqual(vp2px(150))
expect(Math.round(textHeightModify03.right - textHeightModify03.left)).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0800 END');
done();
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0900
* @tc.name ItemAlign_Auto_FlexHeightModify
* @tc.desc Modify the first subcomponent's height.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_0900', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0900 START');
globalThis.value.message.notify({name:'height', value:80})
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexHeightModify');
...
...
@@ -67,15 +100,15 @@ export default function flexHeightModify_AutoJsunit() {
expect(textHeightModify01.left).assertEqual(flexHeightModify.left)
expect(textHeightModify02.left).assertEqual(textHeightModify01.right)
expect(
textHeightModify01.bottom - textHeightModify01.top
).assertEqual(vp2px(80))
expect(
textHeightModify02.bottom - textHeightModify02.top
).assertEqual(vp2px(100))
expect(
textHeightModify03.bottom - textHeightModify03.top
).assertEqual(vp2px(150))
expect(
textHeightModify01.right - textHeightModify01.left
).assertEqual(vp2px(150))
expect(
textHeightModify02.right - textHeightModify02.left
).assertEqual(vp2px(150))
expect(
textHeightModify03.right - textHeightModify03.left
).assertEqual(vp2px(150))
expect(
Math.round(textHeightModify01.bottom - textHeightModify01.top)
).assertEqual(vp2px(80))
expect(
Math.round(textHeightModify02.bottom - textHeightModify02.top)
).assertEqual(vp2px(100))
expect(
Math.round(textHeightModify03.bottom - textHeightModify03.top)
).assertEqual(vp2px(150))
expect(
Math.round(textHeightModify01.right - textHeightModify01.left)
).assertEqual(vp2px(150))
expect(
Math.round(textHeightModify02.right - textHeightModify02.left)
).assertEqual(vp2px(150))
expect(
Math.round(textHeightModify03.right - textHeightModify03.left)
).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0
8
00 END');
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0
9
00 END');
done();
});
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexMarginJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -57,17 +57,20 @@ export default function flexMargin_AutoJsunit() {
let textFlexMargin02 = CommonFunc.getComponentRect('textFlexMargin02');
let textFlexMargin03 = CommonFunc.getComponentRect('textFlexMargin03');
let flexMargin = CommonFunc.getComponentRect('flexMargin');
expect(flexMargin.top).assertEqual(textFlexMargin01.top)
expect(textFlexMargin01.top).assertEqual(textFlexMargin02.top)
expect(textFlexMargin02.top).assertEqual(textFlexMargin03.top)
expect(textFlexMargin03.right).assertLess(flexMargin.right)
expect(textFlexMargin01.left).assertLarger(flexMargin.left)
expect(textFlexMargin01.bottom - textFlexMargin01.top).assertEqual(vp2px(50))
expect(textFlexMargin02.bottom - textFlexMargin02.top).assertEqual(vp2px(100))
expect(textFlexMargin03.bottom - textFlexMargin03.top).assertEqual(vp2px(150))
expect(textFlexMargin01.right - textFlexMargin01.left).assertEqual(vp2px(150))
expect(textFlexMargin02.right - textFlexMargin02.left).assertEqual(vp2px(150))
expect(textFlexMargin03.right - textFlexMargin03.left).assertEqual(vp2px(150))
expect(flexMargin.left).assertEqual(textFlexMargin01.left)
expect(textFlexMargin01.right).assertEqual(textFlexMargin02.left)
expect(textFlexMargin02.right).assertEqual(textFlexMargin03.left)
expect(Math.round(textFlexMargin01.bottom - textFlexMargin01.top)).assertEqual(vp2px(50))
expect(Math.round(textFlexMargin02.bottom - textFlexMargin02.top)).assertEqual(vp2px(100))
expect(Math.round(textFlexMargin03.bottom - textFlexMargin03.top)).assertEqual(vp2px(150))
expect(Math.round(textFlexMargin01.right - textFlexMargin01.left)).assertEqual(vp2px(150))
expect(Math.round(textFlexMargin02.right - textFlexMargin02.left)).assertEqual(vp2px(150))
expect(Math.round(textFlexMargin03.right - textFlexMargin03.left)).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0500 END');
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexOffsetJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -45,33 +45,33 @@ export default function flexOffset_AutoJsunit() {
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_
09
00
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_
10
00
* @tc.name ItemAlign_Auto_FlexOffset
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
First subcomponent set offset attribute.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_
09
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_
09
00 START');
it('SUB_ACE_FLEXALIGNITEMS_AUTO_
10
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_
10
00 START');
let strJson1 = getInspectorByKey('flexOffset');
let obj1 = JSON.parse(strJson1);
let textOffset01 = CommonFunc.getComponentRect('textOffset01');
let textOffset02 = CommonFunc.getComponentRect('textOffset02');
let textOffset03 = CommonFunc.getComponentRect('textOffset03');
let flexOffset = CommonFunc.getComponentRect('flexOffset');
expect(
textOffset01.right - textOffset02.left).assertEqual(vp2px(15)
)
expect(
textOffset01.top - flexOffset.top
).assertEqual(vp2px(30))
expect(
textOffset01.left - flexOffset.left).assertEqual(vp2px(15)
)
expect(
Math.round((textOffset01.right - textOffset02.left)*10)/10).assertEqual(Math.round(vp2px(15)*10)/10
)
expect(
Math.round(textOffset01.top - flexOffset.top)
).assertEqual(vp2px(30))
expect(
Math.round((textOffset01.left - flexOffset.left)*10)/10).assertEqual(Math.round(vp2px(15)*10)/10
)
expect(textOffset02.top).assertEqual(textOffset03.top)
expect(textOffset03.top).assertEqual(flexOffset.top)
expect(
textOffset01.bottom - textOffset01.top
).assertEqual(vp2px(50))
expect(
textOffset02.bottom - textOffset02.top
).assertEqual(vp2px(100))
expect(
textOffset03.bottom - textOffset03.top
).assertEqual(vp2px(150))
expect(
textOffset01.right - textOffset01.left
).assertEqual(vp2px(150))
expect(
textOffset02.right - textOffset02.left
).assertEqual(vp2px(150))
expect(
textOffset03.right - textOffset03.left
).assertEqual(vp2px(150))
expect(
Math.round(textOffset01.bottom - textOffset01.top)
).assertEqual(vp2px(50))
expect(
Math.round(textOffset02.bottom - textOffset02.top)
).assertEqual(vp2px(100))
expect(
Math.round(textOffset03.bottom - textOffset03.top)
).assertEqual(vp2px(150))
expect(
Math.round(textOffset01.right - textOffset01.left)
).assertEqual(vp2px(150))
expect(
Math.round(textOffset02.right - textOffset02.left)
).assertEqual(vp2px(150))
expect(
Math.round(textOffset03.right - textOffset03.left)
).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_
09
00 END');
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_
10
00 END');
done();
});
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexPaddingJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -48,7 +48,7 @@ export default function flexPadding_AutoJsunit() {
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0300
* @tc.name ItemAlign_Auto_testFlexPadding
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
Parent component set paddding,subcomponent does not exceed the parent component.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_0300', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0300 START');
...
...
@@ -60,19 +60,21 @@ export default function flexPadding_AutoJsunit() {
let textFlexPadding02 = CommonFunc.getComponentRect('textFlexPadding02')
let textFlexPadding03 = CommonFunc.getComponentRect('textFlexPadding03')
let flexPadding01 = CommonFunc.getComponentRect('flexPadding01')
expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(10))
expect(textFlexPadding01.right).assertEqual(textFlexPadding02.left)
expect(textFlexPadding02.right).assertEqual(textFlexPadding03.left)
expect(textFlexPadding01.top).assertEqual(textFlexPadding02.top)
expect(textFlexPadding02.top).assertEqual(textFlexPadding03.top)
expect(textFlexPadding01.top - flexPadding01.top).assertEqual(vp2px(10))
expect(textFlexPadding03.right).assertLess(flexPadding01.right)
expect(Math.round(textFlexPadding01.top - flexPadding01.top)).assertEqual(vp2px(10))
expect(
textFlexPadding01.bottom - textFlexPadding01.top
).assertEqual(vp2px(50))
expect(
textFlexPadding02.bottom - textFlexPadding02.top
).assertEqual(vp2px(100))
expect(
textFlexPadding03.bottom - textFlexPadding03.top
).assertEqual(vp2px(150))
expect(
Math.round(textFlexPadding01.bottom - textFlexPadding01.top)
).assertEqual(vp2px(50))
expect(
Math.round(textFlexPadding02.bottom - textFlexPadding02.top)
).assertEqual(vp2px(100))
expect(
Math.round(textFlexPadding03.bottom - textFlexPadding03.top)
).assertEqual(vp2px(150))
expect(
textFlexPadding01.right - textFlexPadding01.left
).assertEqual(vp2px(150))
expect(
textFlexPadding02.right - textFlexPadding02.left
).assertEqual(vp2px(150))
expect(
textFlexPadding03.right - textFlexPadding03.left
).assertEqual(vp2px(150))
expect(
Math.round(textFlexPadding01.right - textFlexPadding01.left)
).assertEqual(vp2px(150))
expect(
Math.round(textFlexPadding02.right - textFlexPadding02.left)
).assertEqual(vp2px(150))
expect(
Math.round(textFlexPadding03.right - textFlexPadding03.left)
).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0300 END');
...
...
@@ -82,7 +84,7 @@ export default function flexPadding_AutoJsunit() {
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0400
* @tc.name ItemAlign_Auto_FlexPadding
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
Parent component set paddding,subcomponent exceedS the parent component.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_0400', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0400 START');
...
...
@@ -94,14 +96,17 @@ export default function flexPadding_AutoJsunit() {
let textFlexPadding02 = CommonFunc.getComponentRect('textFlexPadding02');
let textFlexPadding03 = CommonFunc.getComponentRect('textFlexPadding03');
let flexPadding01 = CommonFunc.getComponentRect('flexPadding01');
expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(30))
expect(textFlexPadding01.right).assertEqual(textFlexPadding02.left)
expect(textFlexPadding02.right).assertEqual(textFlexPadding03.left)
expect(textFlexPadding01.top).assertEqual(textFlexPadding02.top)
expect(textFlexPadding02.top).assertEqual(textFlexPadding03.top)
expect(textFlexPadding01.top - flexPadding01.top).assertEqual(vp2px(30))
expect(textFlexPadding03.right).assertLess(flexPadding01.right)
expect(textFlexPadding01.bottom - textFlexPadding01.top).assertEqual(vp2px(50))
expect(textFlexPadding02.bottom - textFlexPadding02.top).assertEqual(vp2px(100))
expect(textFlexPadding03.bottom - textFlexPadding03.top).assertEqual(vp2px(150))
expect(Math.round(textFlexPadding01.top - flexPadding01.top)).assertEqual(vp2px(30))
expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(50))
expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(100))
expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(150))
expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(Math.round(vp2px(440/3)))
expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(Math.round(vp2px(440/3)))
expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(Math.round(vp2px(440/3)))
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexTextMarginJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -46,12 +46,12 @@ export default function flexTextMargin_AutoJsunit() {
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
3
00
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
4
00
* @tc.name ItemAlign_Auto_TextMargin
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
Subcomponents set margin within the scope of the parent component.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
3
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
3
00 START');
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
4
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
4
00 START');
globalThis.value.message.notify({name:'margin', value:10});
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexTextMargin01');
...
...
@@ -60,31 +60,33 @@ export default function flexTextMargin_AutoJsunit() {
let textMargin02 = CommonFunc.getComponentRect('textMargin02');
let textMargin03 = CommonFunc.getComponentRect('textMargin03');
let flexTextMargin01 = CommonFunc.getComponentRect('flexTextMargin01');
expect(textMargin01.left - flexTextMargin01.left).assertEqual(vp2px(10))
expect(textMargin02.left).assertEqual(textMargin01.right)
expect(textMargin03.right).assertLess(flexTextMargin01.right)
expect(textMargin01.top).assertEqual(textMargin02.top)
expect(Math.round(textMargin01.left - flexTextMargin01.left)).assertEqual(vp2px(10))
expect(Math.round(textMargin02.left - textMargin01.right)).assertEqual(vp2px(10))
expect(textMargin02.right).assertEqual(textMargin03.left)
expect(Math.round(textMargin01.top - flexTextMargin01.top)).assertEqual(vp2px(10))
expect(textMargin02.top).assertEqual(textMargin03.top)
expect(textMargin02.top).assertEqual(flexTextMargin01.top)
expect(textMargin01.bottom - textMargin01.top).assertEqual(vp2px(70))
expect(textMargin02.bottom - textMargin02.top).assertEqual(vp2px(100))
expect(textMargin03.bottom - textMargin03.top).assertEqual(vp2px(150))
expect(textMargin01.right - textMargin01.left).assertEqual(vp2px(170))
expect(textMargin02.right - textMargin02.left).assertEqual(vp2px(150))
expect(textMargin03.right - textMargin03.left).assertEqual(vp2px(150))
expect(textMargin03.top).assertEqual(flexTextMargin01.top)
expect(Math.round(textMargin01.bottom - textMargin01.top)).assertEqual(vp2px(50))
expect(Math.round(textMargin02.bottom - textMargin02.top)).assertEqual(vp2px(100))
expect(Math.round(textMargin03.bottom - textMargin03.top)).assertEqual(vp2px(150))
expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(vp2px(150))
expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(vp2px(150))
expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
3
00 END');
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
4
00 END');
done();
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
4
00
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
5
00
* @tc.name ItemAlign_Auto_TextMargin
* @tc.desc
aceFlexAlignItemTes
t
* @tc.desc
Subcomponents set margin outside the scope of the parent componen
t
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
4
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
4
00 START');
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
5
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
5
00 START');
globalThis.value.message.notify({name:'margin', value:30});
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexTextMargin01');
...
...
@@ -93,21 +95,25 @@ export default function flexTextMargin_AutoJsunit() {
let textMargin02 = CommonFunc.getComponentRect('textMargin02');
let textMargin03 = CommonFunc.getComponentRect('textMargin03');
let flexTextMargin01 = CommonFunc.getComponentRect('flexTextMargin01');
expect(textMargin01.left - flexTextMargin01.left).assertEqual(vp2px(30))
expect(textMargin02.left).assertEqual(textMargin01.right)
expect(Math.round(textMargin01.left - flexTextMargin01.left)).assertEqual(Math.round(vp2px(500/17)))
expect(Math.round(textMargin02.left - textMargin01.right)).assertEqual(Math.round(vp2px(500/17)))
expect(textMargin02.right).assertEqual(textMargin03.left)
expect(textMargin03.right).assertEqual(flexTextMargin01.right)
expect(textMargin01.top).assertEqual(textMargin02.top)
expect(Math.round(textMargin01.top - flexTextMargin01.top)).assertEqual(vp2px(30))
expect(textMargin02.top).assertEqual(textMargin03.top)
expect(textMargin02.top).assertEqual(flexTextMargin01.top)
expect(textMargin01.bottom - textMargin01.top).assertEqual(vp2px(50))
expect(textMargin02.bottom - textMargin02.top).assertEqual(vp2px(100))
expect(textMargin03.bottom - textMargin03.top).assertEqual(vp2px(150))
expect(textMargin01.right - textMargin01.left).assertLess(vp2px(150))
expect(textMargin02.right - textMargin02.left).assertLess(vp2px(150))
expect(textMargin03.right - textMargin03.left).assertLess(vp2px(150))
expect(textMargin03.top).assertEqual(flexTextMargin01.top)
expect(Math.round(textMargin01.bottom - textMargin01.top)).assertEqual(vp2px(50))
expect(Math.round(textMargin02.bottom - textMargin02.top)).assertEqual(vp2px(100))
expect(Math.round(textMargin03.bottom - textMargin03.top)).assertEqual(vp2px(150))
expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(Math.round(vp2px(2500/17)))
expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(Math.round(vp2px(2500/17)))
expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(Math.round(vp2px(2500/17)))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
4
00 END');
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
5
00 END');
done();
});
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets
浏览文件 @
f8cde247
...
...
@@ -46,18 +46,21 @@ export default function flexVisibility_AutoJsunit() {
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
0
00
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
1
00
* @tc.name ItemAlign_Auto_FlexVisibility
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
The first subcomponent set Visibility.None attribute.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
0
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
0
00 START');
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
1
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
1
00 START');
globalThis.value.message.notify({name:'visibility', value:Visibility.None})
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexVisible');
let obj1 = JSON.parse(strJson1);
let strJson2 = getInspectorByKey('textVisible01');
let obj2 = JSON.parse(strJson2);
setTimeout(() =>{
let strJson2 = getInspectorByKey('textVisible01');
let obj2 = JSON.parse(strJson2);
expect(obj2.$attrs.visibility).assertEqual("Visibility.Hidden");
})
let textVisible01 = CommonFunc.getComponentRect('textVisible01')
let textVisible02 = CommonFunc.getComponentRect('textVisible02')
let textVisible03 = CommonFunc.getComponentRect('textVisible03')
...
...
@@ -68,32 +71,34 @@ export default function flexVisibility_AutoJsunit() {
expect(textVisible02.top).assertEqual(textVisible03.top)
expect(textVisible03.top).assertEqual(flexVisible.top)
expect(
textVisible02.bottom - textVisible02.top
).assertEqual(vp2px(100))
expect(
textVisible03.bottom - textVisible03.top
).assertEqual(vp2px(150))
expect(
textVisible02.right - textVisible02.left
).assertEqual(vp2px(150))
expect(
textVisible03.right - textVisible03.left
).assertEqual(vp2px(150))
expect(
Math.round(textVisible02.bottom - textVisible02.top)
).assertEqual(vp2px(100))
expect(
Math.round(textVisible03.bottom - textVisible03.top)
).assertEqual(vp2px(150))
expect(
Math.round(textVisible02.right - textVisible02.left)
).assertEqual(vp2px(150))
expect(
Math.round(textVisible03.right - textVisible03.left)
).assertEqual(vp2px(150))
expect(obj1.$attrs.visibility).assertEqual("Visibility.Visible");
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
expect(obj2.$attrs.visibility).assertEqual("Visibility.None");
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
0
00 END');
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
1
00 END');
done();
});
/**
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
1
00
* @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1
2
00
* @tc.name ItemAlign_Auto_FlexVisibility
* @tc.desc
aceFlexAlignItemTest
* @tc.desc
The first subcomponent set Visibility.Hidden attribute.
*/
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
1
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
1
00 START');
it('SUB_ACE_FLEXALIGNITEMS_AUTO_1
2
00', 0, async function (done) {
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1
2
00 START');
globalThis.value.message.notify({name:'visibility', value:Visibility.Hidden});
await CommonFunc.sleep(2000);
let strJson1 = getInspectorByKey('flexVisible');
let obj1 = JSON.parse(strJson1);
let strJson2 = getInspectorByKey('textVisible01');
let obj2 = JSON.parse(strJson2);
setTimeout(() =>{
let strJson2 = getInspectorByKey('textVisible01');
let obj2 = JSON.parse(strJson2);
expect(obj2.$attrs.visibility).assertEqual("Visibility.Hidden");
})
let textVisible01 = CommonFunc.getComponentRect('textVisible01');
let textVisible02 = CommonFunc.getComponentRect('textVisible02');
let textVisible03 = CommonFunc.getComponentRect('textVisible03');
...
...
@@ -103,16 +108,15 @@ export default function flexVisibility_AutoJsunit() {
expect(textVisible02.top).assertEqual(textVisible03.top)
expect(textVisible03.top).assertEqual(flexVisible.top)
expect(
textVisible01.bottom - textVisible01.top
).assertEqual(vp2px(50))
expect(
textVisible02.bottom - textVisible02.top
).assertEqual(vp2px(100))
expect(
textVisible03.bottom - textVisible03.top
).assertEqual(vp2px(150))
expect(
textVisible01.right - textVisible01.left
).assertEqual(vp2px(150))
expect(
textVisible02.right - textVisible02.left
).assertEqual(vp2px(150))
expect(
textVisible03.right - textVisible03.left
).assertEqual(vp2px(150))
expect(
Math.round(textVisible01.bottom - textVisible01.top)
).assertEqual(vp2px(50))
expect(
Math.round(textVisible02.bottom - textVisible02.top)
).assertEqual(vp2px(100))
expect(
Math.round(textVisible03.bottom - textVisible03.top)
).assertEqual(vp2px(150))
expect(
Math.round(textVisible01.right - textVisible01.left)
).assertEqual(vp2px(150))
expect(
Math.round(textVisible02.right - textVisible02.left)
).assertEqual(vp2px(150))
expect(
Math.round(textVisible03.right - textVisible03.left)
).assertEqual(vp2px(150))
expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row')
expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto')
expect(obj2.$attrs.visibility).assertEqual("Visibility.Hidden");
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1100 END');
console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1200 END');
done();
});
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAlign.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,14 +68,16 @@ export default function AlignCenter_AddAlign() {
expect(Center_AddAlign_011.top).assertEqual(Center_AddAlign_01.top);
expect(Center_AddAlign_012.left).assertEqual(Center_AddAlign_011.right);
expect(Center_AddAlign_013.left).assertEqual(Center_AddAlign_012.right);
expect(Center_AddAlign_011.left - Center_AddAlign_01.left).assertEqual(vp2px(25));
expect(Center_AddAlign_01.right - Center_AddAlign_013.right).assertEqual(vp2px(25));
expect(Center_AddAlign_011.right - Center_AddAlign_011.left).assertEqual(vp2px(150));
expect(Center_AddAlign_012.right - Center_AddAlign_012.left).assertEqual(vp2px(150));
expect(Center_AddAlign_013.right - Center_AddAlign_013.left).assertEqual(vp2px(150));
expect(Center_AddAlign_011.bottom - Center_AddAlign_011.top).assertEqual(vp2px(50));
expect(Center_AddAlign_012.bottom - Center_AddAlign_012.top).assertEqual(vp2px(100));
expect(Center_AddAlign_013.bottom - Center_AddAlign_013.top).assertEqual(vp2px(150));
expect(Math.round((Center_AddAlign_011.left - Center_AddAlign_01.left)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round((Center_AddAlign_01.right - Center_AddAlign_013.right)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round(Center_AddAlign_011.right - Center_AddAlign_011.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddAlign_012.right - Center_AddAlign_012.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddAlign_013.right - Center_AddAlign_013.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddAlign_011.bottom - Center_AddAlign_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddAlign_012.bottom - Center_AddAlign_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddAlign_013.bottom - Center_AddAlign_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0800] END');
done()
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAllSpace.test.ets
浏览文件 @
f8cde247
...
...
@@ -69,17 +69,17 @@ export default function AlignCenter_AddAllSpace() {
expect(Center_AddAllSpace_012.top).assertEqual(Center_AddAllSpace_013.top);
expect(Center_AddAllSpace_012.left).assertEqual(Center_AddAllSpace_011.right);
expect(Center_AddAllSpace_013.left).assertEqual(Center_AddAllSpace_012.right);
expect(
Center_AddAllSpace_011.top - Center_AddAllSpace_01.top
).assertEqual(vp2px(30));
expect(
Center_AddAllSpace_011.left - Center_AddAllSpace_01.left
).assertEqual(vp2px(30));
expect(
Center_AddAllSpace_01.right - Center_AddAllSpace_013.right
).assertEqual(vp2px(30));
expect(
Center_AddAllSpace_01.top - Center_AddAllSpace_01_Box.top
).assertEqual(vp2px(10));
expect(
Center_AddAllSpace_01.left - Center_AddAllSpace_01_Box.left
).assertEqual(vp2px(10));
expect(
Center_AddAllSpace_011.bottom - Center_AddAllSpace_011.top
).assertEqual(vp2px(50));
expect(
Center_AddAllSpace_012.bottom - Center_AddAllSpace_012.top
).assertEqual(vp2px(100));
expect(
Center_AddAllSpace_013.bottom - Center_AddAllSpace_013.top
).assertEqual(vp2px(150));
expect(
Center_AddAllSpace_011.right - Center_AddAllSpace_011.left).assertEqual(vp2px(440/3
));
expect(
Center_AddAllSpace_012.right - Center_AddAllSpace_012.left).assertEqual(vp2px(440/3
));
expect(
Center_AddAllSpace_013.right - Center_AddAllSpace_013.left).assertEqual(vp2px(440/3
));
expect(
Math.round(Center_AddAllSpace_011.top - Center_AddAllSpace_01.top)
).assertEqual(vp2px(30));
expect(
Math.round(Center_AddAllSpace_011.left - Center_AddAllSpace_01.left)
).assertEqual(vp2px(30));
expect(
Math.round(Center_AddAllSpace_01.right - Center_AddAllSpace_013.right)
).assertEqual(vp2px(30));
expect(
Math.round(Center_AddAllSpace_01.top - Center_AddAllSpace_01_Box.top)
).assertEqual(vp2px(10));
expect(
Math.round(Center_AddAllSpace_01.left - Center_AddAllSpace_01_Box.left)
).assertEqual(vp2px(10));
expect(
Math.round(Center_AddAllSpace_011.bottom - Center_AddAllSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Center_AddAllSpace_012.bottom - Center_AddAllSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddAllSpace_013.bottom - Center_AddAllSpace_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddAllSpace_011.right - Center_AddAllSpace_011.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Center_AddAllSpace_012.right - Center_AddAllSpace_012.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Center_AddAllSpace_013.right - Center_AddAllSpace_013.left)).assertEqual(Math.round(vp2px(440/3)
));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0600] END');
done();
});
...
...
@@ -107,17 +107,19 @@ export default function AlignCenter_AddAllSpace() {
expect(Center_AddAllSpace_012.top).assertEqual(Center_AddAllSpace_013.top);
expect(Center_AddAllSpace_012.left).assertEqual(Center_AddAllSpace_011.right);
expect(Center_AddAllSpace_013.left).assertEqual(Center_AddAllSpace_012.right);
expect(Center_AddAllSpace_011.top - Center_AddAllSpace_01.top).assertEqual(vp2px(20));
expect(Center_AddAllSpace_011.left - Center_AddAllSpace_01.left).assertEqual(vp2px(25));
expect(Center_AddAllSpace_01.right - Center_AddAllSpace_013.right).assertEqual(vp2px(25));
expect(Center_AddAllSpace_01.top - Center_AddAllSpace_01_Box.top).assertEqual(vp2px(10));
expect(Center_AddAllSpace_01.left - Center_AddAllSpace_01_Box.left).assertEqual(vp2px(10));
expect(Center_AddAllSpace_011.bottom - Center_AddAllSpace_011.top).assertEqual(vp2px(50));
expect(Center_AddAllSpace_012.bottom - Center_AddAllSpace_012.top).assertEqual(vp2px(100));
expect(Center_AddAllSpace_013.bottom - Center_AddAllSpace_013.top).assertEqual(vp2px(150));
expect(Center_AddAllSpace_011.right - Center_AddAllSpace_011.left).assertEqual(vp2px(150));
expect(Center_AddAllSpace_012.right - Center_AddAllSpace_012.left).assertEqual(vp2px(150));
expect(Center_AddAllSpace_013.right - Center_AddAllSpace_013.left).assertEqual(vp2px(150));
expect(Math.round(Center_AddAllSpace_011.top - Center_AddAllSpace_01.top)).assertEqual(vp2px(20));
expect(Math.round((Center_AddAllSpace_011.left - Center_AddAllSpace_01.left)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round((Center_AddAllSpace_01.right - Center_AddAllSpace_013.right)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round(Center_AddAllSpace_01.top - Center_AddAllSpace_01_Box.top)).assertEqual(vp2px(10));
expect(Math.round(Center_AddAllSpace_01.left - Center_AddAllSpace_01_Box.left)).assertEqual(vp2px(10));
expect(Math.round(Center_AddAllSpace_011.bottom - Center_AddAllSpace_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddAllSpace_012.bottom - Center_AddAllSpace_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddAllSpace_013.bottom - Center_AddAllSpace_013.top)).assertEqual(vp2px(150));
expect(Math.round(Center_AddAllSpace_011.right - Center_AddAllSpace_011.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddAllSpace_012.right - Center_AddAllSpace_012.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddAllSpace_013.right - Center_AddAllSpace_013.left)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.test.ets
浏览文件 @
f8cde247
...
...
@@ -72,12 +72,12 @@ export default function AlignCenter_AddLayoutWeight() {
expect(Center_AddLayoutWeight_012.right).assertEqual(Center_AddLayoutWeight_013.left);
expect(Center_AddLayoutWeight_011.left).assertEqual(Center_AddLayoutWeight_01.left);
expect(Center_AddLayoutWeight_013.right).assertEqual(Center_AddLayoutWeight_01.right);
expect(
Center_AddLayoutWeight_011.right - Center_AddLayoutWeight_011.left
).assertEqual(vp2px(100));
expect(
Center_AddLayoutWeight_012.right - Center_AddLayoutWeight_012.left
).assertEqual(vp2px(200));
expect(
Center_AddLayoutWeight_013.right - Center_AddLayoutWeight_013.left
).assertEqual(vp2px(200));
expect(
Center_AddLayoutWeight_011.bottom - Center_AddLayoutWeight_011.top
).assertEqual(vp2px(50));
expect(
Center_AddLayoutWeight_012.bottom - Center_AddLayoutWeight_012.top
).assertEqual(vp2px(100));
expect(
Center_AddLayoutWeight_013.bottom - Center_AddLayoutWeight_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddLayoutWeight_011.right - Center_AddLayoutWeight_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddLayoutWeight_012.right - Center_AddLayoutWeight_012.left)
).assertEqual(vp2px(200));
expect(
Math.round(Center_AddLayoutWeight_013.right - Center_AddLayoutWeight_013.left)
).assertEqual(vp2px(200));
expect(
Math.round(Center_AddLayoutWeight_011.bottom - Center_AddLayoutWeight_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Center_AddLayoutWeight_012.bottom - Center_AddLayoutWeight_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddLayoutWeight_013.bottom - Center_AddLayoutWeight_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1200] END');
done();
});
...
...
@@ -108,14 +108,14 @@ export default function AlignCenter_AddLayoutWeight() {
expect(Center_AddLayoutWeight_012.right).assertEqual(Center_AddLayoutWeight_013.left);
expect(Center_AddLayoutWeight_011.left).assertEqual(Center_AddLayoutWeight_01.left);
expect(Center_AddLayoutWeight_013.right).assertEqual(Center_AddLayoutWeight_01.right);
let oneWidth =
Center_AddLayoutWeight_011.right - Center_AddLayoutWeight_011.left
;
let twoWidth =
Center_AddLayoutWeight_012.right - Center_AddLayoutWeight_012.left
;
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(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(
Center_AddLayoutWeight_013.right - Center_AddLayoutWeight_013.left
).assertEqual(vp2px(150));
expect(
Center_AddLayoutWeight_011.bottom - Center_AddLayoutWeight_011.top
).assertEqual(vp2px(50));
expect(
Center_AddLayoutWeight_012.bottom - Center_AddLayoutWeight_012.top
).assertEqual(vp2px(100));
expect(
Center_AddLayoutWeight_013.bottom - Center_AddLayoutWeight_013.top
).assertEqual(vp2px(150));
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));
expect(
Math.round(Center_AddLayoutWeight_012.bottom - Center_AddLayoutWeight_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddLayoutWeight_013.bottom - Center_AddLayoutWeight_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1600] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddMargin.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,16 +68,18 @@ export default function AlignCenter_AddMargin() {
expect(Center_AddMargin_013.top).assertEqual(Center_AddMargin_012.top);
expect(Center_AddMargin_012.left).assertEqual(Center_AddMargin_011.right);
expect(Center_AddMargin_013.left).assertEqual(Center_AddMargin_012.right);
expect(Center_AddMargin_01.left - Center_AddMargin_01_Box.left).assertEqual(vp2px(20));
expect(Center_AddMargin_01.top - Center_AddMargin_01_Box.top).assertEqual(vp2px(20));
expect(Center_AddMargin_011.left - Center_AddMargin_01.left).assertEqual(vp2px(25));
expect(Center_AddMargin_01.right - Center_AddMargin_013.right).assertEqual(vp2px(25));
expect(Center_AddMargin_011.bottom - Center_AddMargin_011.top).assertEqual(vp2px(50));
expect(Center_AddMargin_012.bottom - Center_AddMargin_012.top).assertEqual(vp2px(100));
expect(Center_AddMargin_013.bottom - Center_AddMargin_013.top).assertEqual(vp2px(150));
expect(Center_AddMargin_011.right - Center_AddMargin_011.left).assertEqual(vp2px(150));
expect(Center_AddMargin_012.right - Center_AddMargin_012.left).assertEqual(vp2px(150));
expect(Center_AddMargin_013.right - Center_AddMargin_013.left).assertEqual(vp2px(150));
expect(Math.round(Center_AddMargin_01.left - Center_AddMargin_01_Box.left)).assertEqual(vp2px(20));
expect(Math.round(Center_AddMargin_01.top - Center_AddMargin_01_Box.top)).assertEqual(vp2px(20));
expect(Math.round((Center_AddMargin_011.left - Center_AddMargin_01.left)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round((Center_AddMargin_01.right - Center_AddMargin_013.right)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round(Center_AddMargin_011.bottom - Center_AddMargin_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddMargin_012.bottom - Center_AddMargin_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddMargin_013.bottom - Center_AddMargin_013.top)).assertEqual(vp2px(150));
expect(Math.round(Center_AddMargin_011.right - Center_AddMargin_011.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddMargin_012.right - Center_AddMargin_012.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddMargin_013.right - Center_AddMargin_013.left)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0500] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOffset.test.ets
浏览文件 @
f8cde247
...
...
@@ -63,18 +63,21 @@ export default function AlignCenter_AddOffset() {
let Center_AddOffset_012 = CommonFunc.getComponentRect('Center_AddOffset_012');
let Center_AddOffset_013 = CommonFunc.getComponentRect('Center_AddOffset_013');
let Center_AddOffset_01 = CommonFunc.getComponentRect('Center_AddOffset_01');
expect(Center_AddOffset_011.top - Center_AddOffset_01.top).assertEqual(vp2px(15));
expect(Center_AddOffset_011.left - Center_AddOffset_01.left).assertEqual(vp2px(35));
expect(Center_AddOffset_01.right - Center_AddOffset_013.right).assertEqual(vp2px(25));
expect(Math.round((Center_AddOffset_011.top - Center_AddOffset_01.top)*10)/10)
.assertEqual(Math.round(vp2px(15)*10)/10);
expect(Math.round((Center_AddOffset_011.left - Center_AddOffset_01.left)*10)/10)
.assertEqual(Math.round(vp2px(35)*10)/10);
expect(Math.round((Center_AddOffset_01.right - Center_AddOffset_013.right)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Center_AddOffset_012.top).assertEqual(Center_AddOffset_013.top);
expect(Center_AddOffset_012.top).assertEqual(Center_AddOffset_01.top);
expect(Center_AddOffset_013.left).assertEqual(Center_AddOffset_012.right);
expect(
Center_AddOffset_011.right - Center_AddOffset_011.left
).assertEqual(vp2px(150));
expect(
Center_AddOffset_012.right - Center_AddOffset_012.left
).assertEqual(vp2px(150));
expect(
Center_AddOffset_013.right - Center_AddOffset_013.left
).assertEqual(vp2px(150));
expect(
Center_AddOffset_011.bottom - Center_AddOffset_011.top
).assertEqual(vp2px(50));
expect(
Center_AddOffset_012.bottom - Center_AddOffset_012.top
).assertEqual(vp2px(100));
expect(
Center_AddOffset_013.bottom - Center_AddOffset_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddOffset_011.right - Center_AddOffset_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddOffset_012.right - Center_AddOffset_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddOffset_013.right - Center_AddOffset_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddOffset_011.bottom - Center_AddOffset_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Center_AddOffset_012.bottom - Center_AddOffset_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddOffset_013.bottom - Center_AddOffset_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0900] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneMargin.test.ets
浏览文件 @
f8cde247
...
...
@@ -67,16 +67,18 @@ export default function AlignCenter_AddOneMargin() {
expect(Center_AddOneMargin_012.top).assertEqual(Center_AddOneMargin_01.top);
expect(Center_AddOneMargin_013.top).assertEqual(Center_AddOneMargin_012.top);
expect(Center_AddOneMargin_013.left).assertEqual(Center_AddOneMargin_012.right);
expect(Center_AddOneMargin_011.left - Center_AddOneMargin_01.left).assertEqual(vp2px(25));
expect(Center_AddOneMargin_011.top - Center_AddOneMargin_01.top).assertEqual(vp2px(20));
expect(Center_AddOneMargin_012.left - Center_AddOneMargin_011.right).assertEqual(vp2px(20));
expect(Center_AddOneMargin_01.right - Center_AddOneMargin_013.right).assertEqual(vp2px(5));
expect(Center_AddOneMargin_011.bottom - Center_AddOneMargin_011.top).assertEqual(vp2px(50));
expect(Center_AddOneMargin_012.bottom - Center_AddOneMargin_012.top).assertEqual(vp2px(100));
expect(Center_AddOneMargin_013.bottom - Center_AddOneMargin_013.top).assertEqual(vp2px(150));
expect(Center_AddOneMargin_011.right - Center_AddOneMargin_011.left).assertEqual(vp2px(150));
expect(Center_AddOneMargin_012.right - Center_AddOneMargin_012.left).assertEqual(vp2px(150));
expect(Center_AddOneMargin_013.right - Center_AddOneMargin_013.left).assertEqual(vp2px(150));
expect(Math.round((Center_AddOneMargin_011.left - Center_AddOneMargin_01.left)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round(Center_AddOneMargin_011.top - Center_AddOneMargin_01.top)).assertEqual(vp2px(20));
expect(Math.round(Center_AddOneMargin_012.left - Center_AddOneMargin_011.right)).assertEqual(vp2px(20));
expect(Math.round((Center_AddOneMargin_01.right - Center_AddOneMargin_013.right)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Math.round(Center_AddOneMargin_011.bottom - Center_AddOneMargin_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddOneMargin_012.bottom - Center_AddOneMargin_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddOneMargin_013.bottom - Center_AddOneMargin_013.top)).assertEqual(vp2px(150));
expect(Math.round(Center_AddOneMargin_011.right - Center_AddOneMargin_011.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddOneMargin_012.right - Center_AddOneMargin_012.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddOneMargin_013.right - Center_AddOneMargin_013.left)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1400] END');
done();
})
...
...
@@ -101,16 +103,21 @@ export default function AlignCenter_AddOneMargin() {
let Center_AddOneMargin_01 = CommonFunc.getComponentRect('Center_AddOneMargin_01');
expect(Center_AddOneMargin_01.top).assertEqual(Center_AddOneMargin_012.top);
expect(Center_AddOneMargin_013.top).assertEqual(Center_AddOneMargin_012.top);
expect(Center_AddOneMargin_011.left - Center_AddOneMargin_01.left).assertEqual(vp2px(500/17));
expect(Center_AddOneMargin_011.top - Center_AddOneMargin_01.top).assertEqual(vp2px(30));
expect(Center_AddOneMargin_012.left - Center_AddOneMargin_011.right).assertEqual(vp2px(500/17));
expect(Math.round(Center_AddOneMargin_011.left - Center_AddOneMargin_01.left))
.assertEqual(Math.round(vp2px(500/17)));
expect(Math.round(Center_AddOneMargin_011.top - Center_AddOneMargin_01.top)).assertEqual(vp2px(30));
expect(Math.round(Center_AddOneMargin_012.left - Center_AddOneMargin_011.right))
.assertEqual(Math.round(vp2px(500/17)));
expect(Center_AddOneMargin_012.right).assertEqual(Center_AddOneMargin_013.left);
expect(Center_AddOneMargin_011.bottom - Center_AddOneMargin_011.top).assertEqual(vp2px(50));
expect(Center_AddOneMargin_012.bottom - Center_AddOneMargin_012.top).assertEqual(vp2px(100));
expect(Center_AddOneMargin_013.bottom - Center_AddOneMargin_013.top).assertEqual(vp2px(150));
expect(Center_AddOneMargin_011.right - Center_AddOneMargin_011.left).assertEqual(vp2px(2500/17));
expect(Center_AddOneMargin_012.right - Center_AddOneMargin_012.left).assertEqual(vp2px(2500/17));
expect(Center_AddOneMargin_013.right - Center_AddOneMargin_013.left).assertEqual(vp2px(2500/17));
expect(Math.round(Center_AddOneMargin_011.bottom - Center_AddOneMargin_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddOneMargin_012.bottom - Center_AddOneMargin_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddOneMargin_013.bottom - Center_AddOneMargin_013.top)).assertEqual(vp2px(150));
expect(Math.round(Center_AddOneMargin_011.right - Center_AddOneMargin_011.left))
.assertEqual(Math.round(vp2px(2500/17)));
expect(Math.round(Center_AddOneMargin_012.right - Center_AddOneMargin_012.left))
.assertEqual(Math.round(vp2px(2500/17)));
expect(Math.round(Center_AddOneMargin_013.right - Center_AddOneMargin_013.left))
.assertEqual(Math.round(vp2px(2500/17)));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1500] END');
done();
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneWidth.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,14 +68,14 @@ export default function AlignCenter_AddOneWidth() {
expect(Center_AddOneWidth_011.top).assertEqual(Center_AddOneWidth_01.top);
expect(Center_AddOneWidth_011.right).assertEqual(Center_AddOneWidth_012.left);
expect(Center_AddOneWidth_012.right).assertEqual(Center_AddOneWidth_013.left);
expect(
Center_AddOneWidth_011.left - Center_AddOneWidth_01.left
).assertEqual(vp2px(20));
expect(
Center_AddOneWidth_01.right - Center_AddOneWidth_013.right
).assertEqual(vp2px(20));
expect(
Center_AddOneWidth_011.right - Center_AddOneWidth_011.left
).assertEqual(vp2px(160));
expect(
Center_AddOneWidth_012.right - Center_AddOneWidth_012.left
).assertEqual(vp2px(150));
expect(
Center_AddOneWidth_013.right - Center_AddOneWidth_013.left
).assertEqual(vp2px(150));
expect(
Center_AddOneWidth_011.bottom - Center_AddOneWidth_011.top
).assertEqual(vp2px(50));
expect(
Center_AddOneWidth_012.bottom - Center_AddOneWidth_012.top
).assertEqual(vp2px(100));
expect(
Center_AddOneWidth_013.bottom - Center_AddOneWidth_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddOneWidth_011.left - Center_AddOneWidth_01.left)
).assertEqual(vp2px(20));
expect(
Math.round(Center_AddOneWidth_01.right - Center_AddOneWidth_013.right)
).assertEqual(vp2px(20));
expect(
Math.round(Center_AddOneWidth_011.right - Center_AddOneWidth_011.left)
).assertEqual(vp2px(160));
expect(
Math.round(Center_AddOneWidth_012.right - Center_AddOneWidth_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddOneWidth_013.right - Center_AddOneWidth_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddOneWidth_011.bottom - Center_AddOneWidth_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Center_AddOneWidth_012.bottom - Center_AddOneWidth_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddOneWidth_013.bottom - Center_AddOneWidth_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1300] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddPadding.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,15 +68,15 @@ export default function AlignCenter_AddPadding() {
expect(Center_AddPadding_012.top).assertEqual(Center_AddPadding_013.top);
expect(Center_AddPadding_012.left).assertEqual(Center_AddPadding_011.right);
expect(Center_AddPadding_013.left).assertEqual(Center_AddPadding_012.right);
expect(
Center_AddPadding_011.left - Center_AddPadding_01.left
).assertEqual(vp2px(30));
expect(
Center_AddPadding_01.right - Center_AddPadding_013.right
).assertEqual(vp2px(30));
expect(
Center_AddPadding_011.top - Center_AddPadding_01.top
).assertEqual(vp2px(30));
expect(
Center_AddPadding_011.bottom - Center_AddPadding_011.top
).assertEqual(vp2px(50));
expect(
Center_AddPadding_012.bottom - Center_AddPadding_012.top
).assertEqual(vp2px(100));
expect(
Center_AddPadding_013.bottom - Center_AddPadding_013.top
).assertEqual(vp2px(150));
expect(
Center_AddPadding_011.right - Center_AddPadding_011.left).assertEqual(vp2px(440/3
));
expect(
Center_AddPadding_012.right - Center_AddPadding_012.left).assertEqual(vp2px(440/3
));
expect(
Center_AddPadding_013.right - Center_AddPadding_013.left).assertEqual(vp2px(440/3
));
expect(
Math.round(Center_AddPadding_011.left - Center_AddPadding_01.left)
).assertEqual(vp2px(30));
expect(
Math.round(Center_AddPadding_01.right - Center_AddPadding_013.right)
).assertEqual(vp2px(30));
expect(
Math.round(Center_AddPadding_011.top - Center_AddPadding_01.top)
).assertEqual(vp2px(30));
expect(
Math.round(Center_AddPadding_011.bottom - Center_AddPadding_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Center_AddPadding_012.bottom - Center_AddPadding_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddPadding_013.bottom - Center_AddPadding_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddPadding_011.right - Center_AddPadding_011.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Center_AddPadding_012.right - Center_AddPadding_012.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Center_AddPadding_013.right - Center_AddPadding_013.left)).assertEqual(Math.round(vp2px(440/3)
));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0300] END');
done();
});
...
...
@@ -103,15 +103,17 @@ export default function AlignCenter_AddPadding() {
expect(Center_AddPadding_012.top).assertEqual(Center_AddPadding_013.top);
expect(Center_AddPadding_012.left) .assertEqual(Center_AddPadding_011.right);
expect(Center_AddPadding_013.left) .assertEqual(Center_AddPadding_012.right);
expect(Center_AddPadding_011.top - Center_AddPadding_01.top).assertEqual(vp2px(20));
expect(Center_AddPadding_011.left - Center_AddPadding_01.left).assertEqual(vp2px(25));
expect(Center_AddPadding_01.right - Center_AddPadding_013.right).assertEqual(vp2px(25));
expect(Center_AddPadding_011.right - Center_AddPadding_011.left).assertEqual(vp2px(150));
expect(Center_AddPadding_012.right - Center_AddPadding_012.left).assertEqual(vp2px(150));
expect(Center_AddPadding_013.right - Center_AddPadding_013.left).assertEqual(vp2px(150));
expect(Center_AddPadding_011.bottom - Center_AddPadding_011.top).assertEqual(vp2px(50));
expect(Center_AddPadding_012.bottom - Center_AddPadding_012.top).assertEqual(vp2px(100));
expect(Center_AddPadding_013.bottom - Center_AddPadding_013.top).assertEqual(vp2px(150));
expect(Math.round(Center_AddPadding_011.top - Center_AddPadding_01.top)).assertEqual(vp2px(20));
expect(Math.round((Center_AddPadding_011.left - Center_AddPadding_01.left)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round((Center_AddPadding_01.right - Center_AddPadding_013.right)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round(Center_AddPadding_011.right - Center_AddPadding_011.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddPadding_012.right - Center_AddPadding_012.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddPadding_013.right - Center_AddPadding_013.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddPadding_011.bottom - Center_AddPadding_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddPadding_012.bottom - Center_AddPadding_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddPadding_013.bottom - Center_AddPadding_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0400] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddVisibility.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,12 +68,12 @@ export default function AlignCenter_AddVisibility() {
expect(Center_AddVisibility_012.top).assertEqual(Center_AddVisibility_013.top);
expect(Center_AddVisibility_012.top).assertEqual(Center_AddVisibility_01.top);
expect(Center_AddVisibility_012.right).assertEqual(Center_AddVisibility_013.left);
expect(
Center_AddVisibility_012.left - Center_AddVisibility_01.left
).assertEqual(vp2px(100));
expect(
Center_AddVisibility_01.right - Center_AddVisibility_013.right
).assertEqual(vp2px(100));
expect(
Center_AddVisibility_012.right - Center_AddVisibility_012.left
).assertEqual(vp2px(150));
expect(
Center_AddVisibility_013.right - Center_AddVisibility_013.left
).assertEqual(vp2px(150));
expect(
Center_AddVisibility_012.bottom - Center_AddVisibility_012.top
).assertEqual(vp2px(100));
expect(
Center_AddVisibility_013.bottom - Center_AddVisibility_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddVisibility_012.left - Center_AddVisibility_01.left)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddVisibility_01.right - Center_AddVisibility_013.right)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddVisibility_012.right - Center_AddVisibility_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddVisibility_013.right - Center_AddVisibility_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000] END');
done();
});
...
...
@@ -104,14 +104,16 @@ export default function AlignCenter_AddVisibility() {
expect(Center_AddVisibility_012.top).assertEqual(Center_AddVisibility_01.top);
expect(Center_AddVisibility_011.right).assertEqual(Center_AddVisibility_012.left);
expect(Center_AddVisibility_012.right).assertEqual(Center_AddVisibility_013.left);
expect(Center_AddVisibility_011.left - Center_AddVisibility_01.left).assertEqual(vp2px(25));
expect(Center_AddVisibility_01.right - Center_AddVisibility_013.right).assertEqual(vp2px(25));
expect(Center_AddVisibility_011.right - Center_AddVisibility_011.left).assertEqual(vp2px(150));
expect(Center_AddVisibility_012.right - Center_AddVisibility_012.left).assertEqual(vp2px(150));
expect(Center_AddVisibility_013.right - Center_AddVisibility_013.left).assertEqual(vp2px(150));
expect(Center_AddVisibility_011.bottom - Center_AddVisibility_011.top).assertEqual(vp2px(50));
expect(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top).assertEqual(vp2px(100));
expect(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top).assertEqual(vp2px(150));
expect(Math.round((Center_AddVisibility_011.left - Center_AddVisibility_01.left)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round((Center_AddVisibility_01.right - Center_AddVisibility_013.right)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round(Center_AddVisibility_011.right - Center_AddVisibility_011.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddVisibility_012.right - Center_AddVisibility_012.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddVisibility_013.right - Center_AddVisibility_013.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddVisibility_011.bottom - Center_AddVisibility_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100] END');
done();
});
...
...
@@ -142,14 +144,16 @@ export default function AlignCenter_AddVisibility() {
expect(Center_AddVisibility_012.top).assertEqual(Center_AddVisibility_01.top);
expect(Center_AddVisibility_011.right).assertEqual(Center_AddVisibility_012.left);
expect(Center_AddVisibility_012.right).assertEqual(Center_AddVisibility_013.left);
expect(Center_AddVisibility_011.left - Center_AddVisibility_01.left).assertEqual(vp2px(25));
expect(Center_AddVisibility_01.right - Center_AddVisibility_013.right).assertEqual(vp2px(25));
expect(Center_AddVisibility_011.right - Center_AddVisibility_011.left).assertEqual(vp2px(150));
expect(Center_AddVisibility_012.right - Center_AddVisibility_012.left).assertEqual(vp2px(150));
expect(Center_AddVisibility_013.right - Center_AddVisibility_013.left).assertEqual(vp2px(150));
expect(Center_AddVisibility_011.bottom - Center_AddVisibility_011.top).assertEqual(vp2px(50));
expect(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top).assertEqual(vp2px(100));
expect(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top).assertEqual(vp2px(150));
expect(Math.round((Center_AddVisibility_011.left - Center_AddVisibility_01.left)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round((Center_AddVisibility_01.right - Center_AddVisibility_013.right)*10)/10)
.assertEqual(Math.round(vp2px(25)*10)/10);
expect(Math.round(Center_AddVisibility_011.right - Center_AddVisibility_011.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddVisibility_012.right - Center_AddVisibility_012.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddVisibility_013.right - Center_AddVisibility_013.left)).assertEqual(vp2px(150));
expect(Math.round(Center_AddVisibility_011.bottom - Center_AddVisibility_011.top)).assertEqual(vp2px(50));
expect(Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)).assertEqual(vp2px(100));
expect(Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_NoSpace.test.ets
浏览文件 @
f8cde247
...
...
@@ -71,12 +71,12 @@ export default function AlignCenter_NoSpace() {
expect(Center_NoSpace_013.left).assertEqual(Center_NoSpace_012.right);
expect(Center_NoSpace_011.left).assertEqual(Center_NoSpace_01.left);
expect(Center_NoSpace_013.right).assertEqual(Center_NoSpace_01.right);
expect(
Center_NoSpace_011.bottom - Center_NoSpace_011.top
).assertEqual(vp2px(50));
expect(
Center_NoSpace_012.bottom - Center_NoSpace_012.top
).assertEqual(vp2px(100));
expect(
Center_NoSpace_013.bottom - Center_NoSpace_013.top
).assertEqual(vp2px(150));
expect(
Center_NoSpace_011.right - Center_NoSpace_011.left).assertEqual(vp2px(400/3
));
expect(
Center_NoSpace_012.right - Center_NoSpace_012.left).assertEqual(vp2px(400/3
));
expect(
Center_NoSpace_013.right - Center_NoSpace_013.left).assertEqual(vp2px(400/3
));
expect(
Math.round(Center_NoSpace_011.bottom - Center_NoSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Center_NoSpace_012.bottom - Center_NoSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_NoSpace_013.bottom - Center_NoSpace_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Center_NoSpace_011.right - Center_NoSpace_011.left)).assertEqual(Math.round(vp2px(400/3)
));
expect(
Math.round(Center_NoSpace_012.right - Center_NoSpace_012.left)).assertEqual(Math.round(vp2px(400/3)
));
expect(
Math.round(Center_NoSpace_013.right - Center_NoSpace_013.left)).assertEqual(Math.round(vp2px(400/3)
));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0100] END');
done();
});
...
...
@@ -104,15 +104,15 @@ export default function AlignCenter_NoSpace() {
expect(Center_NoSpace_011.top).assertEqual(Center_NoSpace_01.top);
expect(Center_NoSpace_011.right).assertEqual(Center_NoSpace_012.left);
expect(Center_NoSpace_013.left).assertEqual(Center_NoSpace_012.right);
expect(
Center_NoSpace_011.left - Center_NoSpace_01.left
)
.assertEqual(
Center_NoSpace_01.right - Center_NoSpace_013.right
);
expect(
Center_NoSpace_011.left - Center_NoSpace_01.left).assertEqual(vp2px(25)
);
expect(
Center_NoSpace_011.right - Center_NoSpace_011.left
).assertEqual(vp2px(150));
expect(
Center_NoSpace_012.right - Center_NoSpace_012.left
).assertEqual(vp2px(150));
expect(
Center_NoSpace_013.right - Center_NoSpace_013.left
).assertEqual(vp2px(150));
expect(
Center_NoSpace_011.bottom - Center_NoSpace_011.top
).assertEqual(vp2px(50));
expect(
Center_NoSpace_012.bottom - Center_NoSpace_012.top
).assertEqual(vp2px(100));
expect(
Center_NoSpace_013.bottom - Center_NoSpace_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Center_NoSpace_011.left - Center_NoSpace_01.left)
)
.assertEqual(
Math.round(Center_NoSpace_01.right - Center_NoSpace_013.right)
);
expect(
Math.round((Center_NoSpace_011.left - Center_NoSpace_01.left)*10)/10).assertEqual(Math.round(vp2px(25)*10)/10
);
expect(
Math.round(Center_NoSpace_011.right - Center_NoSpace_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_NoSpace_012.right - Center_NoSpace_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_NoSpace_013.right - Center_NoSpace_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Center_NoSpace_011.bottom - Center_NoSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Center_NoSpace_012.bottom - Center_NoSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Center_NoSpace_013.bottom - Center_NoSpace_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0200] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAlign.test.ets
浏览文件 @
f8cde247
...
...
@@ -69,13 +69,13 @@ export default function AlignEnd_AddAlign() {
expect(End_AddAlign_012.left).assertEqual(End_AddAlign_011.right );
expect(End_AddAlign_013.left).assertEqual(End_AddAlign_012.right );
expect(End_AddAlign_013.right).assertEqual(End_AddAlign_01.right );
expect(
End_AddAlign_011.left - End_AddAlign_01.left
).assertEqual(vp2px(50));
expect(
End_AddAlign_011.right - End_AddAlign_011.left
).assertEqual(vp2px(150));
expect(
End_AddAlign_012.right - End_AddAlign_012.left
).assertEqual(vp2px(150));
expect(
End_AddAlign_013.right - End_AddAlign_013.left
).assertEqual(vp2px(150));
expect(
End_AddAlign_011.bottom - End_AddAlign_011.top
).assertEqual(vp2px(50));
expect(
End_AddAlign_012.bottom - End_AddAlign_012.top
).assertEqual(vp2px(100));
expect(
End_AddAlign_013.bottom - End_AddAlign_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAlign_011.left - End_AddAlign_01.left)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddAlign_011.right - End_AddAlign_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAlign_012.right - End_AddAlign_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAlign_013.right - End_AddAlign_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAlign_011.bottom - End_AddAlign_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddAlign_012.bottom - End_AddAlign_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddAlign_013.bottom - End_AddAlign_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0800] END');
done()
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAllSpace.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,17 +68,17 @@ export default function AlignEnd_AddAllSpace() {
expect(End_AddAllSpace_012.top).assertEqual(End_AddAllSpace_013.top);
expect(End_AddAllSpace_012.left).assertEqual(End_AddAllSpace_011.right);
expect(End_AddAllSpace_013.left).assertEqual(End_AddAllSpace_012.right);
expect(
End_AddAllSpace_011.left - End_AddAllSpace_01.left
).assertEqual(vp2px(30));
expect(
End_AddAllSpace_01.right - End_AddAllSpace_013.right
).assertEqual(vp2px(30));
expect(
End_AddAllSpace_011.top - End_AddAllSpace_01.top
).assertEqual(vp2px(30));
expect(
End_AddAllSpace_01.left - End_AddAllSpace_01_Box.left
).assertEqual(vp2px(10));
expect(
End_AddAllSpace_01.top - End_AddAllSpace_01_Box.top
).assertEqual(vp2px(10));
expect(
End_AddAllSpace_011.bottom - End_AddAllSpace_011.top
).assertEqual(vp2px(50));
expect(
End_AddAllSpace_012.bottom - End_AddAllSpace_012.top
).assertEqual(vp2px(100));
expect(
End_AddAllSpace_013.bottom - End_AddAllSpace_013.top
).assertEqual(vp2px(150));
expect(
End_AddAllSpace_011.right - End_AddAllSpace_011.left).assertEqual(vp2px(440/3
));
expect(
End_AddAllSpace_012.right - End_AddAllSpace_012.left).assertEqual(vp2px(440/3
));
expect(
End_AddAllSpace_013.right - End_AddAllSpace_013.left).assertEqual(vp2px(440/3
));
expect(
Math.round(End_AddAllSpace_011.left - End_AddAllSpace_01.left)
).assertEqual(vp2px(30));
expect(
Math.round(End_AddAllSpace_01.right - End_AddAllSpace_013.right)
).assertEqual(vp2px(30));
expect(
Math.round(End_AddAllSpace_011.top - End_AddAllSpace_01.top)
).assertEqual(vp2px(30));
expect(
Math.round(End_AddAllSpace_01.left - End_AddAllSpace_01_Box.left)
).assertEqual(vp2px(10));
expect(
Math.round(End_AddAllSpace_01.top - End_AddAllSpace_01_Box.top)
).assertEqual(vp2px(10));
expect(
Math.round(End_AddAllSpace_011.bottom - End_AddAllSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddAllSpace_012.bottom - End_AddAllSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddAllSpace_013.bottom - End_AddAllSpace_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAllSpace_011.right - End_AddAllSpace_011.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(End_AddAllSpace_012.right - End_AddAllSpace_012.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(End_AddAllSpace_013.right - End_AddAllSpace_013.left)).assertEqual(Math.round(vp2px(440/3)
));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0600] END');
done();
});
...
...
@@ -106,17 +106,17 @@ export default function AlignEnd_AddAllSpace() {
expect(End_AddAllSpace_012.top).assertEqual(End_AddAllSpace_013.top);
expect(End_AddAllSpace_012.left).assertEqual(End_AddAllSpace_011.right);
expect(End_AddAllSpace_013.left).assertEqual(End_AddAllSpace_012.right);
expect(
End_AddAllSpace_011.left - End_AddAllSpace_01.left
).assertEqual(vp2px(30));
expect(
End_AddAllSpace_01.right - End_AddAllSpace_013.right
).assertEqual(vp2px(20));
expect(
End_AddAllSpace_011.top - End_AddAllSpace_01.top
).assertEqual(vp2px(20));
expect(
End_AddAllSpace_01.left - End_AddAllSpace_01_Box.left
).assertEqual(vp2px(10));
expect(
End_AddAllSpace_01.top - End_AddAllSpace_01_Box.top
).assertEqual(vp2px(10));
expect(
End_AddAllSpace_011.right - End_AddAllSpace_011.left
).assertEqual(vp2px(150));
expect(
End_AddAllSpace_012.right - End_AddAllSpace_012.left
).assertEqual(vp2px(150));
expect(
End_AddAllSpace_013.right - End_AddAllSpace_013.left
).assertEqual(vp2px(150));
expect(
End_AddAllSpace_011.bottom - End_AddAllSpace_011.top
).assertEqual(vp2px(50));
expect(
End_AddAllSpace_012.bottom - End_AddAllSpace_012.top
).assertEqual(vp2px(100));
expect(
End_AddAllSpace_013.bottom - End_AddAllSpace_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAllSpace_011.left - End_AddAllSpace_01.left)
).assertEqual(vp2px(30));
expect(
Math.round(End_AddAllSpace_01.right - End_AddAllSpace_013.right)
).assertEqual(vp2px(20));
expect(
Math.round(End_AddAllSpace_011.top - End_AddAllSpace_01.top)
).assertEqual(vp2px(20));
expect(
Math.round(End_AddAllSpace_01.left - End_AddAllSpace_01_Box.left)
).assertEqual(vp2px(10));
expect(
Math.round(End_AddAllSpace_01.top - End_AddAllSpace_01_Box.top)
).assertEqual(vp2px(10));
expect(
Math.round(End_AddAllSpace_011.right - End_AddAllSpace_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAllSpace_012.right - End_AddAllSpace_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAllSpace_013.right - End_AddAllSpace_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddAllSpace_011.bottom - End_AddAllSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddAllSpace_012.bottom - End_AddAllSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddAllSpace_013.bottom - End_AddAllSpace_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.test.ets
浏览文件 @
f8cde247
...
...
@@ -72,12 +72,12 @@ export default function AlignEnd_AddLayoutWeight() {
expect(End_AddLayoutWeight_012.right).assertEqual(End_AddLayoutWeight_013.left);
expect(End_AddLayoutWeight_011.left).assertEqual(End_AddLayoutWeight_01.left);
expect(End_AddLayoutWeight_013.right).assertEqual(End_AddLayoutWeight_01.right);
expect(
End_AddLayoutWeight_011.right - End_AddLayoutWeight_011.left
).assertEqual(vp2px(100));
expect(
End_AddLayoutWeight_012.right - End_AddLayoutWeight_012.left
).assertEqual(vp2px(200));
expect(
End_AddLayoutWeight_013.right - End_AddLayoutWeight_013.left
).assertEqual(vp2px(200));
expect(
End_AddLayoutWeight_011.bottom - End_AddLayoutWeight_011.top
).assertEqual(vp2px(50));
expect(
End_AddLayoutWeight_012.bottom - End_AddLayoutWeight_012.top
).assertEqual(vp2px(100));
expect(
End_AddLayoutWeight_013.bottom - End_AddLayoutWeight_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddLayoutWeight_011.right - End_AddLayoutWeight_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddLayoutWeight_012.right - End_AddLayoutWeight_012.left)
).assertEqual(vp2px(200));
expect(
Math.round(End_AddLayoutWeight_013.right - End_AddLayoutWeight_013.left)
).assertEqual(vp2px(200));
expect(
Math.round(End_AddLayoutWeight_011.bottom - End_AddLayoutWeight_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddLayoutWeight_012.bottom - End_AddLayoutWeight_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddLayoutWeight_013.bottom - End_AddLayoutWeight_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1200] END');
done();
});
...
...
@@ -108,14 +108,14 @@ export default function AlignEnd_AddLayoutWeight() {
expect(End_AddLayoutWeight_012.right).assertEqual(End_AddLayoutWeight_013.left);
expect(End_AddLayoutWeight_011.left).assertEqual(End_AddLayoutWeight_01.left);
expect(End_AddLayoutWeight_013.right).assertEqual(End_AddLayoutWeight_01.right);
let oneWidth =
End_AddLayoutWeight_011.right - End_AddLayoutWeight_011.left
;
let twoWidth =
End_AddLayoutWeight_012.right - End_AddLayoutWeight_012.left
;
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(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(
End_AddLayoutWeight_013.right - End_AddLayoutWeight_013.left
).assertEqual(vp2px(150));
expect(
End_AddLayoutWeight_011.bottom - End_AddLayoutWeight_011.top
).assertEqual(vp2px(50));
expect(
End_AddLayoutWeight_012.bottom - End_AddLayoutWeight_012.top
).assertEqual(vp2px(100));
expect(
End_AddLayoutWeight_013.bottom - End_AddLayoutWeight_013.top
).assertEqual(vp2px(150));
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));
expect(
Math.round(End_AddLayoutWeight_012.bottom - End_AddLayoutWeight_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddLayoutWeight_013.bottom - End_AddLayoutWeight_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1600] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddMargin.test.ets
浏览文件 @
f8cde247
...
...
@@ -70,15 +70,15 @@ export default function AlignEnd_AddMargin() {
expect(End_AddMargin_012.left).assertEqual(End_AddMargin_011.right);
expect(End_AddMargin_013.left).assertEqual(End_AddMargin_012.right);
expect(End_AddMargin_013.right).assertEqual(End_AddMargin_01.right);
expect(
End_AddMargin_01.left - End_AddMargin_01_Box.left
).assertEqual(vp2px(20));
expect(
End_AddMargin_01.top - End_AddMargin_01_Box.top
).assertEqual(vp2px(20));
expect(
End_AddMargin_011.left - End_AddMargin_01.left
).assertEqual(vp2px(50));
expect(
End_AddMargin_011.bottom - End_AddMargin_011.top
).assertEqual(vp2px(50));
expect(
End_AddMargin_012.bottom - End_AddMargin_012.top
).assertEqual(vp2px(100));
expect(
End_AddMargin_013.bottom - End_AddMargin_013.top
).assertEqual(vp2px(150));
expect(
End_AddMargin_011.right - End_AddMargin_011.left
).assertEqual(vp2px(150));
expect(
End_AddMargin_012.right - End_AddMargin_012.left
).assertEqual(vp2px(150));
expect(
End_AddMargin_013.right - End_AddMargin_013.left
).assertEqual(vp2px(150));
expect(
Math.round(End_AddMargin_01.left - End_AddMargin_01_Box.left)
).assertEqual(vp2px(20));
expect(
Math.round(End_AddMargin_01.top - End_AddMargin_01_Box.top)
).assertEqual(vp2px(20));
expect(
Math.round(End_AddMargin_011.left - End_AddMargin_01.left)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddMargin_011.bottom - End_AddMargin_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddMargin_012.bottom - End_AddMargin_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddMargin_013.bottom - End_AddMargin_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddMargin_011.right - End_AddMargin_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddMargin_012.right - End_AddMargin_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddMargin_013.right - End_AddMargin_013.left)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0500] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOffset.test.ets
浏览文件 @
f8cde247
...
...
@@ -63,19 +63,19 @@ export default function AlignEnd_AddOffset() {
let End_AddOffset_012 = CommonFunc.getComponentRect('End_AddOffset_012');
let End_AddOffset_013 = CommonFunc.getComponentRect('End_AddOffset_013');
let End_AddOffset_01 = CommonFunc.getComponentRect('End_AddOffset_01');
expect(
End_AddOffset_011.top - End_AddOffset_01.top).assertEqual(vp2px(15)
);
expect(
End_AddOffset_011.right - End_AddOffset_012.left
).assertEqual(vp2px(10));
expect(
End_AddOffset_011.left - End_AddOffset_01.left
).assertEqual(vp2px(60));
expect(
Math.round((End_AddOffset_011.top - End_AddOffset_01.top)*10)/10).assertEqual(Math.round(vp2px(15)*10)/10
);
expect(
Math.round(End_AddOffset_011.right - End_AddOffset_012.left)
).assertEqual(vp2px(10));
expect(
Math.round(End_AddOffset_011.left - End_AddOffset_01.left)
).assertEqual(vp2px(60));
expect(End_AddOffset_012.top).assertEqual(End_AddOffset_013.top);
expect(End_AddOffset_012.top).assertEqual(End_AddOffset_01.top);
expect(End_AddOffset_013.left).assertEqual(End_AddOffset_012.right);
expect(End_AddOffset_01.right).assertEqual(End_AddOffset_013.right);
expect(
End_AddOffset_011.right - End_AddOffset_011.left
).assertEqual(vp2px(150));
expect(
End_AddOffset_012.right - End_AddOffset_012.left
).assertEqual(vp2px(150));
expect(
End_AddOffset_013.right - End_AddOffset_013.left
).assertEqual(vp2px(150));
expect(
End_AddOffset_011.bottom - End_AddOffset_011.top
).assertEqual(vp2px(50));
expect(
End_AddOffset_012.bottom - End_AddOffset_012.top
).assertEqual(vp2px(100));
expect(
End_AddOffset_013.bottom - End_AddOffset_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOffset_011.right - End_AddOffset_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOffset_012.right - End_AddOffset_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOffset_013.right - End_AddOffset_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOffset_011.bottom - End_AddOffset_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddOffset_012.bottom - End_AddOffset_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddOffset_013.bottom - End_AddOffset_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0900] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneMargin.test.ets
浏览文件 @
f8cde247
...
...
@@ -64,19 +64,19 @@ export default function AlignEnd_AddOneMargin() {
let End_AddOneMargin_012 = CommonFunc.getComponentRect('End_AddOneMargin_012');
let End_AddOneMargin_013 = CommonFunc.getComponentRect('End_AddOneMargin_013');
let End_AddOneMargin_01 = CommonFunc.getComponentRect('End_AddOneMargin_01');
expect(
End_AddOneMargin_011.top - End_AddOneMargin_01.top
).assertEqual(vp2px(20));
expect(
End_AddOneMargin_012.left - End_AddOneMargin_011.right
).assertEqual(vp2px(20));
expect(
End_AddOneMargin_011.left - End_AddOneMargin_01.left
).assertEqual(vp2px(30));
expect(
Math.round(End_AddOneMargin_011.top - End_AddOneMargin_01.top)
).assertEqual(vp2px(20));
expect(
Math.round(End_AddOneMargin_012.left - End_AddOneMargin_011.right)
).assertEqual(vp2px(20));
expect(
Math.round(End_AddOneMargin_011.left - End_AddOneMargin_01.left)
).assertEqual(vp2px(30));
expect(End_AddOneMargin_013.top).assertEqual(End_AddOneMargin_012.top);
expect(End_AddOneMargin_012.top).assertEqual(End_AddOneMargin_01.top);
expect(End_AddOneMargin_013.left).assertEqual(End_AddOneMargin_012.right);
expect(End_AddOneMargin_013.right).assertEqual(End_AddOneMargin_01.right);
expect(
End_AddOneMargin_011.bottom - End_AddOneMargin_011.top
).assertEqual(vp2px(50));
expect(
End_AddOneMargin_012.bottom - End_AddOneMargin_012.top
).assertEqual(vp2px(100));
expect(
End_AddOneMargin_013.bottom - End_AddOneMargin_013.top
).assertEqual(vp2px(150));
expect(
End_AddOneMargin_011.right - End_AddOneMargin_011.left
).assertEqual(vp2px(150));
expect(
End_AddOneMargin_012.right - End_AddOneMargin_012.left
).assertEqual(vp2px(150));
expect(
End_AddOneMargin_013.right - End_AddOneMargin_013.left
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOneMargin_011.bottom - End_AddOneMargin_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddOneMargin_012.bottom - End_AddOneMargin_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddOneMargin_013.bottom - End_AddOneMargin_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOneMargin_011.right - End_AddOneMargin_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOneMargin_012.right - End_AddOneMargin_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOneMargin_013.right - End_AddOneMargin_013.left)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1400] END');
done();
})
...
...
@@ -99,19 +99,19 @@ export default function AlignEnd_AddOneMargin() {
let End_AddOneMargin_012 = CommonFunc.getComponentRect('End_AddOneMargin_012');
let End_AddOneMargin_013 = CommonFunc.getComponentRect('End_AddOneMargin_013');
let End_AddOneMargin_01 = CommonFunc.getComponentRect('End_AddOneMargin_01');
expect(
End_AddOneMargin_011.top - End_AddOneMargin_01.top
).assertEqual(vp2px(30));
expect(
End_AddOneMargin_012.left - End_AddOneMargin_011.right).assertEqual(vp2px(500/17
));
expect(
End_AddOneMargin_011.left - End_AddOneMargin_01.left).assertEqual(vp2px(500/17
));
expect(
Math.round(End_AddOneMargin_011.top - End_AddOneMargin_01.top)
).assertEqual(vp2px(30));
expect(
Math.round(End_AddOneMargin_012.left - End_AddOneMargin_011.right)).assertEqual(Math.round(vp2px(500/17)
));
expect(
Math.round(End_AddOneMargin_011.left - End_AddOneMargin_01.left)).assertEqual(Math.round(vp2px(500/17)
));
expect(End_AddOneMargin_013.top).assertEqual(End_AddOneMargin_012.top);
expect(End_AddOneMargin_012.top).assertEqual(End_AddOneMargin_01.top);
expect(End_AddOneMargin_013.left).assertEqual(End_AddOneMargin_012.right);
expect(End_AddOneMargin_013.right).assertEqual(End_AddOneMargin_01.right);
expect(
End_AddOneMargin_011.bottom - End_AddOneMargin_011.top
).assertEqual(vp2px(50));
expect(
End_AddOneMargin_012.bottom - End_AddOneMargin_012.top
).assertEqual(vp2px(100));
expect(
End_AddOneMargin_013.bottom - End_AddOneMargin_013.top
).assertEqual(vp2px(150));
expect(
End_AddOneMargin_011.right - End_AddOneMargin_011.left).assertEqual(vp2px(2500/17
));
expect(
End_AddOneMargin_012.right - End_AddOneMargin_012.left).assertEqual(vp2px(2500/17
));
expect(
End_AddOneMargin_013.right - End_AddOneMargin_013.left).assertEqual(vp2px(2500/17
));
expect(
Math.round(End_AddOneMargin_011.bottom - End_AddOneMargin_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddOneMargin_012.bottom - End_AddOneMargin_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddOneMargin_013.bottom - End_AddOneMargin_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOneMargin_011.right - End_AddOneMargin_011.left)).assertEqual(Math.round(vp2px(2500/17)
));
expect(
Math.round(End_AddOneMargin_012.right - End_AddOneMargin_012.left)).assertEqual(Math.round(vp2px(2500/17)
));
expect(
Math.round(End_AddOneMargin_013.right - End_AddOneMargin_013.left)).assertEqual(Math.round(vp2px(2500/17)
));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1500] END');
done();
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneWidth.test.ets
浏览文件 @
f8cde247
...
...
@@ -69,13 +69,13 @@ export default function AlignEnd_AddOneWidth() {
expect(End_AddOneWidth_011.top).assertEqual(End_AddOneWidth_012.top);
expect(End_AddOneWidth_013.top).assertEqual(End_AddOneWidth_012.top);
expect(End_AddOneWidth_01.top).assertEqual(End_AddOneWidth_011.top);
expect(
End_AddOneWidth_011.left - End_AddOneWidth_01.left
).assertEqual(vp2px(40));
expect(
End_AddOneWidth_011.right - End_AddOneWidth_011.left
).assertEqual(vp2px(160));
expect(
End_AddOneWidth_012.right - End_AddOneWidth_012.left
).assertEqual(vp2px(150));
expect(
End_AddOneWidth_013.right - End_AddOneWidth_013.left
).assertEqual(vp2px(150));
expect(
End_AddOneWidth_011.bottom - End_AddOneWidth_011.top
).assertEqual(vp2px(50));
expect(
End_AddOneWidth_012.bottom - End_AddOneWidth_012.top
).assertEqual(vp2px(100));
expect(
End_AddOneWidth_013.bottom - End_AddOneWidth_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOneWidth_011.left - End_AddOneWidth_01.left)
).assertEqual(vp2px(40));
expect(
Math.round(End_AddOneWidth_011.right - End_AddOneWidth_011.left)
).assertEqual(vp2px(160));
expect(
Math.round(End_AddOneWidth_012.right - End_AddOneWidth_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOneWidth_013.right - End_AddOneWidth_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddOneWidth_011.bottom - End_AddOneWidth_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddOneWidth_012.bottom - End_AddOneWidth_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddOneWidth_013.bottom - End_AddOneWidth_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1300] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddPadding.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,15 +68,15 @@ export default function AlignEnd_AddPadding() {
expect(End_AddPadding_012.top).assertEqual(End_AddPadding_013.top);
expect(End_AddPadding_012.left).assertEqual(End_AddPadding_011.right);
expect(End_AddPadding_013.left).assertEqual(End_AddPadding_012.right);
expect(
End_AddPadding_011.top - End_AddPadding_01.top
).assertEqual(vp2px(30));
expect(
End_AddPadding_011.left - End_AddPadding_01.left
).assertEqual(vp2px(30));
expect(
End_AddPadding_01.right - End_AddPadding_013.right
).assertEqual(vp2px(30));
expect(
End_AddPadding_011.bottom - End_AddPadding_011.top
).assertEqual(vp2px(50));
expect(
End_AddPadding_012.bottom - End_AddPadding_012.top
).assertEqual(vp2px(100));
expect(
End_AddPadding_013.bottom - End_AddPadding_013.top
).assertEqual(vp2px(150));
expect(
End_AddPadding_011.right - End_AddPadding_011.left
).assertEqual(vp2px(440/3));
expect(
End_AddPadding_012.right - End_AddPadding_012.left
).assertEqual(vp2px(440/3));
expect(
End_AddPadding_013.right - End_AddPadding_013.left
).assertEqual(vp2px(440/3));
expect(
Math.round(End_AddPadding_011.top - End_AddPadding_01.top)
).assertEqual(vp2px(30));
expect(
Math.round(End_AddPadding_011.left - End_AddPadding_01.left)
).assertEqual(vp2px(30));
expect(
Math.round(End_AddPadding_01.right - End_AddPadding_013.right)
).assertEqual(vp2px(30));
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));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0300] END');
done();
});
...
...
@@ -103,15 +103,15 @@ export default function AlignEnd_AddPadding() {
expect(End_AddPadding_012.top).assertEqual(End_AddPadding_013.top);
expect(End_AddPadding_011.right).assertEqual(End_AddPadding_012.left);
expect(End_AddPadding_012.right).assertEqual(End_AddPadding_013.left);
expect(
End_AddPadding_011.top - End_AddPadding_01.top
).assertEqual(vp2px(20));
expect(
End_AddPadding_011.left - End_AddPadding_01.left
).assertEqual(vp2px(30));
expect(
End_AddPadding_01.right - End_AddPadding_013.right
).assertEqual(vp2px(20));
expect(
End_AddPadding_011.right - End_AddPadding_011.left
).assertEqual(vp2px(150));
expect(
End_AddPadding_012.right - End_AddPadding_012.left
).assertEqual(vp2px(150));
expect(
End_AddPadding_013.right - End_AddPadding_013.left
).assertEqual(vp2px(150));
expect(
End_AddPadding_011.bottom - End_AddPadding_011.top
).assertEqual(vp2px(50));
expect(
End_AddPadding_012.bottom - End_AddPadding_012.top
).assertEqual(vp2px(100));
expect(
End_AddPadding_013.bottom - End_AddPadding_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddPadding_011.top - End_AddPadding_01.top)
).assertEqual(vp2px(20));
expect(
Math.round(End_AddPadding_011.left - End_AddPadding_01.left)
).assertEqual(vp2px(30));
expect(
Math.round(End_AddPadding_01.right - End_AddPadding_013.right)
).assertEqual(vp2px(20));
expect(
Math.round(End_AddPadding_011.right - End_AddPadding_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddPadding_012.right - End_AddPadding_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddPadding_013.right - End_AddPadding_013.left)
).assertEqual(vp2px(150));
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));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0400] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets
浏览文件 @
f8cde247
...
...
@@ -69,11 +69,11 @@ export default function AlignEnd_AddVisibility() {
expect(End_AddVisibility_012.top).assertEqual(End_AddVisibility_01.top);
expect(End_AddVisibility_012.right).assertEqual(End_AddVisibility_013.left);
expect(End_AddVisibility_013.right).assertEqual(End_AddVisibility_01.right);
expect(
End_AddVisibility_012.left - End_AddVisibility_01.left
).assertEqual(vp2px(200));
expect(
End_AddVisibility_012.right - End_AddVisibility_012.left
).assertEqual(vp2px(150));
expect(
End_AddVisibility_013.right - End_AddVisibility_013.left
).assertEqual(vp2px(150));
expect(
End_AddVisibility_012.bottom - End_AddVisibility_012.top
).assertEqual(vp2px(100));
expect(
End_AddVisibility_013.bottom - End_AddVisibility_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_012.left - End_AddVisibility_01.left)
).assertEqual(vp2px(200));
expect(
Math.round(End_AddVisibility_012.right - End_AddVisibility_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_013.right - End_AddVisibility_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000] END');
done();
});
...
...
@@ -105,13 +105,13 @@ export default function AlignEnd_AddVisibility() {
expect(End_AddVisibility_011.right).assertEqual(End_AddVisibility_012.left);
expect(End_AddVisibility_013.right).assertEqual(End_AddVisibility_01.right);
expect(End_AddVisibility_013.left).assertEqual(End_AddVisibility_012.right);
expect(
End_AddVisibility_011.left - End_AddVisibility_01.left
).assertEqual(vp2px(50));
expect(
End_AddVisibility_011.right - End_AddVisibility_011.left
).assertEqual(vp2px(150));
expect(
End_AddVisibility_012.right - End_AddVisibility_012.left
).assertEqual(vp2px(150));
expect(
End_AddVisibility_013.right - End_AddVisibility_013.left
).assertEqual(vp2px(150));
expect(
End_AddVisibility_011.bottom - End_AddVisibility_011.top
).assertEqual(vp2px(50));
expect(
End_AddVisibility_012.bottom - End_AddVisibility_012.top
).assertEqual(vp2px(100));
expect(
End_AddVisibility_013.bottom - End_AddVisibility_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_011.left - End_AddVisibility_01.left)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddVisibility_011.right - End_AddVisibility_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_012.right - End_AddVisibility_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_013.right - End_AddVisibility_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_011.bottom - End_AddVisibility_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100] END');
done();
});
...
...
@@ -143,13 +143,13 @@ export default function AlignEnd_AddVisibility() {
expect(End_AddVisibility_011.right).assertEqual(End_AddVisibility_012.left);
expect(End_AddVisibility_013.right).assertEqual(End_AddVisibility_01.right);
expect(End_AddVisibility_013.left).assertEqual(End_AddVisibility_012.right);
expect(
End_AddVisibility_011.left - End_AddVisibility_01.left
).assertEqual(vp2px(50));
expect(
End_AddVisibility_011.right - End_AddVisibility_011.left
).assertEqual(vp2px(150));
expect(
End_AddVisibility_012.right - End_AddVisibility_012.left
).assertEqual(vp2px(150));
expect(
End_AddVisibility_013.right - End_AddVisibility_013.left
).assertEqual(vp2px(150));
expect(
End_AddVisibility_011.bottom - End_AddVisibility_011.top
).assertEqual(vp2px(50));
expect(
End_AddVisibility_012.bottom - End_AddVisibility_012.top
).assertEqual(vp2px(100));
expect(
End_AddVisibility_013.bottom - End_AddVisibility_013.top
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_011.left - End_AddVisibility_01.left)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddVisibility_011.right - End_AddVisibility_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_012.right - End_AddVisibility_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_013.right - End_AddVisibility_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_AddVisibility_011.bottom - End_AddVisibility_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_NoSpace.test.ets
浏览文件 @
f8cde247
...
...
@@ -71,12 +71,12 @@ export default function AlignEnd_NoSpace() {
expect(End_NoSpace_012.left).assertEqual(End_NoSpace_011.right);
expect(End_NoSpace_013.left).assertEqual(End_NoSpace_012.right);
expect(End_NoSpace_013.right).assertEqual(End_NoSpace_01.right);
expect(
End_NoSpace_011.bottom - End_NoSpace_011.top
).assertEqual(vp2px(50));
expect(
End_NoSpace_012.bottom - End_NoSpace_012.top
).assertEqual(vp2px(100));
expect(
End_NoSpace_013.bottom - End_NoSpace_013.top
).assertEqual(vp2px(150));
expect(
End_NoSpace_011.right - End_NoSpace_011.left).assertEqual(vp2px(400/3
));
expect(
End_NoSpace_012.right - End_NoSpace_012.left).assertEqual(vp2px(400/3
));
expect(
End_NoSpace_013.right - End_NoSpace_013.left).assertEqual(vp2px(400/3
));
expect(
Math.round(End_NoSpace_011.bottom - End_NoSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_NoSpace_012.bottom - End_NoSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_NoSpace_013.bottom - End_NoSpace_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(End_NoSpace_011.right - End_NoSpace_011.left)).assertEqual(Math.round(vp2px(400/3)
));
expect(
Math.round(End_NoSpace_012.right - End_NoSpace_012.left)).assertEqual(Math.round(vp2px(400/3)
));
expect(
Math.round(End_NoSpace_013.right - End_NoSpace_013.left)).assertEqual(Math.round(vp2px(400/3)
));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0100] END');
done();
});
...
...
@@ -105,13 +105,13 @@ export default function AlignEnd_NoSpace() {
expect(End_NoSpace_012.left).assertEqual(End_NoSpace_011.right);
expect(End_NoSpace_013.left).assertEqual(End_NoSpace_012.right);
expect(End_NoSpace_013.right).assertEqual(End_NoSpace_01.right);
expect(
End_NoSpace_011.left - End_NoSpace_01.left
).assertEqual(vp2px(50));
expect(
End_NoSpace_011.bottom - End_NoSpace_011.top
).assertEqual(vp2px(50));
expect(
End_NoSpace_012.bottom - End_NoSpace_012.top
).assertEqual(vp2px(100));
expect(
End_NoSpace_013.bottom - End_NoSpace_013.top
).assertEqual(vp2px(150));
expect(
End_NoSpace_011.right - End_NoSpace_011.left
).assertEqual(vp2px(150));
expect(
End_NoSpace_012.right - End_NoSpace_012.left
).assertEqual(vp2px(150));
expect(
End_NoSpace_013.right - End_NoSpace_013.left
).assertEqual(vp2px(150));
expect(
Math.round(End_NoSpace_011.left - End_NoSpace_01.left)
).assertEqual(vp2px(50));
expect(
Math.round(End_NoSpace_011.bottom - End_NoSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(End_NoSpace_012.bottom - End_NoSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(End_NoSpace_013.bottom - End_NoSpace_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(End_NoSpace_011.right - End_NoSpace_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_NoSpace_012.right - End_NoSpace_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(End_NoSpace_013.right - End_NoSpace_013.left)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0200] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.test.ets
浏览文件 @
f8cde247
...
...
@@ -66,18 +66,20 @@ export default function AlignSpaceEvenly_AddAlign() {
expect(SpaceEvenly_AddAlign_011.top).assertEqual(SpaceEvenly_AddAlign_012.top);
expect(SpaceEvenly_AddAlign_012.top).assertEqual(SpaceEvenly_AddAlign_013.top);
expect(SpaceEvenly_AddAlign_011.top).assertEqual(SpaceEvenly_AddAlign_01.top);
expect(SpaceEvenly_AddAlign_012.left - SpaceEvenly_AddAlign_011.right)
.assertEqual(SpaceEvenly_AddAlign_013.left - SpaceEvenly_AddAlign_012.right);
expect(SpaceEvenly_AddAlign_011.left - SpaceEvenly_AddAlign_01.left)
.assertEqual(SpaceEvenly_AddAlign_01.right - SpaceEvenly_AddAlign_013.right);
expect(SpaceEvenly_AddAlign_012.left - SpaceEvenly_AddAlign_011.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddAlign_01.right - SpaceEvenly_AddAlign_013.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddAlign_011.right - SpaceEvenly_AddAlign_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddAlign_012.right - SpaceEvenly_AddAlign_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddAlign_013.right - SpaceEvenly_AddAlign_013.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddAlign_011.bottom - SpaceEvenly_AddAlign_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddAlign_012.bottom - SpaceEvenly_AddAlign_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddAlign_013.bottom - SpaceEvenly_AddAlign_013.top).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddAlign_012.left - SpaceEvenly_AddAlign_011.right))
.assertEqual(Math.round(SpaceEvenly_AddAlign_013.left - SpaceEvenly_AddAlign_012.right));
expect(Math.round(SpaceEvenly_AddAlign_011.left - SpaceEvenly_AddAlign_01.left))
.assertEqual(Math.round(SpaceEvenly_AddAlign_01.right - SpaceEvenly_AddAlign_013.right));
expect(Math.round((SpaceEvenly_AddAlign_012.left - SpaceEvenly_AddAlign_011.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddAlign_01.right - SpaceEvenly_AddAlign_013.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round(SpaceEvenly_AddAlign_011.right - SpaceEvenly_AddAlign_011.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddAlign_012.right - SpaceEvenly_AddAlign_012.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddAlign_013.right - SpaceEvenly_AddAlign_013.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddAlign_011.bottom - SpaceEvenly_AddAlign_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddAlign_012.bottom - SpaceEvenly_AddAlign_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddAlign_013.bottom - SpaceEvenly_AddAlign_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0800] END');
done()
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.test.ets
浏览文件 @
f8cde247
...
...
@@ -67,19 +67,19 @@ export default function AlignSpaceEvenly_AddAllSpace() {
let SpaceEvenly_AddAllSpace_01_Box = CommonFunc.getComponentRect('SpaceEvenly_AddAllSpace_01_Box');
expect(SpaceEvenly_AddAllSpace_011.top).assertEqual(SpaceEvenly_AddAllSpace_012.top);
expect(SpaceEvenly_AddAllSpace_012.top).assertEqual(SpaceEvenly_AddAllSpace_013.top);
expect(
SpaceEvenly_AddAllSpace_011.top - SpaceEvenly_AddAllSpace_01.top
).assertEqual(vp2px(30));
expect(
SpaceEvenly_AddAllSpace_01.right - SpaceEvenly_AddAllSpace_013.right
).assertEqual(vp2px(30));
expect(
SpaceEvenly_AddAllSpace_011.left - SpaceEvenly_AddAllSpace_01.left
).assertEqual(vp2px(30));
expect(
Math.round(SpaceEvenly_AddAllSpace_011.top - SpaceEvenly_AddAllSpace_01.top)
).assertEqual(vp2px(30));
expect(
Math.round(SpaceEvenly_AddAllSpace_01.right - SpaceEvenly_AddAllSpace_013.right)
).assertEqual(vp2px(30));
expect(
Math.round(SpaceEvenly_AddAllSpace_011.left - SpaceEvenly_AddAllSpace_01.left)
).assertEqual(vp2px(30));
expect(SpaceEvenly_AddAllSpace_012.left).assertEqual(SpaceEvenly_AddAllSpace_011.right);
expect(SpaceEvenly_AddAllSpace_013.left).assertEqual(SpaceEvenly_AddAllSpace_012.right);
expect(
SpaceEvenly_AddAllSpace_01.left - SpaceEvenly_AddAllSpace_01_Box.left
).assertEqual(vp2px(10));
expect(
SpaceEvenly_AddAllSpace_01.top - SpaceEvenly_AddAllSpace_01_Box.top
).assertEqual(vp2px(10));
expect(
SpaceEvenly_AddAllSpace_011.bottom - SpaceEvenly_AddAllSpace_011.top
).assertEqual(vp2px(50));
expect(
SpaceEvenly_AddAllSpace_012.bottom - SpaceEvenly_AddAllSpace_012.top
).assertEqual(vp2px(100));
expect(
SpaceEvenly_AddAllSpace_013.bottom - SpaceEvenly_AddAllSpace_013.top
).assertEqual(vp2px(150));
expect(
SpaceEvenly_AddAllSpace_011.right - SpaceEvenly_AddAllSpace_011.left
).assertEqual(vp2px(440/3));
expect(
SpaceEvenly_AddAllSpace_012.right - SpaceEvenly_AddAllSpace_012.left
).assertEqual(vp2px(440/3));
expect(
SpaceEvenly_AddAllSpace_013.right - SpaceEvenly_AddAllSpace_013.left
).assertEqual(vp2px(440/3));
expect(
Math.round(SpaceEvenly_AddAllSpace_01.left - SpaceEvenly_AddAllSpace_01_Box.left)
).assertEqual(vp2px(10));
expect(
Math.round(SpaceEvenly_AddAllSpace_01.top - SpaceEvenly_AddAllSpace_01_Box.top)
).assertEqual(vp2px(10));
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));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0600] END');
done();
});
...
...
@@ -105,20 +105,23 @@ export default function AlignSpaceEvenly_AddAllSpace() {
let SpaceEvenly_AddAllSpace_01_Box = CommonFunc.getComponentRect('SpaceEvenly_AddAllSpace_01_Box');
expect(SpaceEvenly_AddAllSpace_011.top).assertEqual(SpaceEvenly_AddAllSpace_012.top);
expect(SpaceEvenly_AddAllSpace_012.top).assertEqual(SpaceEvenly_AddAllSpace_013.top);
expect(SpaceEvenly_AddAllSpace_011.top - SpaceEvenly_AddAllSpace_01.top).assertEqual(vp2px(20));
expect(SpaceEvenly_AddAllSpace_01.right - SpaceEvenly_AddAllSpace_013.right).assertEqual(vp2px(22.5));
expect(SpaceEvenly_AddAllSpace_011.left - SpaceEvenly_AddAllSpace_01.left).assertEqual(vp2px(22.5));
expect(SpaceEvenly_AddAllSpace_01.left - SpaceEvenly_AddAllSpace_01_Box.left).assertEqual(vp2px(10));
expect(SpaceEvenly_AddAllSpace_01.top - SpaceEvenly_AddAllSpace_01_Box.top).assertEqual(vp2px(10));
expect(SpaceEvenly_AddAllSpace_011.right - SpaceEvenly_AddAllSpace_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddAllSpace_012.right - SpaceEvenly_AddAllSpace_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddAllSpace_013.right - SpaceEvenly_AddAllSpace_013.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddAllSpace_011.bottom - SpaceEvenly_AddAllSpace_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddAllSpace_012.bottom - SpaceEvenly_AddAllSpace_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddAllSpace_013.bottom - SpaceEvenly_AddAllSpace_013.top).assertEqual(vp2px(150));
expect(SpaceEvenly_AddAllSpace_012.left - SpaceEvenly_AddAllSpace_011.right)
.assertEqual(SpaceEvenly_AddAllSpace_013.left - SpaceEvenly_AddAllSpace_012.right);
expect(SpaceEvenly_AddAllSpace_012.left - SpaceEvenly_AddAllSpace_011.right).assertEqual(vp2px(2.5));
expect(Math.round(SpaceEvenly_AddAllSpace_011.top - SpaceEvenly_AddAllSpace_01.top)).assertEqual(vp2px(20));
expect(Math.round((SpaceEvenly_AddAllSpace_01.right - SpaceEvenly_AddAllSpace_013.right)*100)/100)
.assertEqual(Math.round(vp2px(22.5)*100)/100);
expect(Math.round((SpaceEvenly_AddAllSpace_011.left - SpaceEvenly_AddAllSpace_01.left)*100)/100)
.assertEqual(Math.round(vp2px(22.5)*100)/100);
expect(Math.round(SpaceEvenly_AddAllSpace_01.left - SpaceEvenly_AddAllSpace_01_Box.left)).assertEqual(vp2px(10));
expect(Math.round(SpaceEvenly_AddAllSpace_01.top - SpaceEvenly_AddAllSpace_01_Box.top)).assertEqual(vp2px(10));
expect(Math.round(SpaceEvenly_AddAllSpace_011.right - SpaceEvenly_AddAllSpace_011.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddAllSpace_012.right - SpaceEvenly_AddAllSpace_012.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddAllSpace_013.right - SpaceEvenly_AddAllSpace_013.left)).assertEqual(vp2px(150));
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_012.left - SpaceEvenly_AddAllSpace_011.right))
.assertEqual(Math.round(SpaceEvenly_AddAllSpace_013.left - SpaceEvenly_AddAllSpace_012.right));
expect(Math.round((SpaceEvenly_AddAllSpace_012.left - SpaceEvenly_AddAllSpace_011.right)*100)/100)
.assertEqual(Math.round(vp2px(2.5)*100)/100);
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.test.ets
浏览文件 @
f8cde247
...
...
@@ -72,12 +72,18 @@ export default function AlignSpaceEvenly_AddLayoutWeight() {
expect(SpaceEvenly_AddLayoutWeight_012.right).assertEqual(SpaceEvenly_AddLayoutWeight_013.left);
expect(SpaceEvenly_AddLayoutWeight_011.left).assertEqual(SpaceEvenly_AddLayoutWeight_01.left);
expect(SpaceEvenly_AddLayoutWeight_013.right).assertEqual(SpaceEvenly_AddLayoutWeight_01.right);
expect(SpaceEvenly_AddLayoutWeight_011.bottom - SpaceEvenly_AddLayoutWeight_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddLayoutWeight_012.bottom - SpaceEvenly_AddLayoutWeight_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddLayoutWeight_013.bottom - SpaceEvenly_AddLayoutWeight_013.top).assertEqual(vp2px(150));
expect(SpaceEvenly_AddLayoutWeight_011.right - SpaceEvenly_AddLayoutWeight_011.left).assertEqual(vp2px(100));
expect(SpaceEvenly_AddLayoutWeight_012.right - SpaceEvenly_AddLayoutWeight_012.left).assertEqual(vp2px(200));
expect(SpaceEvenly_AddLayoutWeight_013.right - SpaceEvenly_AddLayoutWeight_013.left).assertEqual(vp2px(200));
expect(Math.round(SpaceEvenly_AddLayoutWeight_011.bottom - SpaceEvenly_AddLayoutWeight_011.top))
.assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddLayoutWeight_012.bottom - SpaceEvenly_AddLayoutWeight_012.top))
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddLayoutWeight_013.bottom - SpaceEvenly_AddLayoutWeight_013.top))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddLayoutWeight_011.right - SpaceEvenly_AddLayoutWeight_011.left))
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddLayoutWeight_012.right - SpaceEvenly_AddLayoutWeight_012.left))
.assertEqual(vp2px(200));
expect(Math.round(SpaceEvenly_AddLayoutWeight_013.right - SpaceEvenly_AddLayoutWeight_013.left))
.assertEqual(vp2px(200));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1200] END');
done();
});
...
...
@@ -108,14 +114,18 @@ export default function AlignSpaceEvenly_AddLayoutWeight() {
expect(SpaceEvenly_AddLayoutWeight_012.right).assertEqual(SpaceEvenly_AddLayoutWeight_013.left);
expect(SpaceEvenly_AddLayoutWeight_011.left).assertEqual(SpaceEvenly_AddLayoutWeight_01.left);
expect(SpaceEvenly_AddLayoutWeight_013.right).assertEqual(SpaceEvenly_AddLayoutWeight_01.right);
expect(SpaceEvenly_AddLayoutWeight_011.bottom - SpaceEvenly_AddLayoutWeight_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddLayoutWeight_012.bottom - SpaceEvenly_AddLayoutWeight_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddLayoutWeight_013.bottom - SpaceEvenly_AddLayoutWeight_013.top).assertEqual(vp2px(150));
let oneWidth = SpaceEvenly_AddLayoutWeight_011.right - SpaceEvenly_AddLayoutWeight_011.left;
let twoWidth = SpaceEvenly_AddLayoutWeight_012.right - SpaceEvenly_AddLayoutWeight_012.left;
expect(Math.round(SpaceEvenly_AddLayoutWeight_011.bottom - SpaceEvenly_AddLayoutWeight_011.top))
.assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddLayoutWeight_012.bottom - SpaceEvenly_AddLayoutWeight_012.top))
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddLayoutWeight_013.bottom - SpaceEvenly_AddLayoutWeight_013.top))
.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(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(SpaceEvenly_AddLayoutWeight_013.right - SpaceEvenly_AddLayoutWeight_013.left).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddLayoutWeight_013.right - SpaceEvenly_AddLayoutWeight_013.left)).
assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1300] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,17 +68,20 @@ export default function AlignSpaceEvenly_AddMargin() {
expect(SpaceEvenly_AddMargin_011.top).assertEqual(SpaceEvenly_AddMargin_012.top);
expect(SpaceEvenly_AddMargin_013.top).assertEqual(SpaceEvenly_AddMargin_012.top);
expect(SpaceEvenly_AddMargin_011.top).assertEqual(SpaceEvenly_AddMargin_01.top);
expect(SpaceEvenly_AddMargin_011.left - SpaceEvenly_AddMargin_01.left).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddMargin_012.left - SpaceEvenly_AddMargin_011.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddMargin_013.left - SpaceEvenly_AddMargin_012.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddMargin_01.left - SpaceEvenly_AddMargin_01_Box.left).assertEqual(vp2px(20));
expect(SpaceEvenly_AddMargin_01.top - SpaceEvenly_AddMargin_01_Box.top).assertEqual(vp2px(20));
expect(SpaceEvenly_AddMargin_011.right - SpaceEvenly_AddMargin_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddMargin_012.right - SpaceEvenly_AddMargin_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddMargin_013.right - SpaceEvenly_AddMargin_013.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddMargin_011.bottom - SpaceEvenly_AddMargin_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddMargin_012.bottom - SpaceEvenly_AddMargin_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddMargin_013.bottom - SpaceEvenly_AddMargin_013.top).assertEqual(vp2px(150));
expect(Math.round((SpaceEvenly_AddMargin_011.left - SpaceEvenly_AddMargin_01.left)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddMargin_012.left - SpaceEvenly_AddMargin_011.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddMargin_013.left - SpaceEvenly_AddMargin_012.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round(SpaceEvenly_AddMargin_01.left - SpaceEvenly_AddMargin_01_Box.left)).assertEqual(vp2px(20));
expect(Math.round(SpaceEvenly_AddMargin_01.top - SpaceEvenly_AddMargin_01_Box.top)).assertEqual(vp2px(20));
expect(Math.round(SpaceEvenly_AddMargin_011.right - SpaceEvenly_AddMargin_011.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddMargin_012.right - SpaceEvenly_AddMargin_012.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddMargin_013.right - SpaceEvenly_AddMargin_013.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddMargin_011.bottom - SpaceEvenly_AddMargin_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddMargin_012.bottom - SpaceEvenly_AddMargin_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddMargin_013.bottom - SpaceEvenly_AddMargin_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0500] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.test.ets
浏览文件 @
f8cde247
...
...
@@ -63,21 +63,25 @@ export default function AlignSpaceEvenly_AddOffset() {
let SpaceEvenly_AddOffset_012 = CommonFunc.getComponentRect('SpaceEvenly_AddOffset_012');
let SpaceEvenly_AddOffset_013 = CommonFunc.getComponentRect('SpaceEvenly_AddOffset_013');
let SpaceEvenly_AddOffset_01 = CommonFunc.getComponentRect('SpaceEvenly_AddOffset_01');
expect(SpaceEvenly_AddOffset_011.top - SpaceEvenly_AddOffset_01.top).assertEqual(vp2px(15));
expect(SpaceEvenly_AddOffset_011.left - SpaceEvenly_AddOffset_01.left).assertEqual(vp2px(22.5));
expect(Math.round((SpaceEvenly_AddOffset_011.top - SpaceEvenly_AddOffset_01.top)*10)/10).assertEqual(vp2px(15));
expect(Math.round((SpaceEvenly_AddOffset_011.left - SpaceEvenly_AddOffset_01.left)*100)/100)
.assertEqual(Math.round(vp2px(22.5)*100)/100);
expect(SpaceEvenly_AddOffset_012.top).assertEqual(SpaceEvenly_AddOffset_013.top);
expect(SpaceEvenly_AddOffset_012.top).assertEqual(SpaceEvenly_AddOffset_01.top);
expect(SpaceEvenly_AddOffset_01.right - SpaceEvenly_AddOffset_013.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddOffset_012.left - SpaceEvenly_AddOffset_011.right).assertEqual(vp2px(2.5));
expect(SpaceEvenly_AddOffset_013.left - SpaceEvenly_AddOffset_012.right ).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddOffset_011.right - SpaceEvenly_AddOffset_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddOffset_012.right - SpaceEvenly_AddOffset_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddOffset_013.right - SpaceEvenly_AddOffset_013.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddOffset_011.bottom - SpaceEvenly_AddOffset_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddOffset_012.bottom - SpaceEvenly_AddOffset_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddOffset_013.bottom - SpaceEvenly_AddOffset_013.top).assertEqual(vp2px(150));
expect(Math.round((SpaceEvenly_AddOffset_01.right - SpaceEvenly_AddOffset_013.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddOffset_012.left - SpaceEvenly_AddOffset_011.right)*100)/100)
.assertEqual(Math.round(vp2px(2.5)*100)/100);
expect(Math.round((SpaceEvenly_AddOffset_013.left - SpaceEvenly_AddOffset_012.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round(SpaceEvenly_AddOffset_011.right - SpaceEvenly_AddOffset_011.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddOffset_012.right - SpaceEvenly_AddOffset_012.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddOffset_013.right - SpaceEvenly_AddOffset_013.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddOffset_011.bottom - SpaceEvenly_AddOffset_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddOffset_012.bottom - SpaceEvenly_AddOffset_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddOffset_013.bottom - SpaceEvenly_AddOffset_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0900] END');
done();
});
})
}
}
\ No newline at end of file
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.test.ets
浏览文件 @
f8cde247
...
...
@@ -64,20 +64,23 @@ export default function AlignSpaceEvenly_AddOneMargin() {
let SpaceEvenly_AddOneMargin_012 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_012');
let SpaceEvenly_AddOneMargin_013 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_013');
let SpaceEvenly_AddOneMargin_01 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_01');
expect(SpaceEvenly_AddOneMargin_011.top - SpaceEvenly_AddOneMargin_01.top).assertEqual(vp2px(20));
expect(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left).assertEqual(vp2px(22.5));
expect(SpaceEvenly_AddOneMargin_013.left - SpaceEvenly_AddOneMargin_012.right).assertEqual(vp2px(2.5));
expect(SpaceEvenly_AddOneMargin_012.left - SpaceEvenly_AddOneMargin_011.right - vp2px(20))
.assertEqual(SpaceEvenly_AddOneMargin_013.left - SpaceEvenly_AddOneMargin_012.right);
expect(Math.round(SpaceEvenly_AddOneMargin_011.top - SpaceEvenly_AddOneMargin_01.top)).assertEqual(vp2px(20));
expect(Math.round((SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left)*100)/100)
.assertEqual(Math.round(vp2px(22.5)*100)/100);
expect(Math.round((SpaceEvenly_AddOneMargin_013.left - SpaceEvenly_AddOneMargin_012.right)*100)/100)
.assertEqual(Math.round(vp2px(2.5)*100)/100);
expect(Math.round(SpaceEvenly_AddOneMargin_012.left - SpaceEvenly_AddOneMargin_011.right - vp2px(20)))
.assertEqual(Math.round(SpaceEvenly_AddOneMargin_013.left - SpaceEvenly_AddOneMargin_012.right));
expect(SpaceEvenly_AddOneMargin_013.top).assertEqual(SpaceEvenly_AddOneMargin_012.top);
expect(SpaceEvenly_AddOneMargin_012.top).assertEqual(SpaceEvenly_AddOneMargin_01.top);
expect(SpaceEvenly_AddOneMargin_01.right - SpaceEvenly_AddOneMargin_013.right).assertEqual(vp2px(2.5));
expect(SpaceEvenly_AddOneMargin_011.bottom - SpaceEvenly_AddOneMargin_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddOneMargin_012.bottom - SpaceEvenly_AddOneMargin_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddOneMargin_013.bottom - SpaceEvenly_AddOneMargin_013.top).assertEqual(vp2px(150));
expect(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left).assertEqual(vp2px(150));
expect(Math.round((SpaceEvenly_AddOneMargin_01.right - SpaceEvenly_AddOneMargin_013.right)*100)/100)
.assertEqual(Math.round(vp2px(2.5)*100)/100);
expect(Math.round(SpaceEvenly_AddOneMargin_011.bottom - SpaceEvenly_AddOneMargin_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddOneMargin_012.bottom - SpaceEvenly_AddOneMargin_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddOneMargin_013.bottom - SpaceEvenly_AddOneMargin_013.top)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1500] END');
done();
})
...
...
@@ -100,20 +103,24 @@ export default function AlignSpaceEvenly_AddOneMargin() {
let SpaceEvenly_AddOneMargin_012 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_012');
let SpaceEvenly_AddOneMargin_013 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_013');
let SpaceEvenly_AddOneMargin_01 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_01');
expect(SpaceEvenly_AddOneMargin_011.top - SpaceEvenly_AddOneMargin_01.top).assertEqual(vp2px(30));
expect(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left).assertEqual(vp2px(500/17));
expect(SpaceEvenly_AddOneMargin_012.left - SpaceEvenly_AddOneMargin_011.right)
.assertEqual(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left);
expect(Math.round(SpaceEvenly_AddOneMargin_011.top - SpaceEvenly_AddOneMargin_01.top)).assertEqual(vp2px(30));
expect(Math.round(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left))
.assertEqual(Math.round(vp2px(500/17)));
expect(Math.round(SpaceEvenly_AddOneMargin_012.left - SpaceEvenly_AddOneMargin_011.right))
.assertEqual(Math.round(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left));
expect(SpaceEvenly_AddOneMargin_013.right).assertEqual(SpaceEvenly_AddOneMargin_01.right);
expect(SpaceEvenly_AddOneMargin_013.top).assertEqual(SpaceEvenly_AddOneMargin_012.top);
expect(SpaceEvenly_AddOneMargin_012.top).assertEqual(SpaceEvenly_AddOneMargin_01.top);
expect(SpaceEvenly_AddOneMargin_012.right).assertEqual(SpaceEvenly_AddOneMargin_013.left);
expect(SpaceEvenly_AddOneMargin_011.bottom - SpaceEvenly_AddOneMargin_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddOneMargin_012.bottom - SpaceEvenly_AddOneMargin_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddOneMargin_013.bottom - SpaceEvenly_AddOneMargin_013.top).assertEqual(vp2px(150));
expect(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left).assertEqual(vp2px(2500/17));
expect(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left).assertEqual(vp2px(2500/17));
expect(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left).assertEqual(vp2px(2500/17));
expect(Math.round(SpaceEvenly_AddOneMargin_011.bottom - SpaceEvenly_AddOneMargin_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddOneMargin_012.bottom - SpaceEvenly_AddOneMargin_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddOneMargin_013.bottom - SpaceEvenly_AddOneMargin_013.top)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left))
.assertEqual(Math.round(vp2px(2500/17)));
expect(Math.round(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left))
.assertEqual(Math.round(vp2px(2500/17)));
expect(Math.round(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left))
.assertEqual(Math.round(vp2px(2500/17)));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1600] END');
done();
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.test.ets
浏览文件 @
f8cde247
...
...
@@ -65,18 +65,18 @@ export default function AlignSpaceEvenly_AddOneWidth() {
let SpaceEvenly_AddOneWidth_01 = CommonFunc.getComponentRect('SpaceEvenly_AddOneWidth_01');
expect(SpaceEvenly_AddOneWidth_012.left - SpaceEvenly_AddOneWidth_011.right)
.assertEqual(SpaceEvenly_AddOneWidth_013.left - SpaceEvenly_AddOneWidth_012.right);
expect(
SpaceEvenly_AddOneWidth_012.left - SpaceEvenly_AddOneWidth_011.right
).assertEqual(vp2px(10));
expect(
Math.round(SpaceEvenly_AddOneWidth_012.left - SpaceEvenly_AddOneWidth_011.right)
).assertEqual(vp2px(10));
expect(SpaceEvenly_AddOneWidth_011.top).assertEqual(SpaceEvenly_AddOneWidth_012.top);
expect(SpaceEvenly_AddOneWidth_013.top).assertEqual(SpaceEvenly_AddOneWidth_012.top);
expect(SpaceEvenly_AddOneWidth_011.top).assertEqual(SpaceEvenly_AddOneWidth_01.top);
expect(
SpaceEvenly_AddOneWidth_011.left - SpaceEvenly_AddOneWidth_01.left
).assertEqual(vp2px(10));
expect(
SpaceEvenly_AddOneWidth_01.right - SpaceEvenly_AddOneWidth_013.right
).assertEqual(vp2px(10));
expect(
SpaceEvenly_AddOneWidth_011.right - SpaceEvenly_AddOneWidth_011.left
).assertEqual(vp2px(160));
expect(
SpaceEvenly_AddOneWidth_012.right - SpaceEvenly_AddOneWidth_012.left
).assertEqual(vp2px(150));
expect(
SpaceEvenly_AddOneWidth_013.right - SpaceEvenly_AddOneWidth_013.left
).assertEqual(vp2px(150));
expect(
SpaceEvenly_AddOneWidth_011.bottom - SpaceEvenly_AddOneWidth_011.top
).assertEqual(vp2px(50));
expect(
SpaceEvenly_AddOneWidth_012.bottom - SpaceEvenly_AddOneWidth_012.top
).assertEqual(vp2px(100));
expect(
SpaceEvenly_AddOneWidth_013.bottom - SpaceEvenly_AddOneWidth_013.top
).assertEqual(vp2px(150));
expect(
Math.round(SpaceEvenly_AddOneWidth_011.left - SpaceEvenly_AddOneWidth_01.left)
).assertEqual(vp2px(10));
expect(
Math.round(SpaceEvenly_AddOneWidth_01.right - SpaceEvenly_AddOneWidth_013.right)
).assertEqual(vp2px(10));
expect(
Math.round(SpaceEvenly_AddOneWidth_011.right - SpaceEvenly_AddOneWidth_011.left)
).assertEqual(vp2px(160));
expect(
Math.round(SpaceEvenly_AddOneWidth_012.right - SpaceEvenly_AddOneWidth_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(SpaceEvenly_AddOneWidth_013.right - SpaceEvenly_AddOneWidth_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(SpaceEvenly_AddOneWidth_011.bottom - SpaceEvenly_AddOneWidth_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(SpaceEvenly_AddOneWidth_012.bottom - SpaceEvenly_AddOneWidth_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(SpaceEvenly_AddOneWidth_013.bottom - SpaceEvenly_AddOneWidth_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1400] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,15 +68,19 @@ export default function AlignSpaceEvenly_AddPadding() {
expect( SpaceEvenly_AddPadding_012.top ).assertEqual(SpaceEvenly_AddPadding_013.top);
expect( SpaceEvenly_AddPadding_012.left ).assertEqual(SpaceEvenly_AddPadding_011.right);
expect( SpaceEvenly_AddPadding_013.left ).assertEqual(SpaceEvenly_AddPadding_012.right);
expect(SpaceEvenly_AddPadding_011.top - SpaceEvenly_AddPadding_01.top).assertEqual(vp2px(30));
expect(SpaceEvenly_AddPadding_011.bottom - SpaceEvenly_AddPadding_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddPadding_012.bottom - SpaceEvenly_AddPadding_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddPadding_013.bottom - SpaceEvenly_AddPadding_013.top).assertEqual(vp2px(150));
expect(SpaceEvenly_AddPadding_011.right - SpaceEvenly_AddPadding_011.left).assertEqual(vp2px(440/3));
expect(SpaceEvenly_AddPadding_012.right - SpaceEvenly_AddPadding_012.left).assertEqual(vp2px(440/3));
expect(SpaceEvenly_AddPadding_013.right - SpaceEvenly_AddPadding_013.left).assertEqual(vp2px(440/3));
expect(SpaceEvenly_AddPadding_011.left - SpaceEvenly_AddPadding_01.left).assertEqual(vp2px(30));
expect(SpaceEvenly_AddPadding_01.right - SpaceEvenly_AddPadding_013.right).assertEqual(vp2px(30));
expect(Math.round(SpaceEvenly_AddPadding_011.top - SpaceEvenly_AddPadding_01.top)).assertEqual(vp2px(30));
expect(Math.round(SpaceEvenly_AddPadding_011.bottom - SpaceEvenly_AddPadding_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddPadding_012.bottom - SpaceEvenly_AddPadding_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddPadding_013.bottom - SpaceEvenly_AddPadding_013.top)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddPadding_011.right - SpaceEvenly_AddPadding_011.left))
.assertEqual(Math.round(vp2px(440/3)));
expect(Math.round(SpaceEvenly_AddPadding_012.right - SpaceEvenly_AddPadding_012.left))
.assertEqual(Math.round(vp2px(440/3)));
expect(Math.round(SpaceEvenly_AddPadding_013.right - SpaceEvenly_AddPadding_013.left))
.assertEqual(Math.round(vp2px(440/3)));
expect(Math.round(SpaceEvenly_AddPadding_011.left - SpaceEvenly_AddPadding_01.left))
.assertEqual(vp2px(30));
expect(Math.round(SpaceEvenly_AddPadding_01.right - SpaceEvenly_AddPadding_013.right)).assertEqual(vp2px(30));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0300] END');
done();
});
...
...
@@ -101,17 +105,21 @@ export default function AlignSpaceEvenly_AddPadding() {
let SpaceEvenly_AddPadding_01 = CommonFunc.getComponentRect('SpaceEvenly_AddPadding_01');
expect(SpaceEvenly_AddPadding_011.top).assertEqual(SpaceEvenly_AddPadding_012.top);
expect(SpaceEvenly_AddPadding_012.top).assertEqual(SpaceEvenly_AddPadding_013.top);
expect(SpaceEvenly_AddPadding_011.top - SpaceEvenly_AddPadding_01.top).assertEqual(vp2px(20));
expect(SpaceEvenly_AddPadding_011.right - SpaceEvenly_AddPadding_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddPadding_012.right - SpaceEvenly_AddPadding_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddPadding_013.right - SpaceEvenly_AddPadding_013.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddPadding_011.bottom - SpaceEvenly_AddPadding_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_AddPadding_012.bottom - SpaceEvenly_AddPadding_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_AddPadding_013.bottom - SpaceEvenly_AddPadding_013.top).assertEqual(vp2px(150));
expect(SpaceEvenly_AddPadding_013.left - SpaceEvenly_AddPadding_012.right).assertEqual(vp2px(2.5));
expect(SpaceEvenly_AddPadding_012.left - SpaceEvenly_AddPadding_011.right).assertEqual(vp2px(2.5));
expect(SpaceEvenly_AddPadding_011.left - SpaceEvenly_AddPadding_01.left).assertEqual(vp2px(22.5));
expect(SpaceEvenly_AddPadding_01.right - SpaceEvenly_AddPadding_013.right).assertEqual(vp2px(22.5));
expect(Math.round(SpaceEvenly_AddPadding_011.top - SpaceEvenly_AddPadding_01.top)).assertEqual(vp2px(20));
expect(Math.round(SpaceEvenly_AddPadding_011.right - SpaceEvenly_AddPadding_011.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddPadding_012.right - SpaceEvenly_AddPadding_012.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddPadding_013.right - SpaceEvenly_AddPadding_013.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddPadding_011.bottom - SpaceEvenly_AddPadding_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddPadding_012.bottom - SpaceEvenly_AddPadding_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddPadding_013.bottom - SpaceEvenly_AddPadding_013.top)).assertEqual(vp2px(150));
expect(Math.round((SpaceEvenly_AddPadding_013.left - SpaceEvenly_AddPadding_012.right)*100)/100)
.assertEqual(Math.round(vp2px(2.5)*100)/100);
expect(Math.round((SpaceEvenly_AddPadding_012.left - SpaceEvenly_AddPadding_011.right)*100)/100)
.assertEqual(Math.round(vp2px(2.5)*100)/100);
expect(Math.round((SpaceEvenly_AddPadding_011.left - SpaceEvenly_AddPadding_01.left)*100)/100)
.assertEqual(Math.round(vp2px(22.5)*100)/100);
expect(Math.round((SpaceEvenly_AddPadding_01.right - SpaceEvenly_AddPadding_013.right)*100)/100)
.assertEqual(Math.round(vp2px(22.5)*100)/100);
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0400] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets
浏览文件 @
f8cde247
...
...
@@ -67,13 +67,20 @@ export default function AlignSpaceEvenly_AddVisibility() {
let SpaceEvenly_AddVisibility_01 = CommonFunc.getComponentRect('SpaceEvenly_AddVisibility_01');
expect(SpaceEvenly_AddVisibility_012.top).assertEqual(SpaceEvenly_AddVisibility_013.top);
expect(SpaceEvenly_AddVisibility_012.top).assertEqual(SpaceEvenly_AddVisibility_01.top);
expect(SpaceEvenly_AddVisibility_012.left - SpaceEvenly_AddVisibility_01.left).assertEqual(vp2px(200/3));
expect(SpaceEvenly_AddVisibility_01.right - SpaceEvenly_AddVisibility_013.right).assertEqual(vp2px(200/3));
expect(SpaceEvenly_AddVisibility_013.left - SpaceEvenly_AddVisibility_012.right).assertEqual(vp2px(200/3));
expect(SpaceEvenly_AddVisibility_012.right - SpaceEvenly_AddVisibility_012.left ).assertEqual(vp2px(150));
expect(SpaceEvenly_AddVisibility_013.right - SpaceEvenly_AddVisibility_013.left ).assertEqual(vp2px(150));
expect(SpaceEvenly_AddVisibility_012.bottom - SpaceEvenly_AddVisibility_012.top ).assertEqual(vp2px(100));
expect(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top ).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_012.left - SpaceEvenly_AddVisibility_01.left))
.assertEqual(Math.round(vp2px(200/3)));
expect(Math.round(SpaceEvenly_AddVisibility_01.right - SpaceEvenly_AddVisibility_013.right))
.assertEqual(Math.round(vp2px(200/3)));
expect(Math.round(SpaceEvenly_AddVisibility_013.left - SpaceEvenly_AddVisibility_012.right))
.assertEqual(Math.round(vp2px(200/3)));
expect(Math.round(SpaceEvenly_AddVisibility_012.right - SpaceEvenly_AddVisibility_012.left ))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_013.right - SpaceEvenly_AddVisibility_013.left))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_012.bottom - SpaceEvenly_AddVisibility_012.top))
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top))
.assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000] END');
done();
});
...
...
@@ -102,16 +109,26 @@ export default function AlignSpaceEvenly_AddVisibility() {
expect(SpaceEvenly_AddVisibility_012.top).assertEqual(SpaceEvenly_AddVisibility_013.top);
expect(SpaceEvenly_AddVisibility_012.top).assertEqual(SpaceEvenly_AddVisibility_01.top);
expect(SpaceEvenly_AddVisibility_012.top).assertEqual(SpaceEvenly_AddVisibility_011.top);
expect(SpaceEvenly_AddVisibility_011.left - SpaceEvenly_AddVisibility_01.left).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddVisibility_01.right - SpaceEvenly_AddVisibility_013.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddVisibility_012.left - SpaceEvenly_AddVisibility_011.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddVisibility_013.left - SpaceEvenly_AddVisibility_012.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddVisibility_011.right - SpaceEvenly_AddVisibility_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddVisibility_012.right - SpaceEvenly_AddVisibility_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddVisibility_013.right - SpaceEvenly_AddVisibility_013.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddVisibility_011.bottom - SpaceEvenly_AddVisibility_011.top ).assertEqual(vp2px(50));
expect(SpaceEvenly_AddVisibility_012.bottom - SpaceEvenly_AddVisibility_012.top ).assertEqual(vp2px(100));
expect(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top ).assertEqual(vp2px(150));
expect(Math.round((SpaceEvenly_AddVisibility_011.left - SpaceEvenly_AddVisibility_01.left)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddVisibility_01.right - SpaceEvenly_AddVisibility_013.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddVisibility_012.left - SpaceEvenly_AddVisibility_011.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddVisibility_013.left - SpaceEvenly_AddVisibility_012.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round(SpaceEvenly_AddVisibility_011.right - SpaceEvenly_AddVisibility_011.left))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_012.right - SpaceEvenly_AddVisibility_012.left))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_013.right - SpaceEvenly_AddVisibility_013.left))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_011.bottom - SpaceEvenly_AddVisibility_011.top))
.assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddVisibility_012.bottom - SpaceEvenly_AddVisibility_012.top))
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top))
.assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100] END');
done();
});
...
...
@@ -140,16 +157,26 @@ export default function AlignSpaceEvenly_AddVisibility() {
expect(SpaceEvenly_AddVisibility_012.top).assertEqual(SpaceEvenly_AddVisibility_013.top);
expect(SpaceEvenly_AddVisibility_012.top).assertEqual(SpaceEvenly_AddVisibility_01.top);
expect(SpaceEvenly_AddVisibility_012.top).assertEqual(SpaceEvenly_AddVisibility_011.top);
expect(SpaceEvenly_AddVisibility_011.left - SpaceEvenly_AddVisibility_01.left).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddVisibility_01.right - SpaceEvenly_AddVisibility_013.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddVisibility_012.left - SpaceEvenly_AddVisibility_011.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddVisibility_013.left - SpaceEvenly_AddVisibility_012.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_AddVisibility_011.right - SpaceEvenly_AddVisibility_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddVisibility_012.right - SpaceEvenly_AddVisibility_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddVisibility_013.right - SpaceEvenly_AddVisibility_013.left).assertEqual(vp2px(150));
expect(SpaceEvenly_AddVisibility_011.bottom - SpaceEvenly_AddVisibility_011.top ).assertEqual(vp2px(50));
expect(SpaceEvenly_AddVisibility_012.bottom - SpaceEvenly_AddVisibility_012.top ).assertEqual(vp2px(100));
expect(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top ).assertEqual(vp2px(150));
expect(Math.round((SpaceEvenly_AddVisibility_011.left - SpaceEvenly_AddVisibility_01.left)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddVisibility_01.right - SpaceEvenly_AddVisibility_013.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddVisibility_012.left - SpaceEvenly_AddVisibility_011.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_AddVisibility_013.left - SpaceEvenly_AddVisibility_012.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round(SpaceEvenly_AddVisibility_011.right - SpaceEvenly_AddVisibility_011.left))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_012.right - SpaceEvenly_AddVisibility_012.left))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_013.right - SpaceEvenly_AddVisibility_013.left))
.assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_AddVisibility_011.bottom - SpaceEvenly_AddVisibility_011.top))
.assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_AddVisibility_012.bottom - SpaceEvenly_AddVisibility_012.top))
.assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top))
.assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.test.ets
浏览文件 @
f8cde247
...
...
@@ -71,12 +71,15 @@ export default function AlignSpaceEvenly_NoSpace() {
expect(SpaceEvenly_NoSpace_01.right).assertEqual(SpaceEvenly_NoSpace_013.right);
expect(SpaceEvenly_NoSpace_012.left).assertEqual(SpaceEvenly_NoSpace_011.right);
expect(SpaceEvenly_NoSpace_013.left).assertEqual(SpaceEvenly_NoSpace_012.right);
expect(SpaceEvenly_NoSpace_011.right - SpaceEvenly_NoSpace_011.left).assertEqual(vp2px(400/3));
expect(SpaceEvenly_NoSpace_012.right - SpaceEvenly_NoSpace_012.left).assertEqual(vp2px(400/3));
expect(SpaceEvenly_NoSpace_013.right - SpaceEvenly_NoSpace_013.left).assertEqual(vp2px(400/3));
expect(SpaceEvenly_NoSpace_011.bottom - SpaceEvenly_NoSpace_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_NoSpace_012.bottom - SpaceEvenly_NoSpace_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_NoSpace_013.bottom - SpaceEvenly_NoSpace_013.top).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_NoSpace_011.right - SpaceEvenly_NoSpace_011.left))
.assertEqual(Math.round(vp2px(400/3)));
expect(Math.round(SpaceEvenly_NoSpace_012.right - SpaceEvenly_NoSpace_012.left))
.assertEqual(Math.round(vp2px(400/3)));
expect(Math.round(SpaceEvenly_NoSpace_013.right - SpaceEvenly_NoSpace_013.left))
.assertEqual(Math.round(vp2px(400/3)));
expect(Math.round(SpaceEvenly_NoSpace_011.bottom - SpaceEvenly_NoSpace_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_NoSpace_012.bottom - SpaceEvenly_NoSpace_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_NoSpace_013.bottom - SpaceEvenly_NoSpace_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0100] END');
done();
});
...
...
@@ -102,16 +105,20 @@ export default function AlignSpaceEvenly_NoSpace() {
expect(SpaceEvenly_NoSpace_011.top).assertEqual(SpaceEvenly_NoSpace_012.top);
expect(SpaceEvenly_NoSpace_012.top).assertEqual(SpaceEvenly_NoSpace_013.top);
expect(SpaceEvenly_NoSpace_011.top).assertEqual(SpaceEvenly_NoSpace_01.top);
expect(SpaceEvenly_NoSpace_012.left - SpaceEvenly_NoSpace_011.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_NoSpace_011.left - SpaceEvenly_NoSpace_01.left).assertEqual(vp2px(12.5));
expect(SpaceEvenly_NoSpace_013.left - SpaceEvenly_NoSpace_012.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_NoSpace_01.right - SpaceEvenly_NoSpace_013.right).assertEqual(vp2px(12.5));
expect(SpaceEvenly_NoSpace_011.right - SpaceEvenly_NoSpace_011.left).assertEqual(vp2px(150));
expect(SpaceEvenly_NoSpace_012.right - SpaceEvenly_NoSpace_012.left).assertEqual(vp2px(150));
expect(SpaceEvenly_NoSpace_013.right - SpaceEvenly_NoSpace_013.left).assertEqual(vp2px(150));
expect(SpaceEvenly_NoSpace_011.bottom - SpaceEvenly_NoSpace_011.top).assertEqual(vp2px(50));
expect(SpaceEvenly_NoSpace_012.bottom - SpaceEvenly_NoSpace_012.top).assertEqual(vp2px(100));
expect(SpaceEvenly_NoSpace_013.bottom - SpaceEvenly_NoSpace_013.top).assertEqual(vp2px(150));
expect(Math.round((SpaceEvenly_NoSpace_012.left - SpaceEvenly_NoSpace_011.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_NoSpace_011.left - SpaceEvenly_NoSpace_01.left)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_NoSpace_013.left - SpaceEvenly_NoSpace_012.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round((SpaceEvenly_NoSpace_01.right - SpaceEvenly_NoSpace_013.right)*100)/100)
.assertEqual(Math.round(vp2px(12.5)*100)/100);
expect(Math.round(SpaceEvenly_NoSpace_011.right - SpaceEvenly_NoSpace_011.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_NoSpace_012.right - SpaceEvenly_NoSpace_012.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_NoSpace_013.right - SpaceEvenly_NoSpace_013.left)).assertEqual(vp2px(150));
expect(Math.round(SpaceEvenly_NoSpace_011.bottom - SpaceEvenly_NoSpace_011.top)).assertEqual(vp2px(50));
expect(Math.round(SpaceEvenly_NoSpace_012.bottom - SpaceEvenly_NoSpace_012.top)).assertEqual(vp2px(100));
expect(Math.round(SpaceEvenly_NoSpace_013.bottom - SpaceEvenly_NoSpace_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0200] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets
浏览文件 @
f8cde247
...
...
@@ -69,13 +69,13 @@ export default function AlignStart_AddAlign() {
expect(Start_AddAlign_012.left).assertEqual(Start_AddAlign_011.right);
expect(Start_AddAlign_013.left).assertEqual(Start_AddAlign_012.right);
expect(Start_AddAlign_01.left).assertEqual(Start_AddAlign_011.left);
expect(
Start_AddAlign_011.right - Start_AddAlign_011.left
).assertEqual(vp2px(150));
expect(
Start_AddAlign_012.right - Start_AddAlign_012.left
).assertEqual(vp2px(150));
expect(
Start_AddAlign_013.right - Start_AddAlign_013.left
).assertEqual(vp2px(150));
expect(
Start_AddAlign_011.bottom - Start_AddAlign_011.top
).assertEqual(vp2px(50));
expect(
Start_AddAlign_012.bottom - Start_AddAlign_012.top
).assertEqual(vp2px(100));
expect(
Start_AddAlign_013.bottom - Start_AddAlign_013.top
).assertEqual(vp2px(150));
expect(
Start_AddAlign_01.right - Start_AddAlign_013.right
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddAlign_011.right - Start_AddAlign_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAlign_012.right - Start_AddAlign_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAlign_013.right - Start_AddAlign_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAlign_011.bottom - Start_AddAlign_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddAlign_012.bottom - Start_AddAlign_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddAlign_013.bottom - Start_AddAlign_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAlign_01.right - Start_AddAlign_013.right)
).assertEqual(vp2px(50));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0800] END');
done()
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,17 +68,17 @@ export default function AlignStart_AddAllSpace() {
expect( Start_AddAllSpace_012.top ).assertEqual(Start_AddAllSpace_013.top);
expect( Start_AddAllSpace_012.left ).assertEqual(Start_AddAllSpace_011.right);
expect( Start_AddAllSpace_013.left ).assertEqual(Start_AddAllSpace_012.right);
expect(
Start_AddAllSpace_011.top - Start_AddAllSpace_01.top
).assertEqual(vp2px(30));
expect(
Start_AddAllSpace_011.left - Start_AddAllSpace_01.left
).assertEqual(vp2px(30));
expect(
Start_AddAllSpace_01.right - Start_AddAllSpace_013.right
).assertEqual(vp2px(30));
expect(
Start_AddAllSpace_01.top - Start_AddAllSpace_01_Box.top
).assertEqual(vp2px(10));
expect(
Start_AddAllSpace_01.left - Start_AddAllSpace_01_Box.left
).assertEqual(vp2px(10));
expect(
Start_AddAllSpace_011.bottom - Start_AddAllSpace_011.top
).assertEqual(vp2px(50));
expect(
Start_AddAllSpace_012.bottom - Start_AddAllSpace_012.top
).assertEqual(vp2px(100));
expect(
Start_AddAllSpace_013.bottom - Start_AddAllSpace_013.top
).assertEqual(vp2px(150));
expect(
Start_AddAllSpace_011.right - Start_AddAllSpace_011.left).assertEqual(vp2px(440/3
));
expect(
Start_AddAllSpace_012.right - Start_AddAllSpace_012.left).assertEqual(vp2px(440/3
));
expect(
Start_AddAllSpace_013.right - Start_AddAllSpace_013.left).assertEqual(vp2px(440/3
));
expect(
Math.round(Start_AddAllSpace_011.top - Start_AddAllSpace_01.top)
).assertEqual(vp2px(30));
expect(
Math.round(Start_AddAllSpace_011.left - Start_AddAllSpace_01.left)
).assertEqual(vp2px(30));
expect(
Math.round(Start_AddAllSpace_01.right - Start_AddAllSpace_013.right)
).assertEqual(vp2px(30));
expect(
Math.round(Start_AddAllSpace_01.top - Start_AddAllSpace_01_Box.top)
).assertEqual(vp2px(10));
expect(
Math.round(Start_AddAllSpace_01.left - Start_AddAllSpace_01_Box.left)
).assertEqual(vp2px(10));
expect(
Math.round(Start_AddAllSpace_011.bottom - Start_AddAllSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddAllSpace_012.bottom - Start_AddAllSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddAllSpace_013.bottom - Start_AddAllSpace_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAllSpace_011.right - Start_AddAllSpace_011.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Start_AddAllSpace_012.right - Start_AddAllSpace_012.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Start_AddAllSpace_013.right - Start_AddAllSpace_013.left)).assertEqual(Math.round(vp2px(440/3)
));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0600] END');
done();
});
...
...
@@ -106,17 +106,17 @@ export default function AlignStart_AddAllSpace() {
expect(Start_AddAllSpace_012.top).assertEqual(Start_AddAllSpace_013.top);
expect(Start_AddAllSpace_012.left).assertEqual(Start_AddAllSpace_011.right);
expect(Start_AddAllSpace_013.left).assertEqual(Start_AddAllSpace_012.right);
expect(
Start_AddAllSpace_011.left - Start_AddAllSpace_01.left
).assertEqual(vp2px(20));
expect(
Start_AddAllSpace_01.right - Start_AddAllSpace_013.right
).assertEqual(vp2px(30));
expect(
Start_AddAllSpace_011.top - Start_AddAllSpace_01.top
).assertEqual(vp2px(20));
expect(
Start_AddAllSpace_01.left - Start_AddAllSpace_01_Box.left
).assertEqual(vp2px(10));
expect(
Start_AddAllSpace_01.top - Start_AddAllSpace_01_Box.top
).assertEqual(vp2px(10));
expect(
Start_AddAllSpace_011.right - Start_AddAllSpace_011.left
).assertEqual(vp2px(150));
expect(
Start_AddAllSpace_012.right - Start_AddAllSpace_012.left
).assertEqual(vp2px(150));
expect(
Start_AddAllSpace_013.right - Start_AddAllSpace_013.left
).assertEqual(vp2px(150));
expect(
Start_AddAllSpace_011.bottom - Start_AddAllSpace_011.top
).assertEqual(vp2px(50));
expect(
Start_AddAllSpace_012.bottom - Start_AddAllSpace_012.top
).assertEqual(vp2px(100));
expect(
Start_AddAllSpace_013.bottom - Start_AddAllSpace_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAllSpace_011.left - Start_AddAllSpace_01.left)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddAllSpace_01.right - Start_AddAllSpace_013.right)
).assertEqual(vp2px(30));
expect(
Math.round(Start_AddAllSpace_011.top - Start_AddAllSpace_01.top)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddAllSpace_01.left - Start_AddAllSpace_01_Box.left)
).assertEqual(vp2px(10));
expect(
Math.round(Start_AddAllSpace_01.top - Start_AddAllSpace_01_Box.top)
).assertEqual(vp2px(10));
expect(
Math.round(Start_AddAllSpace_011.right - Start_AddAllSpace_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAllSpace_012.right - Start_AddAllSpace_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAllSpace_013.right - Start_AddAllSpace_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddAllSpace_011.bottom - Start_AddAllSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddAllSpace_012.bottom - Start_AddAllSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddAllSpace_013.bottom - Start_AddAllSpace_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.test.ets
浏览文件 @
f8cde247
...
...
@@ -72,12 +72,12 @@ export default function AlignStart_AddLayoutWeight() {
expect(Start_AddLayoutWeight_012.right).assertEqual(Start_AddLayoutWeight_013.left);
expect(Start_AddLayoutWeight_01.left).assertEqual(Start_AddLayoutWeight_011.left);
expect(Start_AddLayoutWeight_013.right).assertEqual(Start_AddLayoutWeight_01.right);
expect(
Start_AddLayoutWeight_011.right - Start_AddLayoutWeight_011.left
).assertEqual(vp2px(100));
expect(
Start_AddLayoutWeight_012.right - Start_AddLayoutWeight_012.left
).assertEqual(vp2px(200));
expect(
Start_AddLayoutWeight_013.right - Start_AddLayoutWeight_013.left
).assertEqual(vp2px(200));
expect(
Start_AddLayoutWeight_011.bottom - Start_AddLayoutWeight_011.top
).assertEqual(vp2px(50));
expect(
Start_AddLayoutWeight_012.bottom - Start_AddLayoutWeight_012.top
).assertEqual(vp2px(100));
expect(
Start_AddLayoutWeight_013.bottom - Start_AddLayoutWeight_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddLayoutWeight_011.right - Start_AddLayoutWeight_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddLayoutWeight_012.right - Start_AddLayoutWeight_012.left)
).assertEqual(vp2px(200));
expect(
Math.round(Start_AddLayoutWeight_013.right - Start_AddLayoutWeight_013.left)
).assertEqual(vp2px(200));
expect(
Math.round(Start_AddLayoutWeight_011.bottom - Start_AddLayoutWeight_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddLayoutWeight_012.bottom - Start_AddLayoutWeight_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddLayoutWeight_013.bottom - Start_AddLayoutWeight_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200] END');
done();
});
...
...
@@ -108,14 +108,14 @@ export default function AlignStart_AddLayoutWeight() {
expect(Start_AddLayoutWeight_012.right).assertEqual(Start_AddLayoutWeight_013.left);
expect(Start_AddLayoutWeight_01.left).assertEqual(Start_AddLayoutWeight_011.left);
expect(Start_AddLayoutWeight_013.right).assertEqual(Start_AddLayoutWeight_01.right);
let oneWidth =
Start_AddLayoutWeight_011.right - Start_AddLayoutWeight_011.left
;
let twoWidth =
Start_AddLayoutWeight_012.right - Start_AddLayoutWeight_012.left
;
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(twoWidth + oneWidth).assertEqual(vp2px(350));
expect(
Start_AddLayoutWeight_013.right - Start_AddLayoutWeight_013.left
).assertEqual(vp2px(150));
expect(
Start_AddLayoutWeight_011.bottom - Start_AddLayoutWeight_011.top
).assertEqual(vp2px(50));
expect(
Start_AddLayoutWeight_012.bottom - Start_AddLayoutWeight_012.top
).assertEqual(vp2px(100));
expect(
Start_AddLayoutWeight_013.bottom - Start_AddLayoutWeight_013.top
).assertEqual(vp2px(150));
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));
expect(
Math.round(Start_AddLayoutWeight_012.bottom - Start_AddLayoutWeight_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddLayoutWeight_013.bottom - Start_AddLayoutWeight_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets
浏览文件 @
f8cde247
...
...
@@ -71,14 +71,14 @@ export default function AlignStart_AddMargin() {
expect(Start_AddMargin_012.left).assertEqual(Start_AddMargin_011.right);
expect(Start_AddMargin_013.left).assertEqual(Start_AddMargin_012.right);
expect(Start_AddMargin_011.left).assertEqual(Start_AddMargin_01.left);
expect(
Start_AddMargin_01.top - Start_AddMargin_01_Box.top
).assertEqual(vp2px(20));
expect(
Start_AddMargin_01.left - Start_AddMargin_01_Box.left
).assertEqual(vp2px(20));
expect(
Start_AddMargin_011.bottom - Start_AddMargin_011.top
).assertEqual(vp2px(50));
expect(
Start_AddMargin_012.bottom - Start_AddMargin_012.top
).assertEqual(vp2px(100));
expect(
Start_AddMargin_013.bottom - Start_AddMargin_013.top
).assertEqual(vp2px(150));
expect(
Start_AddMargin_011.right - Start_AddMargin_011.left
).assertEqual(vp2px(150));
expect(
Start_AddMargin_012.right - Start_AddMargin_012.left
).assertEqual(vp2px(150));
expect(
Start_AddMargin_013.right - Start_AddMargin_013.left
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddMargin_01.top - Start_AddMargin_01_Box.top)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddMargin_01.left - Start_AddMargin_01_Box.left)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddMargin_011.bottom - Start_AddMargin_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddMargin_012.bottom - Start_AddMargin_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddMargin_013.bottom - Start_AddMargin_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddMargin_011.right - Start_AddMargin_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddMargin_012.right - Start_AddMargin_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddMargin_013.right - Start_AddMargin_013.left)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0500] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets
浏览文件 @
f8cde247
...
...
@@ -63,17 +63,17 @@ export default function AlignStart_AddOffset() {
let Start_AddOffset_012 = CommonFunc.getComponentRect('Start_AddOffset_012');
let Start_AddOffset_013 = CommonFunc.getComponentRect('Start_AddOffset_013');
let Start_AddOffset_01 = CommonFunc.getComponentRect('Start_AddOffset_01');
expect(
Start_AddOffset_011.top - Start_AddOffset_01.top).assertEqual(vp2px(15)
);
expect(
Start_AddOffset_011.left - Start_AddOffset_01.left
).assertEqual(vp2px(10));
expect(
Math.round((Start_AddOffset_011.top - Start_AddOffset_01.top)*10)/10).assertEqual(Math.round(vp2px(15)*10)/10
);
expect(
Math.round(Start_AddOffset_011.left - Start_AddOffset_01.left)
).assertEqual(vp2px(10));
expect(Start_AddOffset_012.top).assertEqual(Start_AddOffset_013.top);
expect(Start_AddOffset_013.left).assertEqual(Start_AddOffset_012.right);
expect(
Start_AddOffset_01.right - Start_AddOffset_013.right
).assertEqual(vp2px(50));
expect(
Start_AddOffset_011.right - Start_AddOffset_011.left
).assertEqual(vp2px(150));
expect(
Start_AddOffset_012.right - Start_AddOffset_012.left
).assertEqual(vp2px(150));
expect(
Start_AddOffset_013.right - Start_AddOffset_013.left
).assertEqual(vp2px(150));
expect(
Start_AddOffset_011.bottom - Start_AddOffset_011.top
).assertEqual(vp2px(50));
expect(
Start_AddOffset_012.bottom - Start_AddOffset_012.top
).assertEqual(vp2px(100));
expect(
Start_AddOffset_013.bottom - Start_AddOffset_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOffset_01.right - Start_AddOffset_013.right)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddOffset_011.right - Start_AddOffset_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOffset_012.right - Start_AddOffset_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOffset_013.right - Start_AddOffset_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOffset_011.bottom - Start_AddOffset_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddOffset_012.bottom - Start_AddOffset_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddOffset_013.bottom - Start_AddOffset_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0900] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneMargin.test.ets
浏览文件 @
f8cde247
...
...
@@ -68,15 +68,15 @@ export default function AlignStart_AddOneMargin() {
expect(Start_AddOneMargin_013.top).assertEqual(Start_AddOneMargin_012.top);
expect(Start_AddOneMargin_01.top).assertEqual(Start_AddOneMargin_012.top);
expect(Start_AddOneMargin_013.left).assertEqual(Start_AddOneMargin_012.right);
expect(
Start_AddOneMargin_012.left - Start_AddOneMargin_011.right
).assertEqual(vp2px(20));
expect(
Start_AddOneMargin_011.top - Start_AddOneMargin_01.top
).assertEqual(vp2px(20));
expect(
Start_AddOneMargin_011.left - Start_AddOneMargin_01.left
).assertEqual(vp2px(20));
expect(
Start_AddOneMargin_011.right - Start_AddOneMargin_011.left
).assertEqual(vp2px(150));
expect(
Start_AddOneMargin_012.right - Start_AddOneMargin_012.left
).assertEqual(vp2px(150));
expect(
Start_AddOneMargin_013.right - Start_AddOneMargin_013.left
).assertEqual(vp2px(150));
expect(
Start_AddOneMargin_011.bottom - Start_AddOneMargin_011.top
).assertEqual(vp2px(50));
expect(
Start_AddOneMargin_012.bottom - Start_AddOneMargin_012.top
).assertEqual(vp2px(100));
expect(
Start_AddOneMargin_013.bottom - Start_AddOneMargin_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOneMargin_012.left - Start_AddOneMargin_011.right)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddOneMargin_011.top - Start_AddOneMargin_01.top)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddOneMargin_011.left - Start_AddOneMargin_01.left)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddOneMargin_011.right - Start_AddOneMargin_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOneMargin_012.right - Start_AddOneMargin_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOneMargin_013.right - Start_AddOneMargin_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOneMargin_011.bottom - Start_AddOneMargin_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddOneMargin_012.bottom - Start_AddOneMargin_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddOneMargin_013.bottom - Start_AddOneMargin_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1400] END');
done();
})
...
...
@@ -103,15 +103,20 @@ export default function AlignStart_AddOneMargin() {
expect(Start_AddOneMargin_01.top).assertEqual(Start_AddOneMargin_012.top);
expect(Start_AddOneMargin_013.left).assertEqual(Start_AddOneMargin_012.right);
expect(Start_AddOneMargin_013.right).assertEqual(Start_AddOneMargin_01.right);
expect(Start_AddOneMargin_012.left - Start_AddOneMargin_011.right).assertEqual(vp2px(500/17));
expect(Start_AddOneMargin_011.top - Start_AddOneMargin_01.top).assertEqual(vp2px(30));
expect(Start_AddOneMargin_011.left - Start_AddOneMargin_01.left).assertEqual(vp2px(500/17));
expect(Start_AddOneMargin_011.right - Start_AddOneMargin_011.left).assertEqual(vp2px(2500/17));
expect(Start_AddOneMargin_012.right - Start_AddOneMargin_012.left).assertEqual(vp2px(2500/17));
expect(Start_AddOneMargin_013.right - Start_AddOneMargin_013.left).assertEqual(vp2px(2500/17));
expect(Start_AddOneMargin_011.bottom - Start_AddOneMargin_011.top).assertEqual(vp2px(50));
expect(Start_AddOneMargin_012.bottom - Start_AddOneMargin_012.top).assertEqual(vp2px(100));
expect(Start_AddOneMargin_013.bottom - Start_AddOneMargin_013.top).assertEqual(vp2px(150));
expect(Math.round(Start_AddOneMargin_012.left - Start_AddOneMargin_011.right))
.assertEqual(Math.round(vp2px(500/17)));
expect(Math.round(Start_AddOneMargin_011.top - Start_AddOneMargin_01.top)).assertEqual(vp2px(30));
expect(Math.round(Start_AddOneMargin_011.left - Start_AddOneMargin_01.left))
.assertEqual(Math.round(vp2px(500/17)));
expect(Math.round(Start_AddOneMargin_011.right - Start_AddOneMargin_011.left))
.assertEqual(Math.round(vp2px(2500/17)));
expect(Math.round(Start_AddOneMargin_012.right - Start_AddOneMargin_012.left))
.assertEqual(Math.round(vp2px(2500/17)));
expect(Math.round(Start_AddOneMargin_013.right - Start_AddOneMargin_013.left))
.assertEqual(Math.round(vp2px(2500/17)));
expect(Math.round(Start_AddOneMargin_011.bottom - Start_AddOneMargin_011.top)).assertEqual(vp2px(50));
expect(Math.round(Start_AddOneMargin_012.bottom - Start_AddOneMargin_012.top)).assertEqual(vp2px(100));
expect(Math.round(Start_AddOneMargin_013.bottom - Start_AddOneMargin_013.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1500] END');
done();
})
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets
浏览文件 @
f8cde247
...
...
@@ -69,13 +69,13 @@ export default function AlignStart_AddOneWidth() {
expect(Start_AddOneWidth_01.left).assertEqual(Start_AddOneWidth_011.left);
expect(Start_AddOneWidth_012.left).assertEqual(Start_AddOneWidth_011.right);
expect(Start_AddOneWidth_013.left).assertEqual(Start_AddOneWidth_012.right);
expect(
Start_AddOneWidth_011.right - Start_AddOneWidth_011.left
).assertEqual(vp2px(160));
expect(
Start_AddOneWidth_012.right - Start_AddOneWidth_012.left
).assertEqual(vp2px(150));
expect(
Start_AddOneWidth_013.right - Start_AddOneWidth_013.left
).assertEqual(vp2px(150));
expect(
Start_AddOneWidth_011.bottom - Start_AddOneWidth_011.top
).assertEqual(vp2px(50));
expect(
Start_AddOneWidth_012.bottom - Start_AddOneWidth_012.top
).assertEqual(vp2px(100));
expect(
Start_AddOneWidth_013.bottom - Start_AddOneWidth_013.top
).assertEqual(vp2px(150));
expect(
Start_AddOneWidth_01.right - Start_AddOneWidth_013.right
).assertEqual(vp2px(40));
expect(
Math.round(Start_AddOneWidth_011.right - Start_AddOneWidth_011.left)
).assertEqual(vp2px(160));
expect(
Math.round(Start_AddOneWidth_012.right - Start_AddOneWidth_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOneWidth_013.right - Start_AddOneWidth_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOneWidth_011.bottom - Start_AddOneWidth_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddOneWidth_012.bottom - Start_AddOneWidth_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddOneWidth_013.bottom - Start_AddOneWidth_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddOneWidth_01.right - Start_AddOneWidth_013.right)
).assertEqual(vp2px(40));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1300] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddPadding.test.ets
浏览文件 @
f8cde247
...
...
@@ -69,15 +69,15 @@ export default function AlignStart_AddPadding() {
expect(Start_AddPadding_012.top).assertEqual(Start_AddPadding_013.top);
expect(Start_AddPadding_012.left).assertEqual(Start_AddPadding_011.right);
expect(Start_AddPadding_013.left).assertEqual(Start_AddPadding_012.right);
expect(
Start_AddPadding_011.left - Start_AddPadding_01.left
).assertEqual(vp2px(30));
expect(
Start_AddPadding_01.right - Start_AddPadding_013.right
).assertEqual(vp2px(30));
expect(
Start_AddPadding_011.top - Start_AddPadding_01.top
).assertEqual(vp2px(30));
expect(
Start_AddPadding_011.right - Start_AddPadding_011.left).assertEqual(vp2px(440/3
));
expect(
Start_AddPadding_012.right - Start_AddPadding_012.left).assertEqual(vp2px(440/3
));
expect(
Start_AddPadding_013.right - Start_AddPadding_013.left).assertEqual(vp2px(440/3
));
expect(
Start_AddPadding_011.bottom - Start_AddPadding_011.top
).assertEqual(vp2px(50));
expect(
Start_AddPadding_012.bottom - Start_AddPadding_012.top
).assertEqual(vp2px(100));
expect(
Start_AddPadding_013.bottom - Start_AddPadding_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddPadding_011.left - Start_AddPadding_01.left)
).assertEqual(vp2px(30));
expect(
Math.round(Start_AddPadding_01.right - Start_AddPadding_013.right)
).assertEqual(vp2px(30));
expect(
Math.round(Start_AddPadding_011.top - Start_AddPadding_01.top)
).assertEqual(vp2px(30));
expect(
Math.round(Start_AddPadding_011.right - Start_AddPadding_011.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Start_AddPadding_012.right - Start_AddPadding_012.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Start_AddPadding_013.right - Start_AddPadding_013.left)).assertEqual(Math.round(vp2px(440/3)
));
expect(
Math.round(Start_AddPadding_011.bottom - Start_AddPadding_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddPadding_012.bottom - Start_AddPadding_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddPadding_013.bottom - Start_AddPadding_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0300] END');
done();
});
...
...
@@ -104,15 +104,15 @@ export default function AlignStart_AddPadding() {
expect(Start_AddPadding_012.top).assertEqual(Start_AddPadding_013.top)
expect( Start_AddPadding_012.left ).assertEqual(Start_AddPadding_011.right)
expect( Start_AddPadding_013.left ).assertEqual(Start_AddPadding_012.right)
expect(
Start_AddPadding_011.left - Start_AddPadding_01.left
).assertEqual(vp2px(20));
expect(
Start_AddPadding_01.right - Start_AddPadding_013.right
).assertEqual(vp2px(30));
expect(
Start_AddPadding_011.top - Start_AddPadding_01.top
).assertEqual(vp2px(20));
expect(
Start_AddPadding_011.right - Start_AddPadding_011.left
).assertEqual(vp2px(150));
expect(
Start_AddPadding_012.right - Start_AddPadding_012.left
).assertEqual(vp2px(150));
expect(
Start_AddPadding_013.right - Start_AddPadding_013.left
).assertEqual(vp2px(150));
expect(
Start_AddPadding_011.bottom - Start_AddPadding_011.top
).assertEqual(vp2px(50));
expect(
Start_AddPadding_012.bottom - Start_AddPadding_012.top
).assertEqual(vp2px(100));
expect(
Start_AddPadding_013.bottom - Start_AddPadding_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddPadding_011.left - Start_AddPadding_01.left)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddPadding_01.right - Start_AddPadding_013.right)
).assertEqual(vp2px(30));
expect(
Math.round(Start_AddPadding_011.top - Start_AddPadding_01.top)
).assertEqual(vp2px(20));
expect(
Math.round(Start_AddPadding_011.right - Start_AddPadding_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddPadding_012.right - Start_AddPadding_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddPadding_013.right - Start_AddPadding_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddPadding_011.bottom - Start_AddPadding_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddPadding_012.bottom - Start_AddPadding_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddPadding_013.bottom - Start_AddPadding_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0400] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets
浏览文件 @
f8cde247
...
...
@@ -67,11 +67,11 @@ export default function AlignStart_AddVisibility() {
expect(Start_AddVisibility_012.top).assertEqual(Start_AddVisibility_01.top);
expect(Start_AddVisibility_012.left).assertEqual(Start_AddVisibility_01.left);
expect(Start_AddVisibility_012.right).assertEqual(Start_AddVisibility_013.left);
expect(
Start_AddVisibility_012.right - Start_AddVisibility_012.left
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_013.right - Start_AddVisibility_013.left
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_012.bottom - Start_AddVisibility_012.top
).assertEqual(vp2px(100));
expect(
Start_AddVisibility_013.bottom - Start_AddVisibility_013.top
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_01.right - Start_AddVisibility_013.right
).assertEqual(vp2px(200));
expect(
Math.round(Start_AddVisibility_012.right - Start_AddVisibility_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_013.right - Start_AddVisibility_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_012.bottom - Start_AddVisibility_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_01.right - Start_AddVisibility_013.right)
).assertEqual(vp2px(200));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000] END');
done();
});
...
...
@@ -103,13 +103,13 @@ export default function AlignStart_AddVisibility() {
expect(Start_AddVisibility_012.left).assertEqual(Start_AddVisibility_011.right);
expect(Start_AddVisibility_013.left).assertEqual(Start_AddVisibility_012.right);
expect(Start_AddVisibility_01.left).assertEqual(Start_AddVisibility_011.left);
expect(
Start_AddVisibility_011.right - Start_AddVisibility_011.left
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_012.right - Start_AddVisibility_012.left
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_013.right - Start_AddVisibility_013.left
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_011.bottom - Start_AddVisibility_011.top
).assertEqual(vp2px(50));
expect(
Start_AddVisibility_012.bottom - Start_AddVisibility_012.top
).assertEqual(vp2px(100));
expect(
Start_AddVisibility_013.bottom - Start_AddVisibility_013.top
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_012.left - Start_AddVisibility_01.left
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_011.right - Start_AddVisibility_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_012.right - Start_AddVisibility_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_013.right - Start_AddVisibility_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_011.bottom - Start_AddVisibility_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddVisibility_012.bottom - Start_AddVisibility_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_012.left - Start_AddVisibility_01.left)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] END');
done();
});
...
...
@@ -141,13 +141,13 @@ export default function AlignStart_AddVisibility() {
expect(Start_AddVisibility_012.left).assertEqual(Start_AddVisibility_011.right);
expect(Start_AddVisibility_013.left).assertEqual(Start_AddVisibility_012.right);
expect(Start_AddVisibility_01.left).assertEqual(Start_AddVisibility_011.left);
expect(
Start_AddVisibility_011.right - Start_AddVisibility_011.left
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_012.right - Start_AddVisibility_012.left
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_013.right - Start_AddVisibility_013.left
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_011.bottom - Start_AddVisibility_011.top
).assertEqual(vp2px(50));
expect(
Start_AddVisibility_012.bottom - Start_AddVisibility_012.top
).assertEqual(vp2px(100));
expect(
Start_AddVisibility_013.bottom - Start_AddVisibility_013.top
).assertEqual(vp2px(150));
expect(
Start_AddVisibility_012.left - Start_AddVisibility_01.left
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_011.right - Start_AddVisibility_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_012.right - Start_AddVisibility_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_013.right - Start_AddVisibility_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_011.bottom - Start_AddVisibility_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_AddVisibility_012.bottom - Start_AddVisibility_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Start_AddVisibility_012.left - Start_AddVisibility_01.left)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets
浏览文件 @
f8cde247
...
...
@@ -71,12 +71,12 @@ export default function AlignStart_NoSpace() {
expect(Start_NoSpace_013.left).assertEqual(Start_NoSpace_012.right);
expect(Start_NoSpace_01.left).assertEqual(Start_NoSpace_011.left);
expect(Start_NoSpace_01.right).assertEqual(Start_NoSpace_013.right);
expect(
Start_NoSpace_011.right - Start_NoSpace_011.left).assertEqual(vp2px(400/3
));
expect(
Start_NoSpace_012.right - Start_NoSpace_012.left).assertEqual(vp2px(400/3
));
expect(
Start_NoSpace_013.right - Start_NoSpace_013.left).assertEqual(vp2px(400/3
));
expect(
Start_NoSpace_011.bottom - Start_NoSpace_011.top
).assertEqual(vp2px(50));
expect(
Start_NoSpace_012.bottom - Start_NoSpace_012.top
).assertEqual(vp2px(100));
expect(
Start_NoSpace_013.bottom - Start_NoSpace_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Start_NoSpace_011.right - Start_NoSpace_011.left)).assertEqual(Math.round(vp2px(400/3)
));
expect(
Math.round(Start_NoSpace_012.right - Start_NoSpace_012.left)).assertEqual(Math.round(vp2px(400/3)
));
expect(
Math.round(Start_NoSpace_013.right - Start_NoSpace_013.left)).assertEqual(Math.round(vp2px(400/3)
));
expect(
Math.round(Start_NoSpace_011.bottom - Start_NoSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_NoSpace_012.bottom - Start_NoSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_NoSpace_013.bottom - Start_NoSpace_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0100] END');
done();
});
...
...
@@ -105,13 +105,13 @@ export default function AlignStart_NoSpace() {
expect(Start_NoSpace_01.left).assertEqual(Start_NoSpace_011.left);
expect(Start_NoSpace_012.left).assertEqual(Start_NoSpace_011.right);
expect(Start_NoSpace_013.left).assertEqual(Start_NoSpace_012.right);
expect(
Start_NoSpace_01.right - Start_NoSpace_013.right
).assertEqual(vp2px(50));
expect(
Start_NoSpace_011.right - Start_NoSpace_011.left
).assertEqual(vp2px(150));
expect(
Start_NoSpace_012.right - Start_NoSpace_012.left
).assertEqual(vp2px(150));
expect(
Start_NoSpace_013.right - Start_NoSpace_013.left
).assertEqual(vp2px(150));
expect(
Start_NoSpace_011.bottom - Start_NoSpace_011.top
).assertEqual(vp2px(50));
expect(
Start_NoSpace_012.bottom - Start_NoSpace_012.top
).assertEqual(vp2px(100));
expect(
Start_NoSpace_013.bottom - Start_NoSpace_013.top
).assertEqual(vp2px(150));
expect(
Math.round(Start_NoSpace_01.right - Start_NoSpace_013.right)
).assertEqual(vp2px(50));
expect(
Math.round(Start_NoSpace_011.right - Start_NoSpace_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_NoSpace_012.right - Start_NoSpace_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_NoSpace_013.right - Start_NoSpace_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Start_NoSpace_011.bottom - Start_NoSpace_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Start_NoSpace_012.bottom - Start_NoSpace_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Start_NoSpace_013.bottom - Start_NoSpace_013.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0200] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.test.ets
浏览文件 @
f8cde247
...
...
@@ -63,8 +63,10 @@ export default function Grid_RowCol_Gap() {
expect(Grid_RowCol_Gap_011.left).assertEqual(Grid_RowCol_Gap_01.left);
expect(Grid_RowCol_Gap_013.left).assertEqual(Grid_RowCol_Gap_01.left);
expect(Grid_RowCol_Gap_012.left - Grid_RowCol_Gap_011.right).assertEqual(vp2px(5));
expect(Grid_RowCol_Gap_014.left - Grid_RowCol_Gap_013.right).assertEqual(vp2px(5));
expect(Math.round((Grid_RowCol_Gap_012.left - Grid_RowCol_Gap_011.right)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Math.round((Grid_RowCol_Gap_014.left - Grid_RowCol_Gap_013.right)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Grid_RowCol_Gap_012.right).assertEqual(Grid_RowCol_Gap_01.right);
expect(Grid_RowCol_Gap_014.right).assertEqual(Grid_RowCol_Gap_01.right);
...
...
@@ -81,15 +83,19 @@ export default function Grid_RowCol_Gap() {
expect(Grid_RowCol_Gap_011.right).assertEqual(Grid_RowCol_Gap_013.right);
expect(Grid_RowCol_Gap_012.left).assertEqual(Grid_RowCol_Gap_014.left);
expect(Grid_RowCol_Gap_011.right - Grid_RowCol_Gap_011.left).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_012.right - Grid_RowCol_Gap_012.left).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_013.right - Grid_RowCol_Gap_013.left).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_014.right - Grid_RowCol_Gap_014.left).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_011.bottom - Grid_RowCol_Gap_011.top).assertEqual(vp2px(150));
expect(Grid_RowCol_Gap_012.bottom - Grid_RowCol_Gap_012.top).assertEqual(vp2px(150));
expect(Grid_RowCol_Gap_013.bottom - Grid_RowCol_Gap_013.top).assertEqual(vp2px(150));
expect(Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top).assertEqual(vp2px(150));
expect(Math.round((Grid_RowCol_Gap_011.right - Grid_RowCol_Gap_011.left)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_012.right - Grid_RowCol_Gap_012.left)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_013.right - Grid_RowCol_Gap_013.left)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_014.right - Grid_RowCol_Gap_014.left)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round(Grid_RowCol_Gap_011.bottom - Grid_RowCol_Gap_011.top)).assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_Gap_012.bottom - Grid_RowCol_Gap_012.top)).assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_Gap_013.bottom - Grid_RowCol_Gap_013.top)).assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top)).assertEqual(vp2px(150));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0600] END');
done();
});
...
...
@@ -129,18 +135,24 @@ export default function Grid_RowCol_Gap() {
expect(Grid_RowCol_Gap_013.top).assertEqual(Grid_RowCol_Gap_014.top);
expect(Grid_RowCol_Gap_011.bottom).assertEqual(Grid_RowCol_Gap_012.bottom);
expect(Grid_RowCol_Gap_013.top - Grid_RowCol_Gap_011.bottom).assertEqual(vp2px(5));
expect(Grid_RowCol_Gap_014.top - Grid_RowCol_Gap_012.bottom).assertEqual(vp2px(5));
expect(Grid_RowCol_Gap_011.right - Grid_RowCol_Gap_011.left).assertEqual(vp2px(150));
expect(Grid_RowCol_Gap_012.right - Grid_RowCol_Gap_012.left).assertEqual(vp2px(150));
expect(Grid_RowCol_Gap_013.right - Grid_RowCol_Gap_013.left).assertEqual(vp2px(150));
expect(Grid_RowCol_Gap_014.right - Grid_RowCol_Gap_014.left).assertEqual(vp2px(150));
expect(Grid_RowCol_Gap_011.bottom - Grid_RowCol_Gap_011.top).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_012.bottom - Grid_RowCol_Gap_012.top).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_013.bottom - Grid_RowCol_Gap_013.top).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top).assertEqual(vp2px(147.5));
expect(Math.round((Grid_RowCol_Gap_013.top - Grid_RowCol_Gap_011.bottom)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Math.round((Grid_RowCol_Gap_014.top - Grid_RowCol_Gap_012.bottom)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Math.round(Grid_RowCol_Gap_011.right - Grid_RowCol_Gap_011.left)).assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_Gap_012.right - Grid_RowCol_Gap_012.left)).assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_Gap_013.right - Grid_RowCol_Gap_013.left)).assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_Gap_014.right - Grid_RowCol_Gap_014.left)).assertEqual(vp2px(150));
expect(Math.round((Grid_RowCol_Gap_011.bottom - Grid_RowCol_Gap_011.top)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_012.bottom - Grid_RowCol_Gap_012.top)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_013.bottom - Grid_RowCol_Gap_013.top)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0700] END');
done();
});
...
...
@@ -177,21 +189,33 @@ export default function Grid_RowCol_Gap() {
expect(Grid_RowCol_Gap_013.top).assertEqual(Grid_RowCol_Gap_014.top);
expect(Grid_RowCol_Gap_011.bottom).assertEqual(Grid_RowCol_Gap_012.bottom);
expect(Grid_RowCol_Gap_013.top - Grid_RowCol_Gap_011.bottom).assertEqual(vp2px(5));
expect(Grid_RowCol_Gap_014.top - Grid_RowCol_Gap_012.bottom).assertEqual(vp2px(5));
expect(Grid_RowCol_Gap_012.left - Grid_RowCol_Gap_011.right).assertEqual(vp2px(5));
expect(Grid_RowCol_Gap_014.left - Grid_RowCol_Gap_013.right).assertEqual(vp2px(5));
expect(Grid_RowCol_Gap_011.right - Grid_RowCol_Gap_011.left).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_012.right - Grid_RowCol_Gap_012.left).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_013.right - Grid_RowCol_Gap_013.left).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_014.right - Grid_RowCol_Gap_014.left).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_011.bottom - Grid_RowCol_Gap_011.top).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_012.bottom - Grid_RowCol_Gap_012.top).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_013.bottom - Grid_RowCol_Gap_013.top).assertEqual(vp2px(147.5));
expect(Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top).assertEqual(vp2px(147.5));
expect(Math.round((Grid_RowCol_Gap_013.top - Grid_RowCol_Gap_011.bottom)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Math.round((Grid_RowCol_Gap_014.top - Grid_RowCol_Gap_012.bottom)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Math.round((Grid_RowCol_Gap_012.left - Grid_RowCol_Gap_011.right)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Math.round((Grid_RowCol_Gap_014.left - Grid_RowCol_Gap_013.right)*10)/10)
.assertEqual(Math.round(vp2px(5)*10)/10);
expect(Math.round((Grid_RowCol_Gap_011.right - Grid_RowCol_Gap_011.left)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_012.right - Grid_RowCol_Gap_012.left)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_013.right - Grid_RowCol_Gap_013.left)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_014.right - Grid_RowCol_Gap_014.left)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_011.bottom - Grid_RowCol_Gap_011.top)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_012.bottom - Grid_RowCol_Gap_012.top)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_013.bottom - Grid_RowCol_Gap_013.top)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
expect(Math.round((Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top)*100)/100)
.assertEqual(Math.round(vp2px(147.5)*100)/100);
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0800] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.test.ets
浏览文件 @
f8cde247
...
...
@@ -79,15 +79,15 @@ export default function Grid_RowCol_GridSize() {
expect(Grid_RowCol_GridSize_014.bottom).assertEqual(Grid_RowCol_GridSize_01.bottom);
expect(
Grid_RowCol_GridSize_011.right - Grid_RowCol_GridSize_011.left
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_012.right - Grid_RowCol_GridSize_012.left
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_013.right - Grid_RowCol_GridSize_013.left
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_014.right - Grid_RowCol_GridSize_014.left
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_011.bottom - Grid_RowCol_GridSize_011.top
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_012.bottom - Grid_RowCol_GridSize_012.top
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_013.bottom - Grid_RowCol_GridSize_013.top
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_014.bottom - Grid_RowCol_GridSize_014.top
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_011.right - Grid_RowCol_GridSize_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_012.right - Grid_RowCol_GridSize_012.left)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_013.right - Grid_RowCol_GridSize_013.left)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_014.right - Grid_RowCol_GridSize_014.left)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_011.bottom - Grid_RowCol_GridSize_011.top)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_012.bottom - Grid_RowCol_GridSize_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_013.bottom - Grid_RowCol_GridSize_013.top)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_014.bottom - Grid_RowCol_GridSize_014.top)
).assertEqual(vp2px(100));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0100] END');
done();
});
...
...
@@ -127,15 +127,15 @@ export default function Grid_RowCol_GridSize() {
expect(Grid_RowCol_GridSize_014.bottom).assertEqual(Grid_RowCol_GridSize_01.bottom);
expect(
Grid_RowCol_GridSize_011.right - Grid_RowCol_GridSize_011.left
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_012.right - Grid_RowCol_GridSize_012.left
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_013.right - Grid_RowCol_GridSize_013.left
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_014.right - Grid_RowCol_GridSize_014.left
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_011.right - Grid_RowCol_GridSize_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_012.right - Grid_RowCol_GridSize_012.left)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_013.right - Grid_RowCol_GridSize_013.left)
).assertEqual(vp2px(100));
expect(
Math.round(Grid_RowCol_GridSize_014.right - Grid_RowCol_GridSize_014.left)
).assertEqual(vp2px(100));
expect(
Grid_RowCol_GridSize_011.bottom - Grid_RowCol_GridSize_011.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_GridSize_012.bottom - Grid_RowCol_GridSize_012.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_GridSize_013.bottom - Grid_RowCol_GridSize_013.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_GridSize_014.bottom - Grid_RowCol_GridSize_014.top
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_GridSize_011.bottom - Grid_RowCol_GridSize_011.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_GridSize_012.bottom - Grid_RowCol_GridSize_012.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_GridSize_013.bottom - Grid_RowCol_GridSize_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_GridSize_014.bottom - Grid_RowCol_GridSize_014.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0200] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.test.ets
浏览文件 @
f8cde247
...
...
@@ -78,15 +78,21 @@ export default function Grid_RowCol_LayoutDirection() {
expect(Grid_RowCol_LayoutDirection_013.bottom).assertEqual(Grid_RowCol_LayoutDirection_01.bottom);
expect(Grid_RowCol_LayoutDirection_014.bottom).assertEqual(Grid_RowCol_LayoutDirection_01.bottom);
expect(Grid_RowCol_LayoutDirection_011.right - Grid_RowCol_LayoutDirection_011.left).assertEqual(vp2px(150));
expect(Grid_RowCol_LayoutDirection_012.right - Grid_RowCol_LayoutDirection_012.left).assertEqual(vp2px(150));
expect(Grid_RowCol_LayoutDirection_013.right - Grid_RowCol_LayoutDirection_013.left).assertEqual(vp2px(150));
expect(Grid_RowCol_LayoutDirection_014.right - Grid_RowCol_LayoutDirection_014.left).assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_LayoutDirection_011.right - Grid_RowCol_LayoutDirection_011.left))
.assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_LayoutDirection_012.right - Grid_RowCol_LayoutDirection_012.left))
.assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_LayoutDirection_013.right - Grid_RowCol_LayoutDirection_013.left))
.assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_LayoutDirection_014.right - Grid_RowCol_LayoutDirection_014.left))
.assertEqual(vp2px(150));
expect(Grid_RowCol_LayoutDirection_011.bottom - Grid_RowCol_LayoutDirection_011.top).assertEqual(vp2px(150));
expect(Grid_RowCol_LayoutDirection_012.bottom - Grid_RowCol_LayoutDirection_012.top).assertEqual(vp2px(150));
expect(Grid_RowCol_LayoutDirection_013.bottom - Grid_RowCol_LayoutDirection_013.top).assertEqual(vp2px(150));
expect(Grid_RowCol_LayoutDirection_014.bottom - Grid_RowCol_LayoutDirection_014.top).assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_LayoutDirection_011.bottom - Grid_RowCol_LayoutDirection_011.top))
.assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_LayoutDirection_013.bottom - Grid_RowCol_LayoutDirection_013.top))
.assertEqual(vp2px(150));
expect(Math.round(Grid_RowCol_LayoutDirection_014.bottom - Grid_RowCol_LayoutDirection_014.top))
.assertEqual(vp2px(150));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0900] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.test.ets
浏览文件 @
f8cde247
...
...
@@ -60,34 +60,34 @@ export default function Grid_RowCol_PadMar() {
let Grid_RowCol_PadMar_013 = CommonFunc.getComponentRect('Grid_RowCol_PadMar_013');
let Grid_RowCol_PadMar_014 = CommonFunc.getComponentRect('Grid_RowCol_PadMar_014');
let Grid_RowCol_PadMar_01 = CommonFunc.getComponentRect('Grid_RowCol_PadMar_01');
expect(
Grid_RowCol_PadMar_011.left - Grid_RowCol_PadMar_01.left
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_011.left - Grid_RowCol_PadMar_01.left)
).assertEqual(vp2px(10));
expect(Grid_RowCol_PadMar_013.left).assertEqual(Grid_RowCol_PadMar_011.left);
expect(Grid_RowCol_PadMar_011.right).assertEqual(Grid_RowCol_PadMar_012.left);
expect(Grid_RowCol_PadMar_013.right).assertEqual(Grid_RowCol_PadMar_014.left);
expect(
Grid_RowCol_PadMar_01.right - Grid_RowCol_PadMar_012.right
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_01.right - Grid_RowCol_PadMar_012.right)
).assertEqual(vp2px(10));
expect(Grid_RowCol_PadMar_014.right).assertEqual(Grid_RowCol_PadMar_012.right);
expect(
Grid_RowCol_PadMar_011.top - Grid_RowCol_PadMar_01.top
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_011.top - Grid_RowCol_PadMar_01.top)
).assertEqual(vp2px(10));
expect(Grid_RowCol_PadMar_012.top).assertEqual(Grid_RowCol_PadMar_011.top);
expect(Grid_RowCol_PadMar_011.bottom).assertEqual(Grid_RowCol_PadMar_013.top);
expect(Grid_RowCol_PadMar_012.bottom).assertEqual(Grid_RowCol_PadMar_014.top);
expect(
Grid_RowCol_PadMar_01.bottom - Grid_RowCol_PadMar_013.bottom
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_01.bottom - Grid_RowCol_PadMar_013.bottom)
).assertEqual(vp2px(10));
expect(Grid_RowCol_PadMar_013.bottom).assertEqual(Grid_RowCol_PadMar_014.bottom);
expect(
Grid_RowCol_PadMar_011.right - Grid_RowCol_PadMar_011.left
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_012.right - Grid_RowCol_PadMar_012.left
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_013.right - Grid_RowCol_PadMar_013.left
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_014.right - Grid_RowCol_PadMar_014.left
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_011.right - Grid_RowCol_PadMar_011.left)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_012.right - Grid_RowCol_PadMar_012.left)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_013.right - Grid_RowCol_PadMar_013.left)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_014.right - Grid_RowCol_PadMar_014.left)
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_011.bottom - Grid_RowCol_PadMar_011.top
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_011.bottom - Grid_RowCol_PadMar_011.top)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top)
).assertEqual(vp2px(140));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0300] END');
done();
});
...
...
@@ -128,20 +128,20 @@ export default function Grid_RowCol_PadMar() {
expect(Grid_RowCol_PadMar_01.bottom).assertEqual(Grid_RowCol_PadMar_013.bottom);
expect(Grid_RowCol_PadMar_013.bottom).assertEqual(Grid_RowCol_PadMar_014.bottom);
expect(
Grid_RowCol_PadMar_01.left - Grid_RowCol_PadMar_Box_01.left
).assertEqual(vp2px(10));
expect(
Grid_RowCol_PadMar_01.top - Grid_RowCol_PadMar_Box_01.top
).assertEqual(vp2px(10));
expect(
Grid_RowCol_PadMar_Box_01.right - Grid_RowCol_PadMar_01.right
).assertEqual(vp2px(10));
expect(
Grid_RowCol_PadMar_Box_01.bottom - Grid_RowCol_PadMar_01.bottom
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_01.left - Grid_RowCol_PadMar_Box_01.left)
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_01.top - Grid_RowCol_PadMar_Box_01.top)
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_Box_01.right - Grid_RowCol_PadMar_01.right)
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_Box_01.bottom - Grid_RowCol_PadMar_01.bottom)
).assertEqual(vp2px(10));
expect(
Grid_RowCol_PadMar_011.right - Grid_RowCol_PadMar_011.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_PadMar_012.right - Grid_RowCol_PadMar_012.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_PadMar_013.right - Grid_RowCol_PadMar_013.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_PadMar_014.right - Grid_RowCol_PadMar_014.left
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_PadMar_011.right - Grid_RowCol_PadMar_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_PadMar_012.right - Grid_RowCol_PadMar_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_PadMar_013.right - Grid_RowCol_PadMar_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_PadMar_014.right - Grid_RowCol_PadMar_014.left)
).assertEqual(vp2px(150));
expect(
Grid_RowCol_PadMar_011.bottom - Grid_RowCol_PadMar_011.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_PadMar_011.bottom - Grid_RowCol_PadMar_011.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0400] END');
done();
});
...
...
@@ -164,39 +164,39 @@ export default function Grid_RowCol_PadMar() {
let Grid_RowCol_PadMar_014 = CommonFunc.getComponentRect('Grid_RowCol_PadMar_014');
let Grid_RowCol_PadMar_01 = CommonFunc.getComponentRect('Grid_RowCol_PadMar_01');
let Grid_RowCol_PadMar_Box_01 = CommonFunc.getComponentRect('Grid_RowCol_PadMar_Box_01');
expect(
Grid_RowCol_PadMar_011.left - Grid_RowCol_PadMar_01.left
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_011.left - Grid_RowCol_PadMar_01.left)
).assertEqual(vp2px(10));
expect(Grid_RowCol_PadMar_013.left).assertEqual(Grid_RowCol_PadMar_011.left);
expect(Grid_RowCol_PadMar_011.right).assertEqual(Grid_RowCol_PadMar_012.left);
expect(Grid_RowCol_PadMar_013.right).assertEqual(Grid_RowCol_PadMar_014.left);
expect(
Grid_RowCol_PadMar_01.right - Grid_RowCol_PadMar_012.right
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_01.right - Grid_RowCol_PadMar_012.right)
).assertEqual(vp2px(10));
expect(Grid_RowCol_PadMar_014.right).assertEqual(Grid_RowCol_PadMar_012.right);
expect(
Grid_RowCol_PadMar_011.top - Grid_RowCol_PadMar_01.top
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_011.top - Grid_RowCol_PadMar_01.top)
).assertEqual(vp2px(10));
expect(Grid_RowCol_PadMar_012.top).assertEqual(Grid_RowCol_PadMar_011.top);
expect(Grid_RowCol_PadMar_011.bottom).assertEqual(Grid_RowCol_PadMar_013.top);
expect(Grid_RowCol_PadMar_012.bottom).assertEqual(Grid_RowCol_PadMar_014.top);
expect(
Grid_RowCol_PadMar_01.bottom - Grid_RowCol_PadMar_013.bottom
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_01.bottom - Grid_RowCol_PadMar_013.bottom)
).assertEqual(vp2px(10));
expect(Grid_RowCol_PadMar_013.bottom).assertEqual(Grid_RowCol_PadMar_014.bottom);
expect(
Grid_RowCol_PadMar_01.left - Grid_RowCol_PadMar_Box_01.left
).assertEqual(vp2px(10));
expect(
Grid_RowCol_PadMar_01.top - Grid_RowCol_PadMar_Box_01.top
).assertEqual(vp2px(10));
expect(
Grid_RowCol_PadMar_Box_01.right - Grid_RowCol_PadMar_01.right
).assertEqual(vp2px(10));
expect(
Grid_RowCol_PadMar_Box_01.bottom - Grid_RowCol_PadMar_01.bottom
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_01.left - Grid_RowCol_PadMar_Box_01.left)
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_01.top - Grid_RowCol_PadMar_Box_01.top)
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_Box_01.right - Grid_RowCol_PadMar_01.right)
).assertEqual(vp2px(10));
expect(
Math.round(Grid_RowCol_PadMar_Box_01.bottom - Grid_RowCol_PadMar_01.bottom)
).assertEqual(vp2px(10));
expect(
Grid_RowCol_PadMar_011.right - Grid_RowCol_PadMar_011.left
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_012.right - Grid_RowCol_PadMar_012.left
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_013.right - Grid_RowCol_PadMar_013.left
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_014.right - Grid_RowCol_PadMar_014.left
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_011.right - Grid_RowCol_PadMar_011.left)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_012.right - Grid_RowCol_PadMar_012.left)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_013.right - Grid_RowCol_PadMar_013.left)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_014.right - Grid_RowCol_PadMar_014.left)
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_011.bottom - Grid_RowCol_PadMar_011.top
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top
).assertEqual(vp2px(140));
expect(
Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_011.bottom - Grid_RowCol_PadMar_011.top)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top)
).assertEqual(vp2px(140));
expect(
Math.round(Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top)
).assertEqual(vp2px(140));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0500] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.test.ets
浏览文件 @
f8cde247
...
...
@@ -79,15 +79,15 @@ export default function Grid_RowCol_cellLength() {
expect(Grid_RowCol_cellLength_014.bottom).assertEqual(Grid_RowCol_cellLength_01.bottom);
expect(
Grid_RowCol_cellLength_011.right - Grid_RowCol_cellLength_011.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_cellLength_012.right - Grid_RowCol_cellLength_012.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_cellLength_013.right - Grid_RowCol_cellLength_013.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_cellLength_014.right - Grid_RowCol_cellLength_014.left
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_cellLength_011.right - Grid_RowCol_cellLength_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_cellLength_012.right - Grid_RowCol_cellLength_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_cellLength_013.right - Grid_RowCol_cellLength_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_cellLength_014.right - Grid_RowCol_cellLength_014.left)
).assertEqual(vp2px(150));
expect(
Grid_RowCol_cellLength_011.bottom - Grid_RowCol_cellLength_011.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_cellLength_012.bottom - Grid_RowCol_cellLength_012.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_cellLength_013.bottom - Grid_RowCol_cellLength_013.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_cellLength_014.bottom - Grid_RowCol_cellLength_014.top
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_cellLength_011.bottom - Grid_RowCol_cellLength_011.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_cellLength_012.bottom - Grid_RowCol_cellLength_012.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_cellLength_013.bottom - Grid_RowCol_cellLength_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_cellLength_014.bottom - Grid_RowCol_cellLength_014.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1100] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.test.ets
浏览文件 @
f8cde247
...
...
@@ -79,15 +79,15 @@ export default function Grid_RowCol_maxCount() {
expect(Grid_RowCol_maxCount_014.bottom).assertEqual(Grid_RowCol_maxCount_01.bottom);
expect(
Grid_RowCol_maxCount_011.right - Grid_RowCol_maxCount_011.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_maxCount_012.right - Grid_RowCol_maxCount_012.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_maxCount_013.right - Grid_RowCol_maxCount_013.left
).assertEqual(vp2px(150));
expect(
Grid_RowCol_maxCount_014.right - Grid_RowCol_maxCount_014.left
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_maxCount_011.right - Grid_RowCol_maxCount_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_maxCount_012.right - Grid_RowCol_maxCount_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_maxCount_013.right - Grid_RowCol_maxCount_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_maxCount_014.right - Grid_RowCol_maxCount_014.left)
).assertEqual(vp2px(150));
expect(
Grid_RowCol_maxCount_011.bottom - Grid_RowCol_maxCount_011.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_maxCount_012.bottom - Grid_RowCol_maxCount_012.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_maxCount_013.bottom - Grid_RowCol_maxCount_013.top
).assertEqual(vp2px(150));
expect(
Grid_RowCol_maxCount_014.bottom - Grid_RowCol_maxCount_014.top
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_maxCount_011.bottom - Grid_RowCol_maxCount_011.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_maxCount_012.bottom - Grid_RowCol_maxCount_012.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_maxCount_013.bottom - Grid_RowCol_maxCount_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Grid_RowCol_maxCount_014.bottom - Grid_RowCol_maxCount_014.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1000] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.test.ets
浏览文件 @
f8cde247
...
...
@@ -79,15 +79,15 @@ export default function Grid_RowCol_TemplateChange() {
expect(GridTemplateChange_Grid_014.bottom).assertEqual(GridTemplateChange_Grid_01.bottom);
expect(
GridTemplateChange_Grid_011.right - GridTemplateChange_Grid_011.left
).assertEqual(vp2px(150));
expect(
GridTemplateChange_Grid_012.right - GridTemplateChange_Grid_012.left
).assertEqual(vp2px(150));
expect(
GridTemplateChange_Grid_013.right - GridTemplateChange_Grid_013.left
).assertEqual(vp2px(150));
expect(
GridTemplateChange_Grid_014.right - GridTemplateChange_Grid_014.left
).assertEqual(vp2px(150));
expect(
Math.round(GridTemplateChange_Grid_011.right - GridTemplateChange_Grid_011.left)
).assertEqual(vp2px(150));
expect(
Math.round(GridTemplateChange_Grid_012.right - GridTemplateChange_Grid_012.left)
).assertEqual(vp2px(150));
expect(
Math.round(GridTemplateChange_Grid_013.right - GridTemplateChange_Grid_013.left)
).assertEqual(vp2px(150));
expect(
Math.round(GridTemplateChange_Grid_014.right - GridTemplateChange_Grid_014.left)
).assertEqual(vp2px(150));
expect(
GridTemplateChange_Grid_011.bottom - GridTemplateChange_Grid_011.top
).assertEqual(vp2px(150));
expect(
GridTemplateChange_Grid_012.bottom - GridTemplateChange_Grid_012.top
).assertEqual(vp2px(150));
expect(
GridTemplateChange_Grid_013.bottom - GridTemplateChange_Grid_013.top
).assertEqual(vp2px(150));
expect(
GridTemplateChange_Grid_014.bottom - GridTemplateChange_Grid_014.top
).assertEqual(vp2px(150));
expect(
Math.round(GridTemplateChange_Grid_011.bottom - GridTemplateChange_Grid_011.top)
).assertEqual(vp2px(150));
expect(
Math.round(GridTemplateChange_Grid_012.bottom - GridTemplateChange_Grid_012.top)
).assertEqual(vp2px(150));
expect(
Math.round(GridTemplateChange_Grid_013.bottom - GridTemplateChange_Grid_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(GridTemplateChange_Grid_014.bottom - GridTemplateChange_Grid_014.top)
).assertEqual(vp2px(150));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0100] END');
done();
});
...
...
@@ -125,15 +125,15 @@ export default function Grid_RowCol_TemplateChange() {
expect(GridTemplateChange_Grid_011.bottom).assertEqual(GridTemplateChange_Grid_012.bottom);
expect(GridTemplateChange_Grid_011.bottom).assertEqual(GridTemplateChange_Grid_013.bottom);
expect(
GridTemplateChange_Grid_011.right - GridTemplateChange_Grid_011.left
).assertEqual(vp2px(100));
expect(
GridTemplateChange_Grid_012.right - GridTemplateChange_Grid_012.left
).assertEqual(vp2px(100));
expect(
GridTemplateChange_Grid_013.right - GridTemplateChange_Grid_013.left
).assertEqual(vp2px(100));
expect(
GridTemplateChange_Grid_014.right - GridTemplateChange_Grid_014.left
).assertEqual(vp2px(100));
expect(
Math.round(GridTemplateChange_Grid_011.right - GridTemplateChange_Grid_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(GridTemplateChange_Grid_012.right - GridTemplateChange_Grid_012.left)
).assertEqual(vp2px(100));
expect(
Math.round(GridTemplateChange_Grid_013.right - GridTemplateChange_Grid_013.left)
).assertEqual(vp2px(100));
expect(
Math.round(GridTemplateChange_Grid_014.right - GridTemplateChange_Grid_014.left)
).assertEqual(vp2px(100));
expect(
GridTemplateChange_Grid_011.bottom - GridTemplateChange_Grid_011.top
).assertEqual(vp2px(100));
expect(
GridTemplateChange_Grid_012.bottom - GridTemplateChange_Grid_012.top
).assertEqual(vp2px(100));
expect(
GridTemplateChange_Grid_013.bottom - GridTemplateChange_Grid_013.top
).assertEqual(vp2px(100));
expect(
GridTemplateChange_Grid_014.bottom - GridTemplateChange_Grid_014.top
).assertEqual(vp2px(100));
expect(
Math.round(GridTemplateChange_Grid_011.bottom - GridTemplateChange_Grid_011.top)
).assertEqual(vp2px(100));
expect(
Math.round(GridTemplateChange_Grid_012.bottom - GridTemplateChange_Grid_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(GridTemplateChange_Grid_013.bottom - GridTemplateChange_Grid_013.top)
).assertEqual(vp2px(100));
expect(
Math.round(GridTemplateChange_Grid_014.bottom - GridTemplateChange_Grid_014.top)
).assertEqual(vp2px(100));
console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0200] END');
done();
});
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space.test.ets
浏览文件 @
f8cde247
...
...
@@ -57,19 +57,23 @@ export default function Row_Space() {
let Row_Space_012 = CommonFunc.getComponentRect('Row_Space_012');
let Row_Space_013 = CommonFunc.getComponentRect('Row_Space_013');
let Row_Space_01 = CommonFunc.getComponentRect('Row_Space_01');
expect(Row_Space_011.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_011.bottom);
expect(Row_Space_012.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_012.bottom);
expect(Row_Space_013.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_013.bottom);
expect(Row_Space_012.left - Row_Space_011.right).assertEqual(Row_Space_013.left - Row_Space_012.right);
expect(Row_Space_012.left - Row_Space_011.right).assertEqual(vp2px(10))
expect(Math.round(Row_Space_011.top - Row_Space_01.top)).
assertEqual(Math.round(Row_Space_01.bottom - Row_Space_011.bottom));
expect(Math.round(Row_Space_012.top - Row_Space_01.top)).
assertEqual(Math.round(Row_Space_01.bottom - Row_Space_012.bottom));
expect(Math.round(Row_Space_013.top - Row_Space_01.top)).
assertEqual(Math.round(Row_Space_01.bottom - Row_Space_013.bottom));
expect(Math.round(Row_Space_012.left - Row_Space_011.right)).
assertEqual(Math.round(Row_Space_013.left - Row_Space_012.right));
expect(Math.round(Row_Space_012.left - Row_Space_011.right)).assertEqual(vp2px(10))
expect(Row_Space_01.left).assertEqual(Row_Space_011.left);
expect(Row_Space_013.right).assertLess(Row_Space_01.right);
expect(
Row_Space_011.bottom - Row_Space_011.top
).assertEqual(vp2px(50));
expect(
Row_Space_012.bottom - Row_Space_012.top
).assertEqual(vp2px(100));
expect(
Row_Space_013.bottom - Row_Space_013.top
).assertEqual(vp2px(150));
expect(
Row_Space_011.right - Row_Space_011.left
).assertEqual(vp2px(100));
expect(
Row_Space_012.right - Row_Space_012.left
).assertEqual(vp2px(100));
expect(
Row_Space_013.right - Row_Space_013.left
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_011.bottom - Row_Space_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Row_Space_012.bottom - Row_Space_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_013.bottom - Row_Space_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Row_Space_011.right - Row_Space_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_012.right - Row_Space_012.left)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_013.right - Row_Space_013.left)
).assertEqual(vp2px(100));
console.info('[SUB_ACE_ROW_SPACE_TEST_0100] END');
done();
});
...
...
@@ -86,19 +90,23 @@ export default function Row_Space() {
let Row_Space_012 = CommonFunc.getComponentRect('Row_Space_012');
let Row_Space_013 = CommonFunc.getComponentRect('Row_Space_013');
let Row_Space_01 = CommonFunc.getComponentRect('Row_Space_01');
expect(Row_Space_011.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_011.bottom);
expect(Row_Space_012.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_012.bottom);
expect(Row_Space_013.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_013.bottom);
expect(Row_Space_012.left - Row_Space_011.right).assertEqual(Row_Space_013.left - Row_Space_012.right);
expect(Row_Space_012.left - Row_Space_011.right).assertEqual(vp2px(25));
expect(Math.round(Row_Space_011.top - Row_Space_01.top))
.assertEqual(Math.round(Row_Space_01.bottom - Row_Space_011.bottom));
expect(Math.round(Row_Space_012.top - Row_Space_01.top))
.assertEqual(Math.round(Row_Space_01.bottom - Row_Space_012.bottom));
expect(Math.round(Row_Space_013.top - Row_Space_01.top))
.assertEqual(Math.round(Row_Space_01.bottom - Row_Space_013.bottom));
expect(Math.round(Row_Space_012.left - Row_Space_011.right))
.assertEqual(Math.round(Row_Space_013.left - Row_Space_012.right));
expect(Math.round((Row_Space_012.left - Row_Space_011.right)*10)/10).assertEqual(Math.round(vp2px(25)*10)/10);
expect(Row_Space_01.left).assertEqual(Row_Space_011.left);
expect(Row_Space_013.right).assertEqual(Row_Space_01.right);
expect(
Row_Space_011.bottom - Row_Space_011.top
).assertEqual(vp2px(50));
expect(
Row_Space_012.bottom - Row_Space_012.top
).assertEqual(vp2px(100));
expect(
Row_Space_013.bottom - Row_Space_013.top
).assertEqual(vp2px(150));
expect(
Row_Space_011.right - Row_Space_011.left
).assertEqual(vp2px(100));
expect(
Row_Space_012.right - Row_Space_012.left
).assertEqual(vp2px(100));
expect(
Row_Space_013.right - Row_Space_013.left
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_011.bottom - Row_Space_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Row_Space_012.bottom - Row_Space_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_013.bottom - Row_Space_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Row_Space_011.right - Row_Space_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_012.right - Row_Space_012.left)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_013.right - Row_Space_013.left)
).assertEqual(vp2px(100));
console.info('[SUB_ACE_ROW_SPACE_TEST_0200] END');
done();
});
...
...
@@ -115,19 +123,23 @@ export default function Row_Space() {
let Row_Space_012 = CommonFunc.getComponentRect('Row_Space_012');
let Row_Space_013 = CommonFunc.getComponentRect('Row_Space_013');
let Row_Space_01 = CommonFunc.getComponentRect('Row_Space_01');
expect(Row_Space_011.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_011.bottom);
expect(Row_Space_012.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_012.bottom);
expect(Row_Space_013.top - Row_Space_01.top).assertEqual(Row_Space_01.bottom - Row_Space_013.bottom);
expect(Row_Space_012.left - Row_Space_011.right).assertEqual(Row_Space_013.left - Row_Space_012.right);
expect(Row_Space_012.left - Row_Space_011.right).assertEqual(vp2px(30))
expect(Math.round(Row_Space_011.top - Row_Space_01.top))
.assertEqual(Math.round(Row_Space_01.bottom - Row_Space_011.bottom));
expect(Math.round(Row_Space_012.top - Row_Space_01.top))
.assertEqual(Math.round(Row_Space_01.bottom - Row_Space_012.bottom));
expect(Math.round(Row_Space_013.top - Row_Space_01.top))
.assertEqual(Math.round(Row_Space_01.bottom - Row_Space_013.bottom));
expect(Math.round(Row_Space_012.left - Row_Space_011.right))
.assertEqual(Math.round(Row_Space_013.left - Row_Space_012.right));
expect(Math.round(Row_Space_012.left - Row_Space_011.right)).assertEqual(vp2px(30))
expect(Row_Space_01.left).assertEqual(Row_Space_011.left);
expect(Row_Space_013.right).assertLarger(Row_Space_01.right);
expect(
Row_Space_011.bottom - Row_Space_011.top
).assertEqual(vp2px(50));
expect(
Row_Space_012.bottom - Row_Space_012.top
).assertEqual(vp2px(100));
expect(
Row_Space_013.bottom - Row_Space_013.top
).assertEqual(vp2px(150));
expect(
Row_Space_011.right - Row_Space_011.left
).assertEqual(vp2px(100));
expect(
Row_Space_012.right - Row_Space_012.left
).assertEqual(vp2px(100));
expect(
Row_Space_013.right - Row_Space_013.left
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_011.bottom - Row_Space_011.top)
).assertEqual(vp2px(50));
expect(
Math.round(Row_Space_012.bottom - Row_Space_012.top)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_013.bottom - Row_Space_013.top)
).assertEqual(vp2px(150));
expect(
Math.round(Row_Space_011.right - Row_Space_011.left)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_012.right - Row_Space_012.left)
).assertEqual(vp2px(100));
expect(
Math.round(Row_Space_013.right - Row_Space_013.left)
).assertEqual(vp2px(100));
console.info('[SUB_ACE_ROW_SPACE_TEST_0300] END');
done();
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录