Fix C# MeasureFunc test

Summary: Closes https://github.com/facebook/yoga/pull/533

Reviewed By: emilsjolander

Differential Revision: D4962771

Pulled By: splhack

fbshipit-source-id: 96919da73f0f35c027097259fa189b5658fb11b7
This commit is contained in:
Kazuki Sakamoto
2017-04-27 09:15:08 -07:00
committed by Facebook Github Bot
parent 3db38f2a80
commit 7c324f058c

View File

@@ -164,6 +164,14 @@ namespace Facebook.Yoga
return MeasureOutput.Make(123.4f, 81.7f);
});
node.CalculateLayout();
Assert.AreEqual(123.0f, node.LayoutWidth);
Assert.AreEqual(82.0f, node.LayoutHeight);
node = new YogaNode(new YogaConfig{PointScaleFactor = 0});
node.SetMeasureFunction((_, width, widthMode, height, heightMode) => {
return MeasureOutput.Make(123.4f, 81.7f);
});
node.CalculateLayout();
Assert.AreEqual(123.4f, node.LayoutWidth);
Assert.AreEqual(81.7f, node.LayoutHeight);
}