"Main should return Unit" inspection: extend on JUnit test methods
So #KT-24509 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
b5e3db1811
commit
69d2e8898a
@@ -0,0 +1,10 @@
|
||||
// PROBLEM: JUnit test should return Unit
|
||||
// FIX: Add explicit Unit return type
|
||||
// DISABLE-ERRORS
|
||||
package org.junit
|
||||
|
||||
annotation class Test
|
||||
|
||||
class A {
|
||||
@Test fun foo<caret>() = 1
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// PROBLEM: JUnit test should return Unit
|
||||
// FIX: Add explicit Unit return type
|
||||
// DISABLE-ERRORS
|
||||
package org.junit
|
||||
|
||||
annotation class Test
|
||||
|
||||
class A {
|
||||
@Test fun foo<caret>(): Unit = 1
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// FIX: Add explicit Unit return type
|
||||
// DISABLE-ERRORS
|
||||
package org.junit.jupiter.api
|
||||
|
||||
annotation class Test
|
||||
|
||||
class A {
|
||||
@Test fun foo<caret>() = 1
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// FIX: Add explicit Unit return type
|
||||
// DISABLE-ERRORS
|
||||
package org.junit.jupiter.api
|
||||
|
||||
annotation class Test
|
||||
|
||||
class A {
|
||||
@Test fun foo<caret>(): Unit = 1
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// PROBLEM: main should return Unit
|
||||
// FIX: Add explicit Unit return type
|
||||
// DISABLE-ERRORS
|
||||
fun <caret>main(args: Array<String>) = 1
|
||||
@@ -1,3 +1,4 @@
|
||||
// PROBLEM: main should return Unit
|
||||
// FIX: Add explicit Unit return type
|
||||
// DISABLE-ERRORS
|
||||
fun main(args: Array<String>): Unit = 1
|
||||
Reference in New Issue
Block a user