|
4 | 4 | * This source code is licensed under the MIT license found in the |
5 | 5 | * LICENSE file in the root directory of this source tree. |
6 | 6 | * |
7 | | - * @generated SignedSource<<e8d11c0e97041bb2f1487f0d87363fdc>> |
| 7 | + * @generated SignedSource<<84597dd8b2c4f3aac1f21abe68f25308>> |
8 | 8 | * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignItemsTest.html |
9 | 9 | */ |
10 | 10 |
|
@@ -2293,6 +2293,86 @@ public void test_align_stretch_with_row_reverse() { |
2293 | 2293 | assertEquals(50f, root_child1.getLayoutHeight(), 0.0f); |
2294 | 2294 | } |
2295 | 2295 |
|
| 2296 | + @Test |
| 2297 | + public void test_align_items_non_stretch_s526008() { |
| 2298 | + YogaConfig config = YogaConfigFactory.create(); |
| 2299 | + |
| 2300 | + final YogaNode root = createNode(config); |
| 2301 | + root.setPositionType(YogaPositionType.ABSOLUTE); |
| 2302 | + root.setWidth(400f); |
| 2303 | + root.setHeight(400f); |
| 2304 | + |
| 2305 | + final YogaNode root_child0 = createNode(config); |
| 2306 | + root_child0.setFlexDirection(YogaFlexDirection.ROW); |
| 2307 | + root.addChildAt(root_child0, 0); |
| 2308 | + |
| 2309 | + final YogaNode root_child0_child0 = createNode(config); |
| 2310 | + root_child0_child0.setAlignItems(YogaAlign.FLEX_START); |
| 2311 | + root_child0.addChildAt(root_child0_child0, 0); |
| 2312 | + |
| 2313 | + final YogaNode root_child0_child0_child0 = createNode(config); |
| 2314 | + root_child0_child0.addChildAt(root_child0_child0_child0, 0); |
| 2315 | + |
| 2316 | + final YogaNode root_child0_child0_child0_child0 = createNode(config); |
| 2317 | + root_child0_child0_child0_child0.setHeight(10f); |
| 2318 | + root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); |
| 2319 | + root.setDirection(YogaDirection.LTR); |
| 2320 | + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); |
| 2321 | + |
| 2322 | + assertEquals(0f, root.getLayoutX(), 0.0f); |
| 2323 | + assertEquals(0f, root.getLayoutY(), 0.0f); |
| 2324 | + assertEquals(400f, root.getLayoutWidth(), 0.0f); |
| 2325 | + assertEquals(400f, root.getLayoutHeight(), 0.0f); |
| 2326 | + |
| 2327 | + assertEquals(0f, root_child0.getLayoutX(), 0.0f); |
| 2328 | + assertEquals(0f, root_child0.getLayoutY(), 0.0f); |
| 2329 | + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); |
| 2330 | + assertEquals(10f, root_child0.getLayoutHeight(), 0.0f); |
| 2331 | + |
| 2332 | + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); |
| 2333 | + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); |
| 2334 | + assertEquals(0f, root_child0_child0.getLayoutWidth(), 0.0f); |
| 2335 | + assertEquals(10f, root_child0_child0.getLayoutHeight(), 0.0f); |
| 2336 | + |
| 2337 | + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); |
| 2338 | + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); |
| 2339 | + assertEquals(0f, root_child0_child0_child0.getLayoutWidth(), 0.0f); |
| 2340 | + assertEquals(10f, root_child0_child0_child0.getLayoutHeight(), 0.0f); |
| 2341 | + |
| 2342 | + assertEquals(0f, root_child0_child0_child0_child0.getLayoutX(), 0.0f); |
| 2343 | + assertEquals(0f, root_child0_child0_child0_child0.getLayoutY(), 0.0f); |
| 2344 | + assertEquals(0f, root_child0_child0_child0_child0.getLayoutWidth(), 0.0f); |
| 2345 | + assertEquals(10f, root_child0_child0_child0_child0.getLayoutHeight(), 0.0f); |
| 2346 | + |
| 2347 | + root.setDirection(YogaDirection.RTL); |
| 2348 | + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); |
| 2349 | + |
| 2350 | + assertEquals(0f, root.getLayoutX(), 0.0f); |
| 2351 | + assertEquals(0f, root.getLayoutY(), 0.0f); |
| 2352 | + assertEquals(400f, root.getLayoutWidth(), 0.0f); |
| 2353 | + assertEquals(400f, root.getLayoutHeight(), 0.0f); |
| 2354 | + |
| 2355 | + assertEquals(0f, root_child0.getLayoutX(), 0.0f); |
| 2356 | + assertEquals(0f, root_child0.getLayoutY(), 0.0f); |
| 2357 | + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); |
| 2358 | + assertEquals(10f, root_child0.getLayoutHeight(), 0.0f); |
| 2359 | + |
| 2360 | + assertEquals(400f, root_child0_child0.getLayoutX(), 0.0f); |
| 2361 | + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); |
| 2362 | + assertEquals(0f, root_child0_child0.getLayoutWidth(), 0.0f); |
| 2363 | + assertEquals(10f, root_child0_child0.getLayoutHeight(), 0.0f); |
| 2364 | + |
| 2365 | + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); |
| 2366 | + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); |
| 2367 | + assertEquals(0f, root_child0_child0_child0.getLayoutWidth(), 0.0f); |
| 2368 | + assertEquals(10f, root_child0_child0_child0.getLayoutHeight(), 0.0f); |
| 2369 | + |
| 2370 | + assertEquals(0f, root_child0_child0_child0_child0.getLayoutX(), 0.0f); |
| 2371 | + assertEquals(0f, root_child0_child0_child0_child0.getLayoutY(), 0.0f); |
| 2372 | + assertEquals(0f, root_child0_child0_child0_child0.getLayoutWidth(), 0.0f); |
| 2373 | + assertEquals(10f, root_child0_child0_child0_child0.getLayoutHeight(), 0.0f); |
| 2374 | + } |
| 2375 | + |
2296 | 2376 | private YogaNode createNode(YogaConfig config) { |
2297 | 2377 | return mNodeFactory.create(config); |
2298 | 2378 | } |
|
0 commit comments