Skip to content

Commit 350d4ad

Browse files
committed
Add missing @Test to enable test cases
1 parent 00e4e2a commit 350d4ad

52 files changed

Lines changed: 336 additions & 24 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/test/groovy/bugs/BooleanBug.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ final class BooleanBug {
4646
return !field.isFoo();
4747
}
4848

49-
public testBooleanAsMethodArgumentFromCompare() {
49+
@Test
50+
void testBooleanAsMethodArgumentFromCompare() {
5051
assertScript """
5152
def foo(x){x}
5253
def i = 0

src/test/groovy/bugs/Groovy4080Bug.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
*/
1919
package bugs
2020

21+
import org.junit.jupiter.api.Test
2122

2223
class Groovy4080Bug {
24+
@Test
2325
public void testClassGeneratedWithAnnotationHavingGrabOnImport() {
2426
GroovyShell shell = new GroovyShell(new GroovyClassLoader())
2527
shell.evaluate """

src/test/groovy/bugs/Groovy4414Bug.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
*/
1919
package bugs
2020

21+
import org.junit.jupiter.api.Test
22+
2123
import org.codehaus.groovy.runtime.InvokerHelper
2224

2325
import static org.junit.jupiter.api.Assertions.assertEquals
2426

2527
class Groovy4414Bug {
28+
@Test
2629
public void testUnaryMinus() {
2730
assertEquals(-1, InvokerHelper.unaryMinus(1)); // relying here on boxing for Integer
2831
assertEquals(-1l, InvokerHelper.unaryMinus(1l));
@@ -54,6 +57,7 @@ class Groovy4414Bug {
5457
assertEquals((byte)-1, negativeByteOne);
5558
}
5659

60+
@Test
5761
public void testUnaryPlus() {
5862
assertEquals(1, InvokerHelper.unaryPlus(1)); // relying here on boxing for Integer
5963
assertEquals(1l, InvokerHelper.unaryPlus(1l));

src/test/groovy/bugs/Groovy6755Bug.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ package bugs
2020

2121
import org.codehaus.groovy.control.CompilerConfiguration
2222
import org.codehaus.groovy.tools.FileSystemCompiler
23+
import org.junit.jupiter.api.Test
2324

2425
class Groovy6755Bug {
2526

27+
@Test
2628
public void testDeeepGenericJointCompilationImportResolution() {
2729
File workDir = new File("build/tmp/Groovy6755Bug")
2830
workDir.deleteDir()

src/test/groovy/bugs/Groovy7031Bug.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818
*/
1919
package bugs
2020

21+
import org.junit.jupiter.api.Test
22+
2123

2224
import static groovy.test.GroovyAssert.assertScript
2325

2426

2527
class Groovy7031Bug {
2628

29+
@Test
2730
void test() {
2831
assertScript """
2932
@groovy.transform.CompileStatic

src/test/groovy/bugs/Groovy779_Bug.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package bugs
2020

21+
import org.junit.jupiter.api.Test
22+
2123
class Groovy779_Bug {
2224

2325
def boolean exceptionCalled = false
@@ -30,6 +32,7 @@ class Groovy779_Bug {
3032
app.testAutoboxingProperty()
3133
}
3234

35+
@Test
3336
public void testFieldProperty() {
3437

3538
try {
@@ -51,6 +54,7 @@ class Groovy779_Bug {
5154
// println("Success!")
5255
}
5356

57+
@Test
5458
public void testBeanProperty() {
5559

5660
try {
@@ -72,6 +76,7 @@ class Groovy779_Bug {
7276
// println("Success!")
7377
}
7478

79+
@Test
7580
public void testAutoboxingProperty() {
7681
def p = new Groovy779OneProfit(signal: "bar", rate: 15)
7782
assert p.signal == "bar"

src/test/groovy/bugs/Groovy8138Bug.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
*/
1919
package bugs
2020

21+
import org.junit.jupiter.api.Test
22+
import static groovy.test.GroovyAssert.assertScript
2123

2224
class Groovy8138Bug {
25+
@Test
2326
void test() {
2427
assertScript '''
2528
import groovy.transform.CompileStatic
26-
2729
import static java.util.stream.Collectors.toList
28-
import org.junit.jupiter.api.Test
29-
import static groovy.test.GroovyAssert.*
3030
3131
@CompileStatic
3232
class Test {

src/test/groovy/bugs/Groovy8212Bug.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
*/
1919
package bugs
2020

21+
import org.junit.jupiter.api.Test
22+
2123

2224
import static groovy.test.GroovyAssert.assertScript
2325

2426

2527
class Groovy8212Bug {
28+
@Test
2629
void test() {
2730
assertScript '''
2831
@groovy.transform.CompileStatic

src/test/groovy/gls/annotations/AnnotationTest.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,7 @@ final class AnnotationTest {
10241024
shell.parse codeWithMetaAnnotationWithTarget('TYPE')
10251025
}
10261026

1027+
@Test
10271028
void testAnnotateAnnotationDefinitionWithAnnotationWithAnnotationTypeTarget() {
10281029
shell.parse codeWithMetaAnnotationWithTarget('ANNOTATION_TYPE')
10291030
}

src/test/groovy/gls/invocation/MethodSelectionTest.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ final class MethodSelectionTest extends CompilableTestSupport {
270270
}
271271

272272
// GROOVY-3977
273+
@Test
273274
void testBDandBIToFloatAutoConversionInMethodSelection() {
274275
assertScript '''
275276
class Foo3977 {

0 commit comments

Comments
 (0)