Skip to content

Commit f029ec2

Browse files
committed
fix stub test execution
1 parent e85473e commit f029ec2

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/test/groovy/org/codehaus/groovy/tools/stubgenerator/StubTestCase.groovy

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ package org.codehaus.groovy.tools.stubgenerator
2020

2121
import com.thoughtworks.qdox.JavaProjectBuilder
2222
import com.thoughtworks.qdox.model.JavaClass
23+
import groovy.test.GroovyTestCase
24+
import junit.framework.TestCase
2325
import org.codehaus.groovy.control.CompilationFailedException
2426
import org.codehaus.groovy.control.CompilerConfiguration
2527
import org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit
2628
import org.junit.jupiter.api.AfterEach
2729
import org.junit.jupiter.api.BeforeEach
30+
import org.junit.jupiter.api.Test
2831

2932
import static groovy.io.FileType.FILES
3033
import static org.junit.jupiter.api.Assertions.fail
@@ -66,8 +69,8 @@ abstract class StubTestCase {
6669
protected GroovyClassLoader loader
6770
protected CompilerConfiguration config
6871

69-
protected boolean debug = false;
70-
protected boolean delete = true;
72+
protected boolean debug = false
73+
protected boolean delete = true
7174

7275
/**
7376
* Prepares the target and stub directories.
@@ -139,6 +142,7 @@ abstract class StubTestCase {
139142
* Sole JUnit test method which will delegate to the <code>verifyStubs()</code> method
140143
* in the subclasses of <code>StubTestCase</code>.
141144
*/
145+
@Test
142146
void testRun() {
143147
init()
144148
configure()
@@ -230,7 +234,7 @@ abstract class StubTestCase {
230234
loader = new GroovyClassLoader(this.class.classLoader).tap {
231235
addURL(this.class.location)
232236
addURL(GroovyTestCase.location)
233-
addURL(junit.framework.TestCase.location)
237+
addURL(TestCase.location)
234238
}
235239
def cu = new JavaAwareCompilationUnit(config, loader)
236240
cu.addSources(sources as File[])

0 commit comments

Comments
 (0)