@@ -349,115 +349,6 @@ it("justify_content_overflow_min_max", function () {
349
349
( typeof gc !== "undefined" ) && gc ( ) ;
350
350
console . assert ( 0 === Yoga . getInstanceCount ( ) , "0 === Yoga.getInstanceCount() (" + Yoga . getInstanceCount ( ) + ")" ) ;
351
351
} ) ;
352
- it ( "flex_grow_to_min" , function ( ) {
353
- var root = Yoga . Node . create ( ) ;
354
- root . setWidth ( 100 ) ;
355
- root . setMinHeight ( 100 ) ;
356
- root . setMaxHeight ( 500 ) ;
357
-
358
- var root_child0 = Yoga . Node . create ( ) ;
359
- root_child0 . setFlexGrow ( 1 ) ;
360
- root_child0 . setFlexShrink ( 1 ) ;
361
- root . insertChild ( root_child0 , 0 ) ;
362
-
363
- var root_child1 = Yoga . Node . create ( ) ;
364
- root_child1 . setHeight ( 50 ) ;
365
- root . insertChild ( root_child1 , 1 ) ;
366
- root . calculateLayout ( Yoga . UNDEFINED , Yoga . UNDEFINED , Yoga . DIRECTION_LTR ) ;
367
-
368
- console . assert ( 0 === root . getComputedLeft ( ) , "0 === root.getComputedLeft() (" + root . getComputedLeft ( ) + ")" ) ;
369
- console . assert ( 0 === root . getComputedTop ( ) , "0 === root.getComputedTop() (" + root . getComputedTop ( ) + ")" ) ;
370
- console . assert ( 100 === root . getComputedWidth ( ) , "100 === root.getComputedWidth() (" + root . getComputedWidth ( ) + ")" ) ;
371
- console . assert ( 100 === root . getComputedHeight ( ) , "100 === root.getComputedHeight() (" + root . getComputedHeight ( ) + ")" ) ;
372
-
373
- console . assert ( 0 === root_child0 . getComputedLeft ( ) , "0 === root_child0.getComputedLeft() (" + root_child0 . getComputedLeft ( ) + ")" ) ;
374
- console . assert ( 0 === root_child0 . getComputedTop ( ) , "0 === root_child0.getComputedTop() (" + root_child0 . getComputedTop ( ) + ")" ) ;
375
- console . assert ( 100 === root_child0 . getComputedWidth ( ) , "100 === root_child0.getComputedWidth() (" + root_child0 . getComputedWidth ( ) + ")" ) ;
376
- console . assert ( 50 === root_child0 . getComputedHeight ( ) , "50 === root_child0.getComputedHeight() (" + root_child0 . getComputedHeight ( ) + ")" ) ;
377
-
378
- console . assert ( 0 === root_child1 . getComputedLeft ( ) , "0 === root_child1.getComputedLeft() (" + root_child1 . getComputedLeft ( ) + ")" ) ;
379
- console . assert ( 50 === root_child1 . getComputedTop ( ) , "50 === root_child1.getComputedTop() (" + root_child1 . getComputedTop ( ) + ")" ) ;
380
- console . assert ( 100 === root_child1 . getComputedWidth ( ) , "100 === root_child1.getComputedWidth() (" + root_child1 . getComputedWidth ( ) + ")" ) ;
381
- console . assert ( 50 === root_child1 . getComputedHeight ( ) , "50 === root_child1.getComputedHeight() (" + root_child1 . getComputedHeight ( ) + ")" ) ;
382
-
383
- root . calculateLayout ( Yoga . UNDEFINED , Yoga . UNDEFINED , Yoga . DIRECTION_RTL ) ;
384
-
385
- console . assert ( 0 === root . getComputedLeft ( ) , "0 === root.getComputedLeft() (" + root . getComputedLeft ( ) + ")" ) ;
386
- console . assert ( 0 === root . getComputedTop ( ) , "0 === root.getComputedTop() (" + root . getComputedTop ( ) + ")" ) ;
387
- console . assert ( 100 === root . getComputedWidth ( ) , "100 === root.getComputedWidth() (" + root . getComputedWidth ( ) + ")" ) ;
388
- console . assert ( 100 === root . getComputedHeight ( ) , "100 === root.getComputedHeight() (" + root . getComputedHeight ( ) + ")" ) ;
389
-
390
- console . assert ( 0 === root_child0 . getComputedLeft ( ) , "0 === root_child0.getComputedLeft() (" + root_child0 . getComputedLeft ( ) + ")" ) ;
391
- console . assert ( 0 === root_child0 . getComputedTop ( ) , "0 === root_child0.getComputedTop() (" + root_child0 . getComputedTop ( ) + ")" ) ;
392
- console . assert ( 100 === root_child0 . getComputedWidth ( ) , "100 === root_child0.getComputedWidth() (" + root_child0 . getComputedWidth ( ) + ")" ) ;
393
- console . assert ( 50 === root_child0 . getComputedHeight ( ) , "50 === root_child0.getComputedHeight() (" + root_child0 . getComputedHeight ( ) + ")" ) ;
394
-
395
- console . assert ( 0 === root_child1 . getComputedLeft ( ) , "0 === root_child1.getComputedLeft() (" + root_child1 . getComputedLeft ( ) + ")" ) ;
396
- console . assert ( 50 === root_child1 . getComputedTop ( ) , "50 === root_child1.getComputedTop() (" + root_child1 . getComputedTop ( ) + ")" ) ;
397
- console . assert ( 100 === root_child1 . getComputedWidth ( ) , "100 === root_child1.getComputedWidth() (" + root_child1 . getComputedWidth ( ) + ")" ) ;
398
- console . assert ( 50 === root_child1 . getComputedHeight ( ) , "50 === root_child1.getComputedHeight() (" + root_child1 . getComputedHeight ( ) + ")" ) ;
399
-
400
- if ( typeof root !== "undefined" )
401
- root . freeRecursive ( ) ;
402
-
403
- ( typeof gc !== "undefined" ) && gc ( ) ;
404
- console . assert ( 0 === Yoga . getInstanceCount ( ) , "0 === Yoga.getInstanceCount() (" + Yoga . getInstanceCount ( ) + ")" ) ;
405
- } ) ;
406
- it ( "flex_grow_in_at_most_container" , function ( ) {
407
- var root = Yoga . Node . create ( ) ;
408
- root . setFlexDirection ( Yoga . FLEX_DIRECTION_ROW ) ;
409
- root . setAlignItems ( Yoga . ALIGN_FLEX_START ) ;
410
- root . setWidth ( 100 ) ;
411
- root . setHeight ( 100 ) ;
412
-
413
- var root_child0 = Yoga . Node . create ( ) ;
414
- root_child0 . setFlexDirection ( Yoga . FLEX_DIRECTION_ROW ) ;
415
- root . insertChild ( root_child0 , 0 ) ;
416
-
417
- var root_child0_child0 = Yoga . Node . create ( ) ;
418
- root_child0_child0 . setFlexGrow ( 1 ) ;
419
- root_child0_child0 . setFlexBasis ( 0 ) ;
420
- root_child0 . insertChild ( root_child0_child0 , 0 ) ;
421
- root . calculateLayout ( Yoga . UNDEFINED , Yoga . UNDEFINED , Yoga . DIRECTION_LTR ) ;
422
-
423
- console . assert ( 0 === root . getComputedLeft ( ) , "0 === root.getComputedLeft() (" + root . getComputedLeft ( ) + ")" ) ;
424
- console . assert ( 0 === root . getComputedTop ( ) , "0 === root.getComputedTop() (" + root . getComputedTop ( ) + ")" ) ;
425
- console . assert ( 100 === root . getComputedWidth ( ) , "100 === root.getComputedWidth() (" + root . getComputedWidth ( ) + ")" ) ;
426
- console . assert ( 100 === root . getComputedHeight ( ) , "100 === root.getComputedHeight() (" + root . getComputedHeight ( ) + ")" ) ;
427
-
428
- console . assert ( 0 === root_child0 . getComputedLeft ( ) , "0 === root_child0.getComputedLeft() (" + root_child0 . getComputedLeft ( ) + ")" ) ;
429
- console . assert ( 0 === root_child0 . getComputedTop ( ) , "0 === root_child0.getComputedTop() (" + root_child0 . getComputedTop ( ) + ")" ) ;
430
- console . assert ( 0 === root_child0 . getComputedWidth ( ) , "0 === root_child0.getComputedWidth() (" + root_child0 . getComputedWidth ( ) + ")" ) ;
431
- console . assert ( 0 === root_child0 . getComputedHeight ( ) , "0 === root_child0.getComputedHeight() (" + root_child0 . getComputedHeight ( ) + ")" ) ;
432
-
433
- console . assert ( 0 === root_child0_child0 . getComputedLeft ( ) , "0 === root_child0_child0.getComputedLeft() (" + root_child0_child0 . getComputedLeft ( ) + ")" ) ;
434
- console . assert ( 0 === root_child0_child0 . getComputedTop ( ) , "0 === root_child0_child0.getComputedTop() (" + root_child0_child0 . getComputedTop ( ) + ")" ) ;
435
- console . assert ( 0 === root_child0_child0 . getComputedWidth ( ) , "0 === root_child0_child0.getComputedWidth() (" + root_child0_child0 . getComputedWidth ( ) + ")" ) ;
436
- console . assert ( 0 === root_child0_child0 . getComputedHeight ( ) , "0 === root_child0_child0.getComputedHeight() (" + root_child0_child0 . getComputedHeight ( ) + ")" ) ;
437
-
438
- root . calculateLayout ( Yoga . UNDEFINED , Yoga . UNDEFINED , Yoga . DIRECTION_RTL ) ;
439
-
440
- console . assert ( 0 === root . getComputedLeft ( ) , "0 === root.getComputedLeft() (" + root . getComputedLeft ( ) + ")" ) ;
441
- console . assert ( 0 === root . getComputedTop ( ) , "0 === root.getComputedTop() (" + root . getComputedTop ( ) + ")" ) ;
442
- console . assert ( 100 === root . getComputedWidth ( ) , "100 === root.getComputedWidth() (" + root . getComputedWidth ( ) + ")" ) ;
443
- console . assert ( 100 === root . getComputedHeight ( ) , "100 === root.getComputedHeight() (" + root . getComputedHeight ( ) + ")" ) ;
444
-
445
- console . assert ( 100 === root_child0 . getComputedLeft ( ) , "100 === root_child0.getComputedLeft() (" + root_child0 . getComputedLeft ( ) + ")" ) ;
446
- console . assert ( 0 === root_child0 . getComputedTop ( ) , "0 === root_child0.getComputedTop() (" + root_child0 . getComputedTop ( ) + ")" ) ;
447
- console . assert ( 0 === root_child0 . getComputedWidth ( ) , "0 === root_child0.getComputedWidth() (" + root_child0 . getComputedWidth ( ) + ")" ) ;
448
- console . assert ( 0 === root_child0 . getComputedHeight ( ) , "0 === root_child0.getComputedHeight() (" + root_child0 . getComputedHeight ( ) + ")" ) ;
449
-
450
- console . assert ( 0 === root_child0_child0 . getComputedLeft ( ) , "0 === root_child0_child0.getComputedLeft() (" + root_child0_child0 . getComputedLeft ( ) + ")" ) ;
451
- console . assert ( 0 === root_child0_child0 . getComputedTop ( ) , "0 === root_child0_child0.getComputedTop() (" + root_child0_child0 . getComputedTop ( ) + ")" ) ;
452
- console . assert ( 0 === root_child0_child0 . getComputedWidth ( ) , "0 === root_child0_child0.getComputedWidth() (" + root_child0_child0 . getComputedWidth ( ) + ")" ) ;
453
- console . assert ( 0 === root_child0_child0 . getComputedHeight ( ) , "0 === root_child0_child0.getComputedHeight() (" + root_child0_child0 . getComputedHeight ( ) + ")" ) ;
454
-
455
- if ( typeof root !== "undefined" )
456
- root . freeRecursive ( ) ;
457
-
458
- ( typeof gc !== "undefined" ) && gc ( ) ;
459
- console . assert ( 0 === Yoga . getInstanceCount ( ) , "0 === Yoga.getInstanceCount() (" + Yoga . getInstanceCount ( ) + ")" ) ;
460
- } ) ;
461
352
it ( "flex_grow_within_max_width" , function ( ) {
462
353
var root = Yoga . Node . create ( ) ;
463
354
root . setWidth ( 200 ) ;
0 commit comments