本文整理汇总了C#中TestCSSNode类的典型用法代码示例。如果您正苦于以下问题:C# TestCSSNode类的具体用法?C# TestCSSNode怎么用?C# TestCSSNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TestCSSNode类属于命名空间,在下文中一共展示了TestCSSNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestCase154
public void TestCase154()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.direction = CSSDirection.RTL;
node_0.style.flexDirection = CSSFlexDirection.Row;
node_0.style.dimensions[DIMENSION_WIDTH] = 300;
node_0.style.dimensions[DIMENSION_HEIGHT] = 200;
addChildren(node_0, 3);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.flex = 1;
node_1.style.minWidth = 120;
node_1 = node_0.getChildAt(1);
node_1.style.flex = 1;
node_1.style.minWidth = 120;
node_1 = node_0.getChildAt(2);
node_1.style.flex = 1;
node_1.style.minWidth = 120;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 300;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 200;
addChildren(node_0, 3);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 180;
node_1.layout.dimensions[DIMENSION_WIDTH] = 120;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 200;
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 60;
node_1.layout.dimensions[DIMENSION_WIDTH] = 120;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 200;
node_1 = node_0.getChildAt(2);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = -60;
node_1.layout.dimensions[DIMENSION_WIDTH] = 120;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 200;
}
}
test("should ignore flex size if fully min bound in rtl", root_node, root_layout);
}
示例2: TestCase204
public void TestCase204()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.flexDirection = CSSFlexDirection.Row;
node_0.style.dimensions[DIMENSION_WIDTH] = 100;
node_0.style.dimensions[DIMENSION_HEIGHT] = 100;
addChildren(node_0, 3);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.overflow = CSSOverflow.Hidden;
node_1.style.flex = -1;
node_1.style.dimensions[DIMENSION_WIDTH] = 30;
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
node_1 = node_0.getChildAt(1);
node_1.style.dimensions[DIMENSION_WIDTH] = 40;
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
node_1 = node_0.getChildAt(2);
node_1.style.overflow = CSSOverflow.Hidden;
node_1.style.flex = -1;
node_1.style.dimensions[DIMENSION_WIDTH] = 50;
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 100;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 100;
addChildren(node_0, 3);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 22.5f;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 100;
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 22.5f;
node_1.layout.dimensions[DIMENSION_WIDTH] = 40;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 100;
node_1 = node_0.getChildAt(2);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 62.5f;
node_1.layout.dimensions[DIMENSION_WIDTH] = 37.5f;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 100;
}
}
test("should shrink hidden row nodes proportional to their main size when there is not any space left over", root_node, root_layout);
}
示例3: TestCase15
public void TestCase15()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.dimensions[DIMENSION_WIDTH] = 1000;
node_0.style.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.flex = 1;
node_1.style.dimensions[DIMENSION_WIDTH] = 1000;
addChildren(node_1, 1);
{
TestCSSNode node_2;
node_2 = node_1.getChildAt(0);
node_2.style.flex = 1;
node_2.style.dimensions[DIMENSION_WIDTH] = 1000;
addChildren(node_2, 1);
{
TestCSSNode node_3;
node_3 = node_2.getChildAt(0);
node_3.style.flex = 1;
node_3.style.dimensions[DIMENSION_WIDTH] = 1000;
}
}
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_1, 1);
{
TestCSSNode node_2;
node_2 = node_1.getChildAt(0);
node_2.layout.position[POSITION_TOP] = 0;
node_2.layout.position[POSITION_LEFT] = 0;
node_2.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_2.layout.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_2, 1);
{
TestCSSNode node_3;
node_3 = node_2.getChildAt(0);
node_3.layout.position[POSITION_TOP] = 0;
node_3.layout.position[POSITION_LEFT] = 0;
node_3.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_3.layout.dimensions[DIMENSION_HEIGHT] = 1000;
}
}
}
}
test("should layout node with flex recursively", root_node, root_layout);
}
示例4: TestCase192
public void TestCase192()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.dimensions[DIMENSION_WIDTH] = 100;
node_0.style.dimensions[DIMENSION_HEIGHT] = 100;
addChildren(node_0, 3);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.dimensions[DIMENSION_WIDTH] = 100;
node_1.style.dimensions[DIMENSION_HEIGHT] = 25;
node_1 = node_0.getChildAt(1);
node_1.style.flex = -1;
node_1.style.dimensions[DIMENSION_WIDTH] = 100;
addChildren(node_1, 1);
{
TestCSSNode node_2;
node_2 = node_1.getChildAt(0);
node_2.style.dimensions[DIMENSION_WIDTH] = 100;
node_2.style.dimensions[DIMENSION_HEIGHT] = 30;
}
node_1 = node_0.getChildAt(2);
node_1.style.dimensions[DIMENSION_WIDTH] = 100;
node_1.style.dimensions[DIMENSION_HEIGHT] = 15;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 100;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 100;
addChildren(node_0, 3);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 100;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 25;
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 25;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 100;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 30;
addChildren(node_1, 1);
{
TestCSSNode node_2;
node_2 = node_1.getChildAt(0);
node_2.layout.position[POSITION_TOP] = 0;
node_2.layout.position[POSITION_LEFT] = 0;
node_2.layout.dimensions[DIMENSION_WIDTH] = 100;
node_2.layout.dimensions[DIMENSION_HEIGHT] = 30;
}
node_1 = node_0.getChildAt(2);
node_1.layout.position[POSITION_TOP] = 55;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 100;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 15;
}
}
test("should not shrink column node with siblings when there is space left over", root_node, root_layout);
}
示例5: TestCase14
public void TestCase14()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.flexDirection = CSSFlexDirection.ColumnReverse;
node_0.style.dimensions[DIMENSION_WIDTH] = 1000;
node_0.style.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.dimensions[DIMENSION_WIDTH] = 100;
node_1.style.dimensions[DIMENSION_HEIGHT] = 200;
node_1 = node_0.getChildAt(1);
node_1.style.flex = 1;
node_1.style.dimensions[DIMENSION_WIDTH] = 100;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 800;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 100;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 200;
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 100;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 800;
}
}
test("should layout node with just flex in reverse", root_node, root_layout);
}
示例6: TestCase186
public void TestCase186()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.flexDirection = CSSFlexDirection.Row;
node_0.style.alignItems = CSSAlign.Stretch;
node_0.style.dimensions[DIMENSION_WIDTH] = 150;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.flexDirection = CSSFlexDirection.Row;
node_1.setMargin(Spacing.LEFT, 10);
node_1.setMargin(Spacing.TOP, 10);
addChildren(node_1, 1);
{
TestCSSNode node_2;
node_2 = node_1.getChildAt(0);
node_2.style.flexDirection = CSSFlexDirection.Row;
addChildren(node_2, 1);
{
TestCSSNode node_3;
node_3 = node_2.getChildAt(0);
node_3.style.alignSelf = CSSAlign.Center;
}
}
node_1 = node_0.getChildAt(1);
node_1.style.dimensions[DIMENSION_HEIGHT] = 150;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 150;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 150;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 10;
node_1.layout.position[POSITION_LEFT] = 10;
node_1.layout.dimensions[DIMENSION_WIDTH] = 0;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 140;
addChildren(node_1, 1);
{
TestCSSNode node_2;
node_2 = node_1.getChildAt(0);
node_2.layout.position[POSITION_TOP] = 0;
node_2.layout.position[POSITION_LEFT] = 0;
node_2.layout.dimensions[DIMENSION_WIDTH] = 0;
node_2.layout.dimensions[DIMENSION_HEIGHT] = 140;
addChildren(node_2, 1);
{
TestCSSNode node_3;
node_3 = node_2.getChildAt(0);
node_3.layout.position[POSITION_TOP] = 70;
node_3.layout.position[POSITION_LEFT] = 0;
node_3.layout.dimensions[DIMENSION_WIDTH] = 0;
node_3.layout.dimensions[DIMENSION_HEIGHT] = 0;
}
}
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 10;
node_1.layout.dimensions[DIMENSION_WIDTH] = 0;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 150;
}
}
test("should layout content of an item which is stretched late", root_node, root_layout);
}
示例7: TestCase188
public void TestCase188()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.flexDirection = CSSFlexDirection.Row;
addChildren(node_0, 3);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.alignSelf = CSSAlign.FlexStart;
node_1.setMargin(Spacing.LEFT, 10);
node_1.setMargin(Spacing.TOP, 10);
node_1 = node_0.getChildAt(1);
node_1.style.alignSelf = CSSAlign.Stretch;
node_1.style.dimensions[DIMENSION_WIDTH] = 1;
node_1 = node_0.getChildAt(2);
node_1.style.dimensions[DIMENSION_HEIGHT] = 150;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 11;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 150;
addChildren(node_0, 3);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 10;
node_1.layout.position[POSITION_LEFT] = 10;
node_1.layout.dimensions[DIMENSION_WIDTH] = 0;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 0;
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 10;
node_1.layout.dimensions[DIMENSION_WIDTH] = 1;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 150;
node_1 = node_0.getChildAt(2);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 11;
node_1.layout.dimensions[DIMENSION_WIDTH] = 0;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 150;
}
}
test("should layout child whose cross axis is null and whose alignSelf is stretch", root_node, root_layout);
}
示例8: TestCase167
public void TestCase167()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.dimensions[DIMENSION_WIDTH] = 1000;
node_0.style.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.positionType = CSSPositionType.Absolute;
node_1.style.minWidth = 900;
node_1.style.minHeight = 1000;
node_1.style.position[POSITION_LEFT] = 100;
node_1.style.position[POSITION_TOP] = 100;
node_1.style.position[POSITION_RIGHT] = 100;
node_1.style.position[POSITION_BOTTOM] = 100;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 100;
node_1.layout.position[POSITION_LEFT] = 100;
node_1.layout.dimensions[DIMENSION_WIDTH] = 900;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 1000;
}
}
test("should layout node with position absolute, top and left and min bounds", root_node, root_layout);
}
示例9: TestCase168
public void TestCase168()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.flexDirection = CSSFlexDirection.Row;
node_0.style.justifyContent = CSSJustify.Center;
node_0.style.dimensions[DIMENSION_WIDTH] = 1000;
node_0.style.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.flex = 1;
node_1.style.dimensions[DIMENSION_HEIGHT] = 1000;
node_1.style.maxWidth = 600;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 200;
node_1.layout.dimensions[DIMENSION_WIDTH] = 600;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 1000;
}
}
test("should center flexible item with max size", root_node, root_layout);
}
示例10: TestCase165
public void TestCase165()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.direction = CSSDirection.RTL;
node_0.style.flexDirection = CSSFlexDirection.Row;
node_0.style.dimensions[DIMENSION_WIDTH] = 1000;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
node_1.style.minWidth = 100;
node_1.style.minHeight = 110;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 110;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 900;
node_1.layout.dimensions[DIMENSION_WIDTH] = 100;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 110;
}
}
test("should keep cross axis size within min bounds in rtl", root_node, root_layout);
}
示例11: TestCase10
public void TestCase10()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.direction = CSSDirection.RTL;
node_0.style.flexDirection = CSSFlexDirection.Row;
node_0.style.dimensions[DIMENSION_WIDTH] = 1000;
node_0.style.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.dimensions[DIMENSION_WIDTH] = 100;
node_1.style.dimensions[DIMENSION_HEIGHT] = 200;
node_1 = node_0.getChildAt(1);
node_1.style.dimensions[DIMENSION_WIDTH] = 300;
node_1.style.dimensions[DIMENSION_HEIGHT] = 150;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 1000;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 900;
node_1.layout.dimensions[DIMENSION_WIDTH] = 100;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 200;
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 600;
node_1.layout.dimensions[DIMENSION_WIDTH] = 300;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 150;
}
}
test("should layout node with row flex direction in rtl", root_node, root_layout);
}
示例12: TestCase163
public void TestCase163()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.alignItems = CSSAlign.Stretch;
node_0.style.dimensions[DIMENSION_WIDTH] = 1000;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.dimensions[DIMENSION_HEIGHT] = 100;
node_1.style.minWidth = 1100;
node_1.style.minHeight = 110;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 1000;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 110;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 1100;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 110;
}
}
test("should keep stretched size within min bounds", root_node, root_layout);
}
示例13: TestCase160
public void TestCase160()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.minWidth = 300;
node_0.style.minHeight = 700;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.dimensions[DIMENSION_WIDTH] = 200;
node_1.style.dimensions[DIMENSION_HEIGHT] = 300;
node_1 = node_0.getChildAt(1);
node_1.style.dimensions[DIMENSION_WIDTH] = 200;
node_1.style.dimensions[DIMENSION_HEIGHT] = 300;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 300;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 700;
addChildren(node_0, 2);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 200;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 300;
node_1 = node_0.getChildAt(1);
node_1.layout.position[POSITION_TOP] = 300;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 200;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 300;
}
}
test("should set parents size based on min bounded children", root_node, root_layout);
}
示例14: TestCase157
public void TestCase157()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.dimensions[DIMENSION_WIDTH] = 300;
node_0.style.dimensions[DIMENSION_HEIGHT] = 200;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.flex = 1;
node_1.style.minWidth = 310;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 300;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 200;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 310;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 200;
}
}
test("should pre-fill child size within min bounds", root_node, root_layout);
}
示例15: TestCase184
public void TestCase184()
{
TestCSSNode root_node = new TestCSSNode();
{
TestCSSNode node_0 = root_node;
node_0.style.dimensions[DIMENSION_WIDTH] = 200;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.style.dimensions[DIMENSION_WIDTH] = 0;
}
}
TestCSSNode root_layout = new TestCSSNode();
{
TestCSSNode node_0 = root_layout;
node_0.layout.position[POSITION_TOP] = 0;
node_0.layout.position[POSITION_LEFT] = 0;
node_0.layout.dimensions[DIMENSION_WIDTH] = 200;
node_0.layout.dimensions[DIMENSION_HEIGHT] = 0;
addChildren(node_0, 1);
{
TestCSSNode node_1;
node_1 = node_0.getChildAt(0);
node_1.layout.position[POSITION_TOP] = 0;
node_1.layout.position[POSITION_LEFT] = 0;
node_1.layout.dimensions[DIMENSION_WIDTH] = 0;
node_1.layout.dimensions[DIMENSION_HEIGHT] = 0;
}
}
test("should layout node with a 0 width", root_node, root_layout);
}