langtools/test/tools/javac/parser/JavacParserTest.java
changeset 12715 139b8354de6a
parent 12466 08863ee323df
child 13074 aef89cf0f4af
equal deleted inserted replaced
12714:73f1f7097c5e 12715:139b8354de6a
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 7073631
    26  * @bug 7073631 7159445
    27  * @summary tests error and diagnostics positions
    27  * @summary tests error and diagnostics positions
    28  * @author  Jan Lahoda
    28  * @author  Jan Lahoda
    29  */
    29  */
    30 
    30 
    31 import com.sun.source.tree.BinaryTree;
    31 import com.sun.source.tree.BinaryTree;
   873         testOperatorMissingError();
   873         testOperatorMissingError();
   874         testMissingParenthesisError();
   874         testMissingParenthesisError();
   875         testMissingClassError();
   875         testMissingClassError();
   876         testSwitchError();
   876         testSwitchError();
   877         testMethodError();
   877         testMethodError();
       
   878         testErrorRecoveryForEnhancedForLoop142381();
   878     }
   879     }
   879 
   880 
   880     public static void main(String... args) throws IOException {
   881     public static void main(String... args) throws IOException {
   881         JavacParserTest jpt = new JavacParserTest("JavacParserTest");
   882         JavacParserTest jpt = new JavacParserTest("JavacParserTest");
   882         jpt.testPositions();
   883         jpt.testPositions();
   890         if (i != pos) {
   891         if (i != pos) {
   891             fail(message);
   892             fail(message);
   892         }
   893         }
   893     }
   894     }
   894 
   895 
   895     void assertFalse(String message, boolean empty) {
   896     void assertFalse(String message, boolean bvalue) {
   896         throw new UnsupportedOperationException("Not yet implemented");
   897         if (bvalue == true) {
       
   898             fail(message);
       
   899         }
   897     }
   900     }
   898 
   901 
   899     void assertEquals(String message, int i, long l) {
   902     void assertEquals(String message, int i, long l) {
   900         if (i != l) {
   903         if (i != l) {
   901             fail(message + ":" + i + ":" + l);
   904             fail(message + ":" + i + ":" + l);