Source:
public void raiseStatement() { setRootRule(PythonGrammar.RAISE_STMT); AstNode astNode = p.parse("raise foo"); PyRaiseStatementTree raiseStatement = treeMaker.raiseStatement(astNode); assertThat(raiseStatement).isNotNull(); assertThat(raiseStatement.raiseKeyword().getValue()).isEqualTo("raise"); assertThat(raiseStatement.fromKeyword()).isNull(); assertThat(raiseStatement.fromExpression()).isNull(); assertThat(raiseStatement.expressions()).hasSize(1); assertThat(raiseStatement.children()).hasSize(2); astNode = p.parse("raise foo, bar"); raiseStatement = treeMaker.raiseStatement(astNode); assertThat(raiseStatement).isNotNull(); assertThat(raiseStatement.raiseKeyword().getValue()).isEqualTo("raise"); assertThat(raiseStatement.fromKeyword()).isNull(); assertThat(raiseStatement.fromExpression()).isNull(); assertThat(raiseStatement.expressions()).hasSize(2); assertThat(raiseStatement.children()).hasSize(3); astNode = p.parse("raise foo from bar"); raiseStatement = treeMaker.raiseStatement(astNode); assertThat(raiseStatement).isNotNull(); assertThat(raiseStatement.raiseKeyword().getValue()).isEqualTo("raise"); assertThat(raiseStatement.fromKeyword().getValue()).isEqualTo("from"); assertThat(raiseStatement.fromExpression()).isNotNull(); assertThat(raiseStatement.children()).hasSize(2); astNode = p.parse("raise"); raiseStatement = treeMaker.raiseStatement(astNode); assertThat(raiseStatement).isNotNull(); assertThat(raiseStatement.raiseKeyword().getValue()).isEqualTo("raise"); assertThat(raiseStatement.fromKeyword()).isNull(); assertThat(raiseStatement.fromExpression()).isNull(); assertThat(raiseStatement.expressions()).isEmpty(); assertThat(raiseStatement.children()).hasSize(1); }

Target:
public void raiseStatement() { setRootRule(PythonGrammar.RAISE_STMT); AstNode astNode = p.parse("raise foo"); PyRaiseStatementTree raiseStatement = treeMaker.raiseStatement(astNode); assertThat(raiseStatement).isNotNull(); assertThat(raiseStatement.raiseKeyword().getValue()).isEqualTo("raise"); assertThat(raiseStatement.fromKeyword()).isNull(); assertThat(raiseStatement.fromExpression()).isNull(); assertThat(raiseStatement.expressions()).hasSize(1); assertThat(raiseStatement.children()).hasSize(2); astNode = p.parse("raise foo, bar"); raiseStatement = treeMaker.raiseStatement(astNode); assertThat(raiseStatement).isNotNull(); assertThat(raiseStatement.raiseKeyword().getValue()).isEqualTo("raise"); assertThat(raiseStatement.fromKeyword()).isNull(); assertThat(raiseStatement.fromExpression()).isNull(); assertThat(raiseStatement.expressions()).hasSize(2); assertThat(raiseStatement.children()).hasSize(3); astNode = p.parse("raise foo from bar"); raiseStatement = treeMaker.raiseStatement(astNode); assertThat(raiseStatement).isNotNull(); assertThat(raiseStatement.raiseKeyword().getValue()).isEqualTo("raise"); assertThat(raiseStatement.fromKeyword().getValue()).isEqualTo("from"); assertThat(raiseStatement.fromExpression()).isNotNull(); assertThat(raiseStatement.expressions()).hasSize(1); assertThat(raiseStatement.children()).hasSize(2); astNode = p.parse("raise"); raiseStatement = treeMaker.raiseStatement(astNode); assertThat(raiseStatement).isNotNull(); assertThat(raiseStatement.raiseKeyword().getValue()).isEqualTo("raise"); assertThat(raiseStatement.fromKeyword()).isNull(); assertThat(raiseStatement.fromExpression()).isNull(); assertThat(raiseStatement.expressions()).isEmpty(); assertThat(raiseStatement.children()).hasSize(1); }