Repository: groovy Updated Branches: refs/heads/master 540e3feb5 -> c4380a09b
Cleanup code Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/c4380a09 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/c4380a09 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/c4380a09 Branch: refs/heads/master Commit: c4380a09b40b348a7720105bf0f18ab551d757d4 Parents: 540e3fe Author: Daniel Sun <sun...@apache.org> Authored: Sat Oct 20 19:39:20 2018 +0800 Committer: Daniel Sun <sun...@apache.org> Committed: Sat Oct 20 19:39:20 2018 +0800 ---------------------------------------------------------------------- .../groovy/parser/antlr4/SyntaxErrorTest.groovy | 162 +++++++++---------- 1 file changed, 81 insertions(+), 81 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/c4380a09/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/SyntaxErrorTest.groovy ---------------------------------------------------------------------- diff --git a/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/SyntaxErrorTest.groovy b/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/SyntaxErrorTest.groovy index af8bd61..7cc868d 100644 --- a/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/SyntaxErrorTest.groovy +++ b/subprojects/parser-antlr4/src/test/groovy/org/apache/groovy/parser/antlr4/SyntaxErrorTest.groovy @@ -27,34 +27,34 @@ import org.apache.groovy.parser.antlr4.util.ASTComparatorCategory * Created on 2016/09/02 */ class SyntaxErrorTest extends GroovyTestCase { - public static final String RESOURCES_PATH = 'src/test/resources'; + public static final String RESOURCES_PATH = 'src/test/resources' void setUp() {} void tearDown() {} void "test groovy core - List"() { - TestUtils.shouldFail('fail/List_01.groovy'); + TestUtils.shouldFail('fail/List_01.groovy') } void "test groovy core - Expression"() { - TestUtils.shouldFail('fail/Expression_01.groovy'); - TestUtils.shouldFail('fail/Expression_02.groovy'); - TestUtils.shouldFail('fail/Expression_03.groovy'); + TestUtils.shouldFail('fail/Expression_01.groovy') + TestUtils.shouldFail('fail/Expression_02.groovy') + TestUtils.shouldFail('fail/Expression_03.groovy') // shouldFail('fail/Expression_04.groovy', true); // shouldFail('fail/Expression_05.groovy', true); - TestUtils.shouldFail('fail/Expression_06.groovy'); - TestUtils.shouldFail('fail/Expression_07.groovy'); - TestUtils.shouldFail('fail/Expression_08.groovy'); - TestUtils.shouldFail('fail/Expression_09.groovy'); + TestUtils.shouldFail('fail/Expression_06.groovy') + TestUtils.shouldFail('fail/Expression_07.groovy') + TestUtils.shouldFail('fail/Expression_08.groovy') + TestUtils.shouldFail('fail/Expression_09.groovy') } void "test groovy core - CommandExpression"() { - TestUtils.doRunAndShouldFail('fail/CommandExpression_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/CommandExpression_01x.groovy') } void "test groovy core - Switch"() { - TestUtils.shouldFail('fail/Switch_01.groovy'); + TestUtils.shouldFail('fail/Switch_01.groovy') } void "test groovy core - LocalVariableDeclaration"() { @@ -62,17 +62,17 @@ class SyntaxErrorTest extends GroovyTestCase { } void "test groovy core - Continue"() { - TestUtils.doRunAndShouldFail('fail/Continue_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/Continue_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/Continue_01x.groovy') + TestUtils.doRunAndShouldFail('fail/Continue_02x.groovy') } void "test groovy core - Break"() { - TestUtils.doRunAndShouldFail('fail/Break_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/Break_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/Break_01x.groovy') + TestUtils.doRunAndShouldFail('fail/Break_02x.groovy') } void "test groovy core - UnexpectedCharacter"() { - TestUtils.doRunAndShouldFail('fail/UnexpectedCharacter_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/UnexpectedCharacter_01x.groovy') } // void "test CompilerErrorTest_001.groovy"() { @@ -96,152 +96,152 @@ class SyntaxErrorTest extends GroovyTestCase { // } void "test groovy core - ParExpression"() { - TestUtils.doRunAndShouldFail('fail/ParExpression_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/ParExpression_02x.groovy'); - TestUtils.doRunAndShouldFail('fail/ParExpression_03x.groovy'); + TestUtils.doRunAndShouldFail('fail/ParExpression_01x.groovy') + TestUtils.doRunAndShouldFail('fail/ParExpression_02x.groovy') + TestUtils.doRunAndShouldFail('fail/ParExpression_03x.groovy') } void "test groovy core - Parentheses"() { - TestUtils.shouldFail('fail/Parentheses_01.groovy'); + TestUtils.shouldFail('fail/Parentheses_01.groovy') } void "test groovy core - This"() { - TestUtils.doRunAndShouldFail('fail/This_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/This_01x.groovy') } void "test groovy core - Super"() { - TestUtils.doRunAndShouldFail('fail/Super_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/Super_01x.groovy') } void "test groovy core - AbstractMethod"() { - TestUtils.doRunAndShouldFail('fail/AbstractMethod_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/AbstractMethod_02x.groovy'); - TestUtils.doRunAndShouldFail('fail/AbstractMethod_03x.groovy'); - TestUtils.doRunAndShouldFail('fail/AbstractMethod_04x.groovy'); - TestUtils.doRunAndShouldFail('fail/AbstractMethod_05x.groovy'); - TestUtils.doRunAndShouldFail('fail/AbstractMethod_06x.groovy'); + TestUtils.doRunAndShouldFail('fail/AbstractMethod_01x.groovy') + TestUtils.doRunAndShouldFail('fail/AbstractMethod_02x.groovy') + TestUtils.doRunAndShouldFail('fail/AbstractMethod_03x.groovy') + TestUtils.doRunAndShouldFail('fail/AbstractMethod_04x.groovy') + TestUtils.doRunAndShouldFail('fail/AbstractMethod_05x.groovy') + TestUtils.doRunAndShouldFail('fail/AbstractMethod_06x.groovy') } void "test groovy core - BUGs"() { - TestUtils.doRunAndShouldFail('bugs/BUG-GROOVY-5318.groovy'); - TestUtils.doRunAndShouldFail('bugs/BUG-GROOVY-8150.groovy'); - TestUtils.doRunAndShouldFail('bugs/BUG-GROOVY-8216.groovy'); + TestUtils.doRunAndShouldFail('bugs/BUG-GROOVY-5318.groovy') + TestUtils.doRunAndShouldFail('bugs/BUG-GROOVY-8150.groovy') + TestUtils.doRunAndShouldFail('bugs/BUG-GROOVY-8216.groovy') } void "test groovy core - DoWhile"() { - TestUtils.doRunAndShouldFail('fail/DoWhile_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/DoWhile_01x.groovy') } void "test groovy core - For"() { - TestUtils.shouldFail('fail/For_01.groovy'); - TestUtils.shouldFail('fail/For_02.groovy'); + TestUtils.shouldFail('fail/For_01.groovy') + TestUtils.shouldFail('fail/For_02.groovy') } void "test groovy core - Modifier"() { - TestUtils.doRunAndShouldFail('fail/Modifier_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/Modifier_02x.groovy'); - TestUtils.doRunAndShouldFail('fail/Modifier_03x.groovy'); - TestUtils.doRunAndShouldFail('fail/Modifier_04x.groovy'); - TestUtils.doRunAndShouldFail('fail/Modifier_05x.groovy'); - TestUtils.shouldFail('fail/Modifier_07.groovy'); + TestUtils.doRunAndShouldFail('fail/Modifier_01x.groovy') + TestUtils.doRunAndShouldFail('fail/Modifier_02x.groovy') + TestUtils.doRunAndShouldFail('fail/Modifier_03x.groovy') + TestUtils.doRunAndShouldFail('fail/Modifier_04x.groovy') + TestUtils.doRunAndShouldFail('fail/Modifier_05x.groovy') + TestUtils.shouldFail('fail/Modifier_07.groovy') } void "test groovy core - ClassDeclaration"() { - TestUtils.doRunAndShouldFail('fail/ClassDeclaration_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/ClassDeclaration_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/ClassDeclaration_01x.groovy') + TestUtils.doRunAndShouldFail('fail/ClassDeclaration_02x.groovy') } void "test groovy core - MethodDeclaration"() { - TestUtils.shouldFail('fail/MethodDeclaration_01.groovy'); - TestUtils.doRunAndShouldFail('fail/MethodDeclaration_02x.groovy'); - TestUtils.doRunAndShouldFail('fail/MethodDeclaration_03x.groovy'); - TestUtils.doRunAndShouldFail('fail/MethodDeclaration_04x.groovy'); - TestUtils.doRunAndShouldFail('fail/MethodDeclaration_05x.groovy'); + TestUtils.shouldFail('fail/MethodDeclaration_01.groovy') + TestUtils.doRunAndShouldFail('fail/MethodDeclaration_02x.groovy') + TestUtils.doRunAndShouldFail('fail/MethodDeclaration_03x.groovy') + TestUtils.doRunAndShouldFail('fail/MethodDeclaration_04x.groovy') + TestUtils.doRunAndShouldFail('fail/MethodDeclaration_05x.groovy') } void "test groovy core - ConstructorDeclaration"() { - TestUtils.shouldFail('fail/ConstructorDeclaration_01.groovy'); + TestUtils.shouldFail('fail/ConstructorDeclaration_01.groovy') } void "test groovy core - ClosureListExpression"() { - TestUtils.shouldFail('fail/ClosureListExpression_01.groovy'); - TestUtils.shouldFail('fail/ClosureListExpression_02.groovy'); - TestUtils.shouldFail('fail/ClosureListExpression_03.groovy'); - TestUtils.shouldFail('fail/ClosureListExpression_04.groovy'); + TestUtils.shouldFail('fail/ClosureListExpression_01.groovy') + TestUtils.shouldFail('fail/ClosureListExpression_02.groovy') + TestUtils.shouldFail('fail/ClosureListExpression_03.groovy') + TestUtils.shouldFail('fail/ClosureListExpression_04.groovy') } void "test groovy core - InterfaceDeclaration"() { - TestUtils.shouldFail('fail/InterfaceDeclaration_01.groovy'); + TestUtils.shouldFail('fail/InterfaceDeclaration_01.groovy') } void "test groovy core - void"() { - TestUtils.doRunAndShouldFail('fail/Void_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/Void_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/Void_01x.groovy') + TestUtils.doRunAndShouldFail('fail/Void_02x.groovy') } void "test groovy core - FieldDeclaration"() { - TestUtils.doRunAndShouldFail('fail/FieldDeclaration_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/FieldDeclaration_02x.groovy'); - TestUtils.doRunAndShouldFail('fail/FieldDeclaration_03x.groovy'); - TestUtils.doRunAndShouldFail('fail/FieldDeclaration_04x.groovy'); + TestUtils.doRunAndShouldFail('fail/FieldDeclaration_01x.groovy') + TestUtils.doRunAndShouldFail('fail/FieldDeclaration_02x.groovy') + TestUtils.doRunAndShouldFail('fail/FieldDeclaration_03x.groovy') + TestUtils.doRunAndShouldFail('fail/FieldDeclaration_04x.groovy') } void "test groovy core - Assert"() { - TestUtils.doRunAndShouldFail('fail/Assert_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/Assert_01x.groovy') } void "test groovy core - DuplicatedNamedParameter"() { - TestUtils.doRunAndShouldFail('fail/DuplicatedNamedParameter_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/DuplicatedNamedParameter_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/DuplicatedNamedParameter_01x.groovy') + TestUtils.doRunAndShouldFail('fail/DuplicatedNamedParameter_02x.groovy') } void "test groovy core - threadsafe"() { - TestUtils.doRunAndShouldFail('fail/ThreadSafe_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/ThreadSafe_01x.groovy') } void "test groovy core - VarArgParameter"() { - TestUtils.doRunAndShouldFail('fail/VarArgParameter_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/VarArgParameter_01x.groovy') } void "test groovy core - Number"() { - TestUtils.doRunAndShouldFail('fail/Number_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/Number_02x.groovy'); - TestUtils.doRunAndShouldFail('fail/Number_03x.groovy'); - TestUtils.doRunAndShouldFail('fail/Number_04x.groovy'); - TestUtils.doRunAndShouldFail('fail/Number_05x.groovy'); + TestUtils.doRunAndShouldFail('fail/Number_01x.groovy') + TestUtils.doRunAndShouldFail('fail/Number_02x.groovy') + TestUtils.doRunAndShouldFail('fail/Number_03x.groovy') + TestUtils.doRunAndShouldFail('fail/Number_04x.groovy') + TestUtils.doRunAndShouldFail('fail/Number_05x.groovy') } void "test groovy core - MethodCall"() { - TestUtils.doRunAndShouldFail('fail/MethodCall_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/MethodCall_01x.groovy') } void "test groovy core - var"() { - TestUtils.doRunAndShouldFail('fail/Var_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/Var_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/Var_01x.groovy') + TestUtils.doRunAndShouldFail('fail/Var_02x.groovy') } void "test groovy core - String"() { - TestUtils.doRunAndShouldFail('fail/String_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/String_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/String_01x.groovy') + TestUtils.doRunAndShouldFail('fail/String_02x.groovy') } void "test groovy core - NonStaticClass"() { - TestUtils.doRunAndShouldFail('fail/NonStaticClass_01x.groovy'); + TestUtils.doRunAndShouldFail('fail/NonStaticClass_01x.groovy') } void "test groovy core - Import"() { - TestUtils.doRunAndShouldFail('fail/Import_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/Import_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/Import_01x.groovy') + TestUtils.doRunAndShouldFail('fail/Import_02x.groovy') } void "test groovy core - UnaryOperator"() { - TestUtils.doRunAndShouldFail('fail/UnaryOperator_01x.groovy'); - TestUtils.doRunAndShouldFail('fail/UnaryOperator_02x.groovy'); + TestUtils.doRunAndShouldFail('fail/UnaryOperator_01x.groovy') + TestUtils.doRunAndShouldFail('fail/UnaryOperator_02x.groovy') } void "test groovy core - Trait"() { - TestUtils.shouldFail('fail/Trait_01.groovy'); + TestUtils.shouldFail('fail/Trait_01.groovy') } /**************************************/ @@ -251,5 +251,5 @@ class SyntaxErrorTest extends GroovyTestCase { TestUtils.unzipAndFail(SCRIPT_ZIP_PATH, entryName, TestUtils.addIgnore(ignoreClazzList, ASTComparatorCategory.LOCATION_IGNORE_LIST), replacementsMap, toCheckNewParserOnly) } - public static final String SCRIPT_ZIP_PATH = "$TestUtils.RESOURCES_PATH/groovy-2.5.0/groovy-2.5.0-SNAPSHOT-20160921-allscripts.zip"; + public static final String SCRIPT_ZIP_PATH = "$TestUtils.RESOURCES_PATH/groovy-2.5.0/groovy-2.5.0-SNAPSHOT-20160921-allscripts.zip" }