This is an automated email from the ASF dual-hosted git repository. sunlan pushed a commit to branch refine-groovydoc in repository https://gitbox.apache.org/repos/asf/groovy.git
commit c7060d136f82c85b7f3cf53b5404a95acf86ed33 Author: Paul King <pa...@asert.com.au> AuthorDate: Tue Dec 18 21:32:17 2018 +1000 GROOVY-8931: AstNodeToScriptVisitor - wrong "extends/implements" order (tweak test) --- .../groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subprojects/groovy-console/src/test/groovy/groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy b/subprojects/groovy-console/src/test/groovy/groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy index 085a553..e42f173 100644 --- a/subprojects/groovy-console/src/test/groovy/groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy +++ b/subprojects/groovy-console/src/test/groovy/groovy/inspect/swingui/AstNodeToScriptAdapterTest.groovy @@ -109,7 +109,7 @@ class AstNodeToScriptAdapterTest extends GroovyTestCase { int size() {} }''' String result = compileToScript(script, CompilePhase.SEMANTIC_ANALYSIS) - assert result.contains('public class MyList<E> implements java.util.List<E> extends java.util.AbstractList<E> {') + assert result.contains('public class MyList<E> extends java.util.AbstractList<E> implements java.util.List<E> {') } void testGenericBoundsOnClass() { @@ -117,8 +117,8 @@ class AstNodeToScriptAdapterTest extends GroovyTestCase { abstract class MyClass<T extends String & Callable<String>, U extends Integer> extends AbstractList<String> implements Callable<? super Number> { } ''' String result = compileToScript(script, CompilePhase.SEMANTIC_ANALYSIS) assert result.contains('MyClass<T extends java.lang.String & java.util.concurrent.Callable<String>, U extends java.lang.Integer> ' + - 'implements java.util.concurrent.Callable<? super java.lang.Number> ' + - 'extends java.util.AbstractList<String> {') + 'extends java.util.AbstractList<String> ' + + 'implements java.util.concurrent.Callable<? super java.lang.Number> {') } void testGenericsInVariables() { @@ -156,7 +156,7 @@ class AstNodeToScriptAdapterTest extends GroovyTestCase { void addBranch(Tree<? extends V> branch) { branches.add(branch); } } ''' String result = compileToScript(script, CompilePhase.CLASS_GENERATION) - assert result.contains('public class Tree<V> implements groovy.lang.GroovyObject extends java.lang.Object') + assert result.contains('public class Tree<V> extends java.lang.Object implements groovy.lang.GroovyObject') assert result.contains('private java.lang.Object<V> value') // todo: is Object<V> correct? How do you know? assert result.contains('private java.util.List<Tree> branches') // should the <? extends V> be dropped? assert result.contains('branches = new java.util.ArrayList<Tree>()') // should the <? extends V> be dropped?