mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
Fix android unit-test
This commit is contained in:
@ -575,8 +575,8 @@ export function test_percent_margin_support() {
|
|||||||
const parentWidth = parentBounds.right - parentBounds.left;
|
const parentWidth = parentBounds.right - parentBounds.left;
|
||||||
const parentHeight = parentBounds.bottom - parentBounds.top;
|
const parentHeight = parentBounds.bottom - parentBounds.top;
|
||||||
|
|
||||||
const marginLeft = Math.round(parentWidth * 0.1);
|
const marginLeft = isIOS ? Math.round(parentWidth * 0.1) : Math.floor(parentWidth * 0.1);
|
||||||
const marginTop = Math.round(parentHeight * 0.1);
|
const marginTop = isIOS ? Math.round(parentHeight * 0.1) : Math.floor(parentHeight * 0.1);
|
||||||
|
|
||||||
let bounds = stackLayout._getCurrentLayoutBounds();
|
let bounds = stackLayout._getCurrentLayoutBounds();
|
||||||
TKUnit.assertEqual(Math.round(bounds.left), marginLeft, "Stack LEFT position incorrect");
|
TKUnit.assertEqual(Math.round(bounds.left), marginLeft, "Stack LEFT position incorrect");
|
||||||
|
Reference in New Issue
Block a user