@@ -414,7 +414,7 @@ mod test {
414414
415415 /** Try to minimize assignments */
416416 #[ test]
417- #[ ignore]
417+ #[ ignore = "TODO: Assignment folding optimization not yet implemented" ]
418418 fn test_fold_assignments ( ) {
419419 test ( "function f(){if(x)y=3;else y=4;}" , "function f(){y=x?3:4}" ) ;
420420 test ( "function f(){if(x)y=1+a;else y=2+a;}" , "function f(){y=x?1+a:2+a}" ) ;
@@ -436,7 +436,7 @@ mod test {
436436 }
437437
438438 #[ test]
439- #[ ignore]
439+ #[ ignore = "TODO: Duplicate statement removal not yet implemented" ]
440440 fn test_remove_duplicate_statements ( ) {
441441 test ( "if (a) { x = 1; x++ } else { x = 2; x++ }" , "x=(a) ? 1 : 2; x++" ) ;
442442 test (
@@ -505,7 +505,7 @@ mod test {
505505 }
506506
507507 #[ test]
508- #[ ignore]
508+ #[ ignore = "TODO: Parentheses counting optimization not yet implemented" ]
509509 fn test_and_parentheses_count ( ) {
510510 test ( "function f(){if(x||y)a.foo()}" , "function f(){(x||y)&&a.foo()}" ) ;
511511 test ( "function f(){if(x.a)x.a=0}" , "function f(){x.a&&(x.a=0)}" ) ;
@@ -567,47 +567,47 @@ mod test {
567567 }
568568
569569 #[ test]
570- #[ ignore]
570+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
571571 fn test_minimize_demorgan_remove_leading_not ( ) {
572572 test ( "if(!(!a||!b)&&c) foo()" , "((a&&b)&&c)&&foo()" ) ;
573573 test ( "if(!(x&&y)) foo()" , "x&&y||foo()" ) ;
574574 test ( "if(!(x||y)) foo()" , "(x||y)||foo()" ) ;
575575 }
576576
577577 #[ test]
578- #[ ignore]
578+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
579579 fn test_minimize_demorgan1 ( ) {
580580 test ( "if(!a&&!b)foo()" , "(a||b)||foo()" ) ;
581581 }
582582
583583 #[ test]
584- #[ ignore]
584+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
585585 fn test_minimize_demorgan2 ( ) {
586586 // Make sure trees with cloned functions are marked as changed
587587 test ( "(!(a&&!((function(){})())))||foo()" , "!a||(function(){})()||foo()" ) ;
588588 }
589589
590590 #[ test]
591- #[ ignore]
591+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
592592 fn test_minimize_demorgan2b ( ) {
593593 // Make sure unchanged trees with functions are not marked as changed
594594 test_same ( "!a||(function(){})()||foo()" ) ;
595595 }
596596
597597 #[ test]
598- #[ ignore]
598+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
599599 fn test_minimize_demorgan3 ( ) {
600600 test ( "if((!a||!b)&&(c||d)) foo()" , "(a&&b||!c&&!d)||foo()" ) ;
601601 }
602602
603603 #[ test]
604- #[ ignore]
604+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
605605 fn test_minimize_demorgan5 ( ) {
606606 test ( "if((!a||!b)&&c) foo()" , "(a&&b||!c)||foo()" ) ;
607607 }
608608
609609 #[ test]
610- #[ ignore]
610+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
611611 fn test_minimize_demorgan11 ( ) {
612612 test (
613613 "if (x && (y===2 || !f()) && (y===3 || !h())) foo()" ,
@@ -616,7 +616,7 @@ mod test {
616616 }
617617
618618 #[ test]
619- #[ ignore]
619+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
620620 fn test_minimize_demorgan20a ( ) {
621621 test (
622622 "if (0===c && (2===a || 1===a)) f(); else g()" ,
@@ -625,7 +625,7 @@ mod test {
625625 }
626626
627627 #[ test]
628- #[ ignore]
628+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
629629 fn test_minimize_demorgan20b ( ) {
630630 test ( "if (0!==c || 2!==a && 1!==a) g(); else f()" , "(0!==c || 2!==a && 1!==a) ? g() : f()" ) ;
631631 }
@@ -676,7 +676,7 @@ mod test {
676676 }
677677
678678 #[ test]
679- #[ ignore]
679+ #[ ignore = "TODO: Expression result minimization not yet implemented" ]
680680 fn test_minimize_expr_result ( ) {
681681 test ( "!x||!y" , "x&&y" ) ;
682682 test ( "if(!(x&&!y)) foo()" , "(!x||y)&&foo()" ) ;
@@ -685,13 +685,13 @@ mod test {
685685 }
686686
687687 #[ test]
688- #[ ignore]
688+ #[ ignore = "TODO: De Morgan's law optimization not yet implemented" ]
689689 fn test_minimize_demorgan21 ( ) {
690690 test ( "if (0===c && (2===a || 1===a)) f()" , "(0!==c || 2!==a && 1!==a) || f()" ) ;
691691 }
692692
693693 #[ test]
694- #[ ignore]
694+ #[ ignore = "TODO: AND/OR minimization not yet implemented" ]
695695 fn test_minimize_and_or1 ( ) {
696696 test ( "if ((!a || !b) && (d || e)) f()" , "(a&&b || !d&&!e) || f()" ) ;
697697 }
@@ -741,7 +741,7 @@ mod test {
741741 }
742742
743743 #[ test]
744- #[ ignore]
744+ #[ ignore = "TODO: Conditional variable declaration folding not yet implemented" ]
745745 fn test_fold_conditional_var_declaration ( ) {
746746 test ( "if(x) var y=1;else y=2" , "var y=x?1:2" ) ;
747747 test ( "if(x) y=1;else var y=2" , "var y=x?1:2" ) ;
@@ -764,7 +764,7 @@ mod test {
764764 }
765765
766766 #[ test]
767- #[ ignore]
767+ #[ ignore = "TODO: Return statement substitution not yet implemented" ]
768768 fn test_substitute_return ( ) {
769769 test ( "function f() { while(x) { return }}" , "function f() { while(x) { break }}" ) ;
770770
@@ -861,7 +861,7 @@ mod test {
861861 }
862862
863863 #[ test]
864- #[ ignore]
864+ #[ ignore = "TODO: Break/throw substitution not yet implemented" ]
865865 fn test_substitute_break_for_throw ( ) {
866866 test_same ( "function f() { while(x) { throw Error }}" ) ;
867867
0 commit comments