提交 e1033205 编写于 作者: Z zhangshuqi 提交者: hekun
上级 db80ebe7
......@@ -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();
});
......
......@@ -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();
......
......@@ -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();
......
......@@ -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));
......
......@@ -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();
......
......@@ -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');
......
......@@ -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');
......
......@@ -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');
......
......@@ -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');
......
......@@ -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');
......
......@@ -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');
......
......@@ -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');
......
......@@ -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');
......
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册