diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/subComponentChanged/ColumnSetLayoutWeight_SubChange.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/subComponentChanged/ColumnSetLayoutWeight_SubChange.test.ets index 1285e8798b58d49c13f6c0cafdd86bdc6b2b726b..0a608043b1cc555ead5b1feee359a358829c029e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/subComponentChanged/ColumnSetLayoutWeight_SubChange.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/subComponentChanged/ColumnSetLayoutWeight_SubChange.test.ets @@ -65,9 +65,9 @@ export default function ColumnSetLayoutWeight_SubChange() { expect(Math.round(setLayoutWeight3.top - setLayoutWeight2.bottom)).assertEqual(vp2px(30)) expect(setLayoutWeight.bottom).assertEqual(setLayoutWeight3.bottom) - expect(Math.round(setLayoutWeight1.bottom - setLayoutWeight1.top)).assertEqual(vp2px(510/3)) - expect(Math.round(setLayoutWeight2.bottom - setLayoutWeight2.top)).assertEqual(vp2px(340/3)) - expect(Math.round(setLayoutWeight3.bottom - setLayoutWeight3.top)).assertEqual(vp2px(170/3)) + expect(Math.round(setLayoutWeight1.bottom - setLayoutWeight1.top)).assertEqual(Math.round(vp2px(510/3))) + expect(Math.round(setLayoutWeight2.bottom - setLayoutWeight2.top)).assertEqual(Math.round(vp2px(340/3))) + expect(Math.round(setLayoutWeight3.bottom - setLayoutWeight3.top)).assertEqual(Math.round(vp2px(170/3))) console.info('new testColumnSetLayoutWeightWithRateThreeTwoOne END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Margin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Margin.test.ets index 208b390e174a88a623b29ffb345605ec357808cb..8e3c7ef332f077592367ecc93eb9ba5977add0d7 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Margin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Margin.test.ets @@ -101,17 +101,17 @@ export default function AlignContentFlexP_Fixed_Margin() { expect(obj.$attrs.constructor.direction).assertEqual("FlexDirection.Row"); expect(obj.$attrs.constructor.alignContent).assertEqual("FlexAlign.SpaceEvenly"); - expect(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom) - .assertEqual(AlignContentFlexSpaceEvenly_2.top - AlignContentFlexSpaceEvenly_flex001.top); + expect(Math.round(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom)) + .assertEqual(Math.round(AlignContentFlexSpaceEvenly_2.top - AlignContentFlexSpaceEvenly_flex001.top)); - expect(AlignContentFlexSpaceEvenly_4.top - AlignContentFlexSpaceEvenly_3.bottom) - .assertEqual(AlignContentFlexSpaceEvenly_2.top - AlignContentFlexSpaceEvenly_flex001.top); + expect(Math.round(AlignContentFlexSpaceEvenly_4.top - AlignContentFlexSpaceEvenly_3.bottom)) + .assertEqual(Math.round(AlignContentFlexSpaceEvenly_2.top - AlignContentFlexSpaceEvenly_flex001.top)); expect(Math.round(AlignContentFlexSpaceEvenly_1.left - AlignContentFlexSpaceEvenly_flex001.left)) .assertEqual(vp2px(10)); expect(Math.round(AlignContentFlexSpaceEvenly_1.top - AlignContentFlexSpaceEvenly_flex001.top)) - .assertEqual(vp2px(50/3)+vp2px(10)); + .assertEqual(Math.round(vp2px(50/3)+vp2px(10))); console.info('testAlignContentSpaceEvenlyFlexFixedMarginSatisfy END'); done(); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Offset.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Offset.test.ets index d8b773053f558f7e928ab2bef6882fc6af3a93b0..b3248640f513aa6a158565e3870af068d7a92908 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Offset.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Offset.test.ets @@ -102,8 +102,8 @@ export default function AlignContentFlexP_Fixed_Offset() { expect(Math.round(AlignContentFlexSpaceEvenly_2.left - AlignContentFlexSpaceEvenly_flex001.left)) .assertEqual(vp2px(150)); - expect(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom) - .assertEqual(vp2px(50/3)); + expect(Math.round(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom)) + .assertEqual(Math.round(vp2px(50/3))); expect(Math.round((AlignContentFlexSpaceEvenly_1.right - AlignContentFlexSpaceEvenly_2.left)*10)/10) .assertEqual(vp2px(15)); @@ -111,11 +111,11 @@ export default function AlignContentFlexP_Fixed_Offset() { expect(Math.round(AlignContentFlexSpaceEvenly_1.top - AlignContentFlexSpaceEvenly_2.top)) .assertEqual(vp2px(30)); - expect(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom) - .assertEqual(AlignContentFlexSpaceEvenly_2.top - AlignContentFlexSpaceEvenly_flex001.top); + expect(Math.round(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom)) + .assertEqual(Math.round(AlignContentFlexSpaceEvenly_2.top - AlignContentFlexSpaceEvenly_flex001.top)); - expect(AlignContentFlexSpaceEvenly_4.top - AlignContentFlexSpaceEvenly_3.bottom) - .assertEqual(AlignContentFlexSpaceEvenly_2.top - AlignContentFlexSpaceEvenly_flex001.top); + expect(Math.round(AlignContentFlexSpaceEvenly_4.top - AlignContentFlexSpaceEvenly_3.bottom)) + .assertEqual(Math.round(AlignContentFlexSpaceEvenly_2.top - AlignContentFlexSpaceEvenly_flex001.top)); console.info('testAlignContentSpaceEvenlyFlexPfixedOffset END'); done(); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Visibility.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Visibility.test.ets index 4577279f29d27999d54d803f6778ec5eca7a05eb..745cfacf6f709870bc2355bb2406566de99cb98e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Visibility.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_Fixed_Visibility.test.ets @@ -97,11 +97,11 @@ export default function AlignContentFlexP_Fixed_Visibility() { expect(obj.$attrs.constructor.alignContent).assertEqual("FlexAlign.SpaceEvenly"); expect(textObj.$attrs.visibility).assertEqual("Visibility.Hidden"); - expect(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom) - .assertEqual(AlignContentFlexSpaceEvenly_3.top - AlignContentFlexSpaceEvenly_flex001.top); + expect(Math.round(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom)) + .assertEqual(Math.round(AlignContentFlexSpaceEvenly_3.top - AlignContentFlexSpaceEvenly_flex001.top)); - expect(AlignContentFlexSpaceEvenly_4.top - AlignContentFlexSpaceEvenly_3.bottom) - .assertEqual(AlignContentFlexSpaceEvenly_3.top - AlignContentFlexSpaceEvenly_flex001.top); + expect(Math.round(AlignContentFlexSpaceEvenly_4.top - AlignContentFlexSpaceEvenly_3.bottom)) + .assertEqual(Math.round(AlignContentFlexSpaceEvenly_3.top - AlignContentFlexSpaceEvenly_flex001.top)); expect(Math.round(AlignContentFlexSpaceEvenly_2.left - AlignContentFlexSpaceEvenly_flex001.left)) .assertEqual(vp2px(150)); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_fixed.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_fixed.test.ets index 6eb6e9f4e94ebe48f99d92a0cf339ac54e86a4fd..7d88a72ea5baf1fae98174cee8a11fcecdbcf406 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_fixed.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceEvenly/AlignContentFlexP_fixed.test.ets @@ -102,11 +102,11 @@ export default function AlignContentFlexP_fixed() { expect(obj.$attrs.constructor.direction).assertEqual("FlexDirection.Row"); expect(obj.$attrs.constructor.alignContent).assertEqual("FlexAlign.SpaceEvenly"); - expect(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom) - .assertEqual(AlignContentFlexSpaceEvenly_1.top - AlignContentFlexSpaceEvenly_flex001.top); + expect(Math.round(AlignContentFlexSpaceEvenly_flex001.bottom - AlignContentFlexSpaceEvenly_4.bottom)) + .assertEqual(Math.round(AlignContentFlexSpaceEvenly_1.top - AlignContentFlexSpaceEvenly_flex001.top)); - expect(AlignContentFlexSpaceEvenly_4.top - AlignContentFlexSpaceEvenly_3.bottom) - .assertEqual(AlignContentFlexSpaceEvenly_1.top - AlignContentFlexSpaceEvenly_flex001.top); + expect(Math.round(AlignContentFlexSpaceEvenly_4.top - AlignContentFlexSpaceEvenly_3.bottom)) + .assertEqual(Math.round(AlignContentFlexSpaceEvenly_1.top - AlignContentFlexSpaceEvenly_flex001.top)); console.info('testAlignContentSpaceEvenlyFlexFixedSatisfy END'); done(); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Center/FlexTextMarginJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Center/FlexTextMarginJsunit.test.ets index cb8801c247d922e4e24daec4ff2deb74b2853865..24bc369c86efef124298fc5aca424e8574d1dfd5 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Center/FlexTextMarginJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Center/FlexTextMarginJsunit.test.ets @@ -64,9 +64,9 @@ export default function flexTextMargin_CenterJsunit() { expect(textMargin03.left).assertEqual(textMargin02.right) expect(Math.round(flexTextMargin01.right - textMargin03.right)).assertEqual(vp2px(30)) - expect(textMargin01.top - flexTextMargin01.top).assertEqual(flexTextMargin01.bottom - textMargin01.bottom) - expect(textMargin02.top - flexTextMargin01.top).assertEqual(flexTextMargin01.bottom - textMargin02.bottom) - expect(textMargin03.top - flexTextMargin01.top).assertEqual(flexTextMargin01.bottom - textMargin03.bottom) + expect(Math.round(textMargin01.top - flexTextMargin01.top)).assertEqual(Math.round(flexTextMargin01.bottom - textMargin01.bottom)) + expect(Math.round(textMargin02.top - flexTextMargin01.top)).assertEqual(Math.round(flexTextMargin01.bottom - textMargin02.bottom)) + expect(Math.round(textMargin03.top - flexTextMargin01.top)).assertEqual(Math.round(flexTextMargin01.bottom - textMargin03.bottom)) 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)) @@ -98,15 +98,15 @@ export default function flexTextMargin_CenterJsunit() { expect(Math.round(textMargin02.left - textMargin01.right)).assertEqual(vp2px(30)) expect(textMargin03.left).assertEqual(textMargin02.right) expect(textMargin03.right).assertEqual(flexTextMargin01.right) - expect(textMargin01.top - flexTextMargin01.top).assertEqual(flexTextMargin01.bottom - textMargin01.bottom) - expect(textMargin02.top - flexTextMargin01.top).assertEqual(flexTextMargin01.bottom - textMargin02.bottom) - expect(textMargin03.top - flexTextMargin01.top).assertEqual(flexTextMargin01.bottom - textMargin03.bottom) + expect(Math.round(textMargin01.top - flexTextMargin01.top)).assertEqual(Math.round(flexTextMargin01.bottom - textMargin01.bottom)) + expect(Math.round(textMargin02.top - flexTextMargin01.top)).assertEqual(Math.round(flexTextMargin01.bottom - textMargin02.bottom)) + expect(Math.round(textMargin03.top - flexTextMargin01.top)).assertEqual(Math.round(flexTextMargin01.bottom - textMargin03.bottom)) 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(440/3)) - expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(vp2px(440/3)) + expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(Math.round(vp2px(440/3))) + expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(Math.round(vp2px(440/3))) + expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(Math.round(vp2px(440/3))) expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Center') console.info('new testFlexItemAlignCenterSubSetMarginExceed END'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_End/FlexTextMarginJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_End/FlexTextMarginJsunit.test.ets index 2de4ffe3b3674223d21a55c3c4e347b222f554d6..1dd97bedc87d7162bf1cf8fb5db0773998d2669a 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_End/FlexTextMarginJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_End/FlexTextMarginJsunit.test.ets @@ -106,9 +106,9 @@ export default function flexTextMargin_EndJsunit() { 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(440/3)) - expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(vp2px(440/3)) + expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(Math.round(vp2px(440/3))) + expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(Math.round(vp2px(440/3))) + expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(Math.round(vp2px(440/3))) expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.End') console.info('new testFlexItemAlignEndSubSetMarginExceed END'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexExceedJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexExceedJsunit.test.ets index 47d54fbb9489431a53d9b916e5537ada28aac5d5..315e6383fdb52b7379962f26f5f97e3895280761 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexExceedJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexExceedJsunit.test.ets @@ -111,9 +111,9 @@ export default function flexExceed_StartJsunit() { 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(440/3)) - expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(vp2px(440/3)) + 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))) expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Start') console.info('new testFlexItemAlignStartSetMarPadExceed END'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexPaddingJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexPaddingJsunit.test.ets index b953a47b45ae72d4c7758a486b5f3785d63520d3..829b7f74e947836b8ae967abb1e6cabf76449208 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexPaddingJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexPaddingJsunit.test.ets @@ -110,9 +110,9 @@ export default function flexPadding_StartJsunit() { 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(vp2px(440/3)) - expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(vp2px(440/3)) + 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))) expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Start') console.info('new testFlexItemAlignStartParentSetPaddingExceed END'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexTextMarginJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexTextMarginJsunit.test.ets index ec766accde12a250bb5bc041b46154ff631bbcab..442ccafc63d2ea38adf32ef95629d3a61e966d69 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexTextMarginJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Start/FlexTextMarginJsunit.test.ets @@ -107,9 +107,9 @@ export default function flexTextMargin_StartJsunit() { 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(440/3)) - expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(vp2px(440/3)) + expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(Math.round(vp2px(440/3))) + expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(Math.round(vp2px(440/3))) + expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(Math.round(vp2px(440/3))) expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Start') console.info('new testFlexItemAlignStartSubSetMarginExceed END'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexExceedJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexExceedJsunit.test.ets index 254f18133c4ac6c891fa31deeeeb0be80f221eb3..2d6a4107b11d08f801c6e197b99051c998bc947e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexExceedJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexExceedJsunit.test.ets @@ -111,9 +111,9 @@ export default function flexExceed_StretchJsunit() { expect(Math.round(textExceed01.bottom - textExceed01.top)).assertEqual(vp2px(140)) expect(Math.round(textExceed02.bottom - textExceed02.top)).assertEqual(vp2px(140)) expect(Math.round(textExceed03.bottom - textExceed03.top)).assertEqual(vp2px(140)) - expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(vp2px(440/3)) + 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))) expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Stretch') console.info('new testFlexItemAlignStretchSetMarPadExceed END'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexPaddingJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexPaddingJsunit.test.ets index 89cf74522178298e2e0d13e8377d813ef4a2a9d3..74d835039bce9a2477ae9192aa5ceca3c57a4d5d 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexPaddingJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexPaddingJsunit.test.ets @@ -112,9 +112,9 @@ export default function flexPadding_StretchJsunit() { expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(140)) expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(140)) expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(140)) - expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(vp2px(440/3)) + 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))) expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Stretch') console.info('new testFlexItemAlignStretchParentSetPaddingExceed END'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexTextMarginJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexTextMarginJsunit.test.ets index 38078c56373ecb46c7aaa56498763b4671281e00..d673e63cb459f8f06ef06e50378fda5bdf7aa3f6 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexTextMarginJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Stretch/FlexTextMarginJsunit.test.ets @@ -110,9 +110,9 @@ export default function flexTextMargin_StretchJsunit() { expect(Math.round(textMargin01.bottom - textMargin01.top)).assertEqual(vp2px(140)) expect(Math.round(textMargin02.bottom - textMargin02.top)).assertEqual(vp2px(200)) expect(Math.round(textMargin03.bottom - textMargin03.top)).assertEqual(vp2px(200)) - expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(vp2px(440/3)) - expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(vp2px(440/3)) + expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(Math.round(vp2px(440/3))) + expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(Math.round(vp2px(440/3))) + expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(Math.round(vp2px(440/3))) expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Stretch') console.info('new testFlexItemAlignStretchSubSetMarginExceed END'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/parentComponentChanged/Row_FlexAlign.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/parentComponentChanged/Row_FlexAlign.test.ets index 4c2a2113274a59a0cce069f2e84e2c87a6796677..af65655db9b22ca994b9bf7838999cd15b7b0aaf 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/parentComponentChanged/Row_FlexAlign.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/parentComponentChanged/Row_FlexAlign.test.ets @@ -83,9 +83,9 @@ export default function Row_FlexAlign() { expect(obj.$attrs.justifyContent).assertEqual("FlexAlign.Start"); expect(Text1.left).assertEqual(Row.left); - expect(Text1.top - Row.top).assertEqual(Row.bottom - Text1.bottom); - expect(Text2.top - Row.top).assertEqual(Row.bottom - Text2.bottom); - expect(Text3.top - Row.top).assertEqual(Row.bottom - Text3.bottom); + expect(Math.round(Text1.top - Row.top)).assertEqual(Math.round(Row.bottom - Text1.bottom)); + expect(Math.round(Text2.top - Row.top)).assertEqual(Math.round(Row.bottom - Text2.bottom)); + expect(Math.round(Text3.top - Row.top)).assertEqual(Math.round(Row.bottom - Text3.bottom)); expect(Math.round(Text2.left - Text1.right)).assertEqual(vp2px(10)); expect(Math.round(Text3.left - Text2.right)).assertEqual(vp2px(10)); @@ -127,10 +127,10 @@ export default function Row_FlexAlign() { expect(obj.$attrs.justifyContent).assertEqual("FlexAlign.Center"); - expect(Text1.left - Row.left).assertEqual(Row.right - Text3.right); - expect(Text1.top - Row.top).assertEqual(Row.bottom - Text1.bottom); - expect(Text2.top - Row.top).assertEqual(Row.bottom - Text2.bottom); - expect(Text3.top - Row.top).assertEqual(Row.bottom - Text3.bottom); + expect(Math.round(Text1.left - Row.left)).assertEqual(Math.round(Row.right - Text3.right)); + expect(Math.round(Text1.top - Row.top)).assertEqual(Math.round(Row.bottom - Text1.bottom)); + expect(Math.round(Text2.top - Row.top)).assertEqual(Math.round(Row.bottom - Text2.bottom)); + expect(Math.round(Text3.top - Row.top)).assertEqual(Math.round(Row.bottom - Text3.bottom)); expect(Math.round(Text2.left - Text1.right)).assertEqual(vp2px(10)); expect(Math.round(Text3.left - Text2.right)).assertEqual(vp2px(10)); @@ -171,9 +171,9 @@ export default function Row_FlexAlign() { expect(obj.$attrs.justifyContent).assertEqual("FlexAlign.End"); expect(Text3.right).assertEqual(Row.right); - expect(Text1.top - Row.top).assertEqual(Row.bottom - Text1.bottom); - expect(Text2.top - Row.top).assertEqual(Row.bottom - Text2.bottom); - expect(Text3.top - Row.top).assertEqual(Row.bottom - Text3.bottom); + expect(Math.round(Text1.top - Row.top)).assertEqual(Math.round(Row.bottom - Text1.bottom)); + expect(Math.round(Text2.top - Row.top)).assertEqual(Math.round(Row.bottom - Text2.bottom)); + expect(Math.round(Text3.top - Row.top)).assertEqual(Math.round(Row.bottom - Text3.bottom)); expect(Math.round(Text2.left - Text1.right)).assertEqual(vp2px(10)); expect(Math.round(Text3.left - Text2.right)).assertEqual(vp2px(10)); expect(Text1.left).assertLarger(Row.left); @@ -218,9 +218,9 @@ export default function Row_FlexAlign() { expect(Text3.right).assertEqual(Row.right); expect(Math.round((Text2.left - Text1.right)*10)/10).assertEqual(vp2px(25)); expect(Math.round((Text3.left - Text2.right)*10)/10).assertEqual(vp2px(25)); - expect(Text1.top - Row.top).assertEqual(Row.bottom - Text1.bottom); - expect(Text2.top - Row.top).assertEqual(Row.bottom - Text2.bottom); - expect(Text3.top - Row.top).assertEqual(Row.bottom - Text3.bottom); + expect(Math.round(Text1.top - Row.top)).assertEqual(Math.round(Row.bottom - Text1.bottom)); + expect(Math.round(Text2.top - Row.top)).assertEqual(Math.round(Row.bottom - Text2.bottom)); + expect(Math.round(Text3.top - Row.top)).assertEqual(Math.round(Row.bottom - Text3.bottom)); console.info('testRowJustifyContentFlexAlignSpaceBetween END'); done(); @@ -259,14 +259,14 @@ export default function Row_FlexAlign() { expect(obj.$attrs.justifyContent).assertEqual("FlexAlign.SpaceAround"); - expect(Text1.left - Row.left).assertEqual(Row.right - Text3.right); + expect(Math.round(Text1.left - Row.left)).assertEqual(Math.round(Row.right - Text3.right)); expect(Math.round((Text1.left - Row.left)*10)/10).assertEqual(Math.round(vp2px(50/6)*10)/10); - expect(Math.round(Text2.left - Text1.right)).assertEqual(vp2px(50/3)); - expect(Math.round(Text3.left - Text2.right)).assertEqual(vp2px(50/3)); + expect(Math.round(Text2.left - Text1.right)).assertEqual(Math.round(vp2px(50/3))); + expect(Math.round(Text3.left - Text2.right)).assertEqual(Math.round(vp2px(50/3))); - expect(Text1.top - Row.top).assertEqual(Row.bottom - Text1.bottom); - expect(Text2.top - Row.top).assertEqual(Row.bottom - Text2.bottom); - expect(Text3.top - Row.top).assertEqual(Row.bottom - Text3.bottom); + expect(Math.round(Text1.top - Row.top)).assertEqual(Math.round(Row.bottom - Text1.bottom)); + expect(Math.round(Text2.top - Row.top)).assertEqual(Math.round(Row.bottom - Text2.bottom)); + expect(Math.round(Text3.top - Row.top)).assertEqual(Math.round(Row.bottom - Text3.bottom)); console.info('testRowJustifyContentFlexAlignSpaceAround END'); done(); @@ -309,9 +309,9 @@ export default function Row_FlexAlign() { expect(Math.round((Text2.left - Text1.right)*100)/100).assertEqual(Math.round(vp2px(50/4)*100)/100); expect(Math.round((Text3.left - Text2.right)*100)/100).assertEqual(Math.round(vp2px(50/4)*100)/100); - expect(Text1.top - Row.top).assertEqual(Row.bottom - Text1.bottom); - expect(Text2.top - Row.top).assertEqual(Row.bottom - Text2.bottom); - expect(Text3.top - Row.top).assertEqual(Row.bottom - Text3.bottom); + expect(Math.round(Text1.top - Row.top)).assertEqual(Math.round(Row.bottom - Text1.bottom)); + expect(Math.round(Text2.top - Row.top)).assertEqual(Math.round(Row.bottom - Text2.bottom)); + expect(Math.round(Text3.top - Row.top)).assertEqual(Math.round(Row.bottom - Text3.bottom)); console.info('testRowJustifyContentFlexAlignSpaceEvenly END'); done();