[Lombok] Convert tests with compilation errors to diagnostic tests
This commit is contained in:
committed by
teamcity
parent
fb57e1ecd5
commit
430ea414a9
@@ -30,6 +30,7 @@ import org.jetbrains.kotlin.kapt3.test.AbstractIrClassFileToSourceStubConverterT
|
||||
import org.jetbrains.kotlin.kapt3.test.AbstractIrKotlinKaptContextTest
|
||||
import org.jetbrains.kotlin.kapt3.test.AbstractKotlinKaptContextTest
|
||||
import org.jetbrains.kotlin.lombok.AbstractBlackBoxCodegenTestForLombok
|
||||
import org.jetbrains.kotlin.lombok.AbstractDiagnosticTestForLombok
|
||||
import org.jetbrains.kotlin.lombok.AbstractIrBlackBoxCodegenTestForLombok
|
||||
import org.jetbrains.kotlin.noarg.*
|
||||
import org.jetbrains.kotlin.parcelize.test.runners.*
|
||||
@@ -424,10 +425,13 @@ fun main(args: Array<String>) {
|
||||
|
||||
testGroup("plugins/lombok/tests-gen", "plugins/lombok/testData") {
|
||||
testClass<AbstractBlackBoxCodegenTestForLombok> {
|
||||
model("compile")
|
||||
model("box")
|
||||
}
|
||||
testClass<AbstractIrBlackBoxCodegenTestForLombok> {
|
||||
model("compile")
|
||||
model("box")
|
||||
}
|
||||
testClass<AbstractDiagnosticTestForLombok> {
|
||||
model("diagnostics")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-7
@@ -7,7 +7,6 @@ import lombok.experimental.*;
|
||||
@Setter
|
||||
@Accessors(prefix = { "f", "field" })
|
||||
public class AccessorsTest {
|
||||
// @Accessors
|
||||
private int age = 10;
|
||||
private int fTarget = 42;
|
||||
private String fieldValue;
|
||||
@@ -22,9 +21,6 @@ public class AccessorsTest {
|
||||
{
|
||||
val obj = new AccessorsTest ();
|
||||
|
||||
// obj.getAge();
|
||||
// obj.setAge(123);
|
||||
|
||||
obj.getTarget();
|
||||
obj.setTarget(34);
|
||||
|
||||
@@ -49,9 +45,6 @@ public class AccessorsTest {
|
||||
fun box(): String {
|
||||
val obj = AccessorsTest()
|
||||
|
||||
// obj.getAge()
|
||||
// obj.setAge(123)
|
||||
|
||||
obj.getTarget()
|
||||
obj.setTarget(34)
|
||||
|
||||
-7
@@ -5,7 +5,6 @@ import lombok.experimental.*;
|
||||
|
||||
@Getter @Setter
|
||||
public class AccessorsTest {
|
||||
// @Accessors
|
||||
private int age = 10;
|
||||
private int fTarget = 42;
|
||||
private String fieldValue;
|
||||
@@ -19,9 +18,6 @@ public class AccessorsTest {
|
||||
static void test() {
|
||||
val obj = new AccessorsTest();
|
||||
|
||||
// obj.getAge();
|
||||
// obj.setAge(123);
|
||||
|
||||
obj.getTarget();
|
||||
obj.setTarget(34);
|
||||
|
||||
@@ -46,9 +42,6 @@ public class AccessorsTest {
|
||||
fun box(): String {
|
||||
val obj = AccessorsTest()
|
||||
|
||||
// obj.getAge()
|
||||
// obj.setAge(123)
|
||||
|
||||
obj.getTarget()
|
||||
obj.setTarget(34)
|
||||
|
||||
Vendored
+1
-1
@@ -29,4 +29,4 @@ fun box(): String {
|
||||
|
||||
// FILE: lombok.config
|
||||
lombok.accessors.fluent=true
|
||||
//lombok.accessors.chain=false
|
||||
#lombok.accessors.chain=false
|
||||
Vendored
Vendored
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
//KT-47455
|
||||
// KT-47455
|
||||
|
||||
// FILE: ParentClass.java
|
||||
public abstract class ParentClass {
|
||||
+5
-5
@@ -1,4 +1,5 @@
|
||||
//KT-46529
|
||||
// FIR_IDENTICAL
|
||||
// KT-46529
|
||||
|
||||
// FILE: PrefixJava.java
|
||||
|
||||
@@ -15,13 +16,12 @@ public class PrefixJava {
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String {
|
||||
fun test() {
|
||||
//not generated because doesn't have prefix from class level @Accessors
|
||||
//assertEquals(PrefixJava().propA, "A")
|
||||
assertEquals(PrefixJava().<!UNRESOLVED_REFERENCE!>propA<!>, "A")
|
||||
//not generated because doesn't have prefix from config
|
||||
//assertEquals(PrefixJava().propC, "C")
|
||||
assertEquals(PrefixJava().<!UNRESOLVED_REFERENCE!>propC<!>, "C")
|
||||
assertEquals(PrefixJava().propD, "D")
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: lombok.config
|
||||
@@ -0,0 +1,16 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> assertEquals(/*0*/ a: T, /*1*/ b: T): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
@lombok.Getter @lombok.Setter @lombok.experimental.Accessors(chain = false, fluent = true, prefix = {"pxo"}) public open class PrefixJava {
|
||||
public constructor PrefixJava()
|
||||
private final var pxaPropA: kotlin.String!
|
||||
@lombok.experimental.Accessors private final var pxaPropD: kotlin.String!
|
||||
@lombok.experimental.Accessors(chain = true) private final var pxoPropC: kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open /*synthesized*/ fun getPropD(): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open /*synthesized*/ fun setPropD(/*0*/ pxaPropD: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// IGNORE_ERRORS
|
||||
// FIR_IDENTICAL
|
||||
// FILE: Anno.java
|
||||
|
||||
import java.lang.*;
|
||||
@@ -0,0 +1,21 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> assertEquals(/*0*/ a: T, /*1*/ b: T): kotlin.Unit
|
||||
@Anno public fun box(): kotlin.String
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FILE}) @kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) public final annotation class Anno : kotlin.Annotation {
|
||||
public constructor Anno(/*0*/ value: kotlin.String = ...)
|
||||
public final val value: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class Foo {
|
||||
public constructor Foo()
|
||||
private final var age: kotlin.Int!
|
||||
private final var name: kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+4
-4
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: SuperClass.java
|
||||
|
||||
import lombok.*;
|
||||
@@ -79,13 +80,13 @@ class KotlinChildClass : ClashTest() {
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
fun test() {
|
||||
val obj = ClashTest()
|
||||
|
||||
obj.getAge()
|
||||
//thats shouldn't work because lombok doesn't generate clashing method
|
||||
// obj.setAge(41)
|
||||
// obj.age = 12
|
||||
obj.setAge(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>41<!>)
|
||||
<!VAL_REASSIGNMENT!>obj.age<!> = 12
|
||||
val age = obj.age
|
||||
|
||||
|
||||
@@ -105,5 +106,4 @@ fun box(): String {
|
||||
childObj.setToOverride(34)
|
||||
childObj.toOverride
|
||||
childObj.toOverride = 412
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> assertEquals(/*0*/ a: T, /*1*/ b: T): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public open class ChildClass : ClashTest {
|
||||
public constructor ChildClass()
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var age: kotlin.Int
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var human: kotlin.Boolean
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var name: kotlin.String!
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var toOverride: kotlin.Int!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun getAge(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun getName(): kotlin.String!
|
||||
@java.lang.Override public open override /*1*/ fun getToOverride(): kotlin.Int!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun isHuman(): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun isHuman(/*0*/ arg: kotlin.String!): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun setAge(/*0*/ age: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun setHuman(/*0*/ human: kotlin.Boolean): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun setName(/*0*/ name: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun setToOverride(/*0*/ toOverride: kotlin.Int!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun test(): kotlin.Unit
|
||||
}
|
||||
|
||||
@lombok.Getter @lombok.Setter public open class ClashTest : SuperClass {
|
||||
public constructor ClashTest()
|
||||
private final var age: kotlin.Int
|
||||
private final var human: kotlin.Boolean
|
||||
private final var name: kotlin.String!
|
||||
private final var toOverride: kotlin.Int!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open fun getAge(): kotlin.Int
|
||||
public open /*synthesized*/ fun getName(): kotlin.String!
|
||||
public open /*synthesized*/ fun getToOverride(): kotlin.Int!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open /*synthesized*/ fun isHuman(): kotlin.Boolean
|
||||
public open fun isHuman(/*0*/ arg: kotlin.String!): kotlin.Boolean
|
||||
public open fun setAge(/*0*/ age: kotlin.String!): kotlin.Unit
|
||||
public open /*synthesized*/ fun setHuman(/*0*/ human: kotlin.Boolean): kotlin.Unit
|
||||
public open override /*1*/ /*synthesized*/ fun setName(/*0*/ name: kotlin.String!): kotlin.Unit
|
||||
public open /*synthesized*/ fun setToOverride(/*0*/ toOverride: kotlin.Int!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public/*package*/ open fun test(): kotlin.Unit
|
||||
}
|
||||
|
||||
public final class KotlinChildClass : ClashTest {
|
||||
public constructor KotlinChildClass()
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var age: kotlin.Int
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var human: kotlin.Boolean
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var name: kotlin.String!
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var toOverride: kotlin.Int!
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun getAge(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun getName(): kotlin.String!
|
||||
public open override /*1*/ fun getToOverride(): kotlin.Int?
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun isHuman(): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun isHuman(/*0*/ arg: kotlin.String!): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun setAge(/*0*/ age: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun setHuman(/*0*/ human: kotlin.Boolean): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun setName(/*0*/ name: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun setToOverride(/*0*/ toOverride: kotlin.Int!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class SuperClass {
|
||||
public constructor SuperClass()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun setName(/*0*/ name: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+5
-5
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: GetterTest.java
|
||||
|
||||
import lombok.AccessLevel;
|
||||
@@ -25,25 +26,24 @@ public class GetterTest {
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String {
|
||||
fun test() {
|
||||
val obj = GetterTest()
|
||||
val getter = obj.getAge()
|
||||
val property = obj.age
|
||||
|
||||
//todo kotlin doesn't seee isBoolean methods as property
|
||||
// obj.primitiveBoolean
|
||||
obj.<!INVISIBLE_MEMBER!>primitiveBoolean<!>
|
||||
obj.isPrimitiveBoolean()
|
||||
|
||||
obj.boxedBoolean
|
||||
obj.getBoxedBoolean()
|
||||
|
||||
//shouldn't be accesible from here
|
||||
// obj.getName()
|
||||
obj.<!INVISIBLE_MEMBER!>getName<!>()
|
||||
|
||||
// obj.getInvisible()
|
||||
obj.<!UNRESOLVED_REFERENCE!>getInvisible<!>()
|
||||
|
||||
OverridenGetterTest().usage()
|
||||
return "OK"
|
||||
}
|
||||
|
||||
class OverridenGetterTest : GetterTest() {
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> assertEquals(/*0*/ a: T, /*1*/ b: T): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public open class GetterTest {
|
||||
public constructor GetterTest()
|
||||
@lombok.Getter private final var age: kotlin.Int
|
||||
@lombok.Getter private final var boxedBoolean: kotlin.Boolean!
|
||||
@lombok.Getter(value = AccessLevel.NONE) private final var invisible: kotlin.Boolean!
|
||||
@lombok.Getter(value = AccessLevel.PROTECTED) private final var name: kotlin.String!
|
||||
@lombok.Getter private final var primitiveBoolean: kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open /*synthesized*/ fun getAge(): kotlin.Int
|
||||
public open /*synthesized*/ fun getBoxedBoolean(): kotlin.Boolean!
|
||||
protected open /*synthesized*/ fun getName(): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open /*synthesized*/ fun isPrimitiveBoolean(): kotlin.Boolean
|
||||
public/*package*/ open fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class OverridenGetterTest : GetterTest {
|
||||
public constructor OverridenGetterTest()
|
||||
@lombok.Getter invisible_fake final override /*1*/ /*fake_override*/ var age: kotlin.Int
|
||||
@lombok.Getter invisible_fake final override /*1*/ /*fake_override*/ var boxedBoolean: kotlin.Boolean!
|
||||
@lombok.Getter(value = AccessLevel.NONE) invisible_fake final override /*1*/ /*fake_override*/ var invisible: kotlin.Boolean!
|
||||
@lombok.Getter(value = AccessLevel.PROTECTED) invisible_fake final override /*1*/ /*fake_override*/ var name: kotlin.String!
|
||||
@lombok.Getter invisible_fake final override /*1*/ /*fake_override*/ var primitiveBoolean: kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun getAge(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun getBoxedBoolean(): kotlin.Boolean!
|
||||
protected open override /*1*/ /*fake_override*/ fun getName(): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun isPrimitiveBoolean(): kotlin.Boolean
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun usage(): kotlin.Unit
|
||||
}
|
||||
+3
-3
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: ClassLevelGetterTest.java
|
||||
|
||||
import lombok.AccessLevel;
|
||||
@@ -23,7 +24,7 @@ public class ClassLevelGetterTest {
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String {
|
||||
fun test() {
|
||||
val obj = ClassLevelGetterTest()
|
||||
val getter = obj.getAge()
|
||||
val property = obj.age
|
||||
@@ -34,10 +35,9 @@ fun box(): String {
|
||||
obj.getBoxedBoolean()
|
||||
|
||||
//shouldn't be accesible from here
|
||||
// obj.getName()
|
||||
obj.<!INVISIBLE_MEMBER!>getName<!>()
|
||||
|
||||
OverridenGetterTest().usage()
|
||||
return "OK"
|
||||
}
|
||||
|
||||
class OverridenGetterTest : ClassLevelGetterTest() {
|
||||
@@ -0,0 +1,37 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> assertEquals(/*0*/ a: T, /*1*/ b: T): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
@lombok.Getter public open class ClassLevelGetterTest {
|
||||
public constructor ClassLevelGetterTest()
|
||||
private final var age: kotlin.Int
|
||||
private final var boxedBoolean: kotlin.Boolean!
|
||||
@lombok.Getter(value = AccessLevel.PROTECTED) private final var name: kotlin.String!
|
||||
private final var primitiveBoolean: kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open /*synthesized*/ fun getAge(): kotlin.Int
|
||||
public open /*synthesized*/ fun getBoxedBoolean(): kotlin.Boolean!
|
||||
protected open /*synthesized*/ fun getName(): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open /*synthesized*/ fun isPrimitiveBoolean(): kotlin.Boolean
|
||||
public/*package*/ open fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class OverridenGetterTest : ClassLevelGetterTest {
|
||||
public constructor OverridenGetterTest()
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var age: kotlin.Int
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var boxedBoolean: kotlin.Boolean!
|
||||
@lombok.Getter(value = AccessLevel.PROTECTED) invisible_fake final override /*1*/ /*fake_override*/ var name: kotlin.String!
|
||||
invisible_fake final override /*1*/ /*fake_override*/ var primitiveBoolean: kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun getAge(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun getBoxedBoolean(): kotlin.Boolean!
|
||||
protected open override /*1*/ /*fake_override*/ fun getName(): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun isPrimitiveBoolean(): kotlin.Boolean
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun usage(): kotlin.Unit
|
||||
}
|
||||
Vendored
+4
-4
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: SetterTest.java
|
||||
|
||||
import lombok.AccessLevel;
|
||||
@@ -20,20 +21,19 @@ public class SetterTest {
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String {
|
||||
fun test() {
|
||||
val obj = SetterTest()
|
||||
obj.setAge(42)
|
||||
obj.age = 42
|
||||
|
||||
//synthetic property generated only when there is a getter
|
||||
// obj.primitiveBoolean = false
|
||||
obj.<!INVISIBLE_MEMBER!>primitiveBoolean<!> = false
|
||||
obj.setPrimitiveBoolean(true)
|
||||
|
||||
//shouldn't be accesible from here
|
||||
// obj.setName("abc")
|
||||
obj.<!INVISIBLE_MEMBER!>setName<!>("abc")
|
||||
|
||||
OverridenGetterTest().usage()
|
||||
return "OK"
|
||||
}
|
||||
|
||||
class OverridenGetterTest : SetterTest() {
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> assertEquals(/*0*/ a: T, /*1*/ b: T): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public final class OverridenGetterTest : SetterTest {
|
||||
public constructor OverridenGetterTest()
|
||||
@lombok.Getter @lombok.Setter invisible_fake final override /*1*/ /*fake_override*/ var age: kotlin.Int
|
||||
@lombok.Setter(value = AccessLevel.PROTECTED) invisible_fake final override /*1*/ /*fake_override*/ var name: kotlin.String!
|
||||
@lombok.Setter invisible_fake final override /*1*/ /*fake_override*/ var primitiveBoolean: kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun getAge(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun setAge(/*0*/ age: kotlin.Int): kotlin.Unit
|
||||
protected open override /*1*/ /*fake_override*/ fun setName(/*0*/ name: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun setPrimitiveBoolean(/*0*/ primitiveBoolean: kotlin.Boolean): kotlin.Unit
|
||||
public/*package*/ open override /*1*/ /*fake_override*/ fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun usage(): kotlin.Unit
|
||||
}
|
||||
|
||||
public open class SetterTest {
|
||||
public constructor SetterTest()
|
||||
@lombok.Getter @lombok.Setter private final var age: kotlin.Int
|
||||
@lombok.Setter(value = AccessLevel.PROTECTED) private final var name: kotlin.String!
|
||||
@lombok.Setter private final var primitiveBoolean: kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open /*synthesized*/ fun getAge(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open /*synthesized*/ fun setAge(/*0*/ age: kotlin.Int): kotlin.Unit
|
||||
protected open /*synthesized*/ fun setName(/*0*/ name: kotlin.String!): kotlin.Unit
|
||||
public open /*synthesized*/ fun setPrimitiveBoolean(/*0*/ primitiveBoolean: kotlin.Boolean): kotlin.Unit
|
||||
public/*package*/ open fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+3
-3
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: SetterTest.java
|
||||
|
||||
import lombok.AccessLevel;
|
||||
@@ -23,7 +24,7 @@ public class SetterTest {
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String {
|
||||
fun test() {
|
||||
val obj = SetterTest()
|
||||
obj.setAge(42)
|
||||
assertEquals(obj.age, 42)
|
||||
@@ -33,7 +34,6 @@ fun box(): String {
|
||||
obj.setPrimitiveBoolean(true)
|
||||
|
||||
// no setters generated for final variable
|
||||
// obj.setFinalName("error")
|
||||
return "OK"
|
||||
obj.<!UNRESOLVED_REFERENCE!>setFinalName<!>("error")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> assertEquals(/*0*/ a: T, /*1*/ b: T): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
@lombok.Getter @lombok.Setter public open class SetterTest {
|
||||
public constructor SetterTest()
|
||||
private final var age: kotlin.Int
|
||||
private final val finalName: kotlin.String! = "zzz"
|
||||
private final var primitiveBoolean: kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open /*synthesized*/ fun getAge(): kotlin.Int
|
||||
public open /*synthesized*/ fun getFinalName(): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open /*synthesized*/ fun isPrimitiveBoolean(): kotlin.Boolean
|
||||
public open /*synthesized*/ fun setAge(/*0*/ age: kotlin.Int): kotlin.Unit
|
||||
public open /*synthesized*/ fun setPrimitiveBoolean(/*0*/ primitiveBoolean: kotlin.Boolean): kotlin.Unit
|
||||
public/*package*/ open fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Generated
+26
-78
@@ -17,201 +17,149 @@ import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/lombok/testData/compile")
|
||||
@TestMetadata("plugins/lombok/testData/box")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class BlackBoxCodegenTestForLombokGenerated extends AbstractBlackBoxCodegenTestForLombok {
|
||||
@Test
|
||||
@TestMetadata("accessorsStripPrefix.kt")
|
||||
public void testAccessorsStripPrefix() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/accessorsStripPrefix.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessorsStripPrefixCombined.kt")
|
||||
public void testAccessorsStripPrefixCombined() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/accessorsStripPrefixCombined.kt");
|
||||
runTest("plugins/lombok/testData/box/accessorsStripPrefix.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessorsStripPrefixConfig.kt")
|
||||
public void testAccessorsStripPrefixConfig() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/accessorsStripPrefixConfig.kt");
|
||||
runTest("plugins/lombok/testData/box/accessorsStripPrefixConfig.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("allArgsConstructor.kt")
|
||||
public void testAllArgsConstructor() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/allArgsConstructor.kt");
|
||||
runTest("plugins/lombok/testData/box/allArgsConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("allArgsConstructorStatic.kt")
|
||||
public void testAllArgsConstructorStatic() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/allArgsConstructorStatic.kt");
|
||||
runTest("plugins/lombok/testData/box/allArgsConstructorStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInCompile() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/lombok/testData/compile"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("clashAccessors.kt")
|
||||
public void testClashAccessors() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/clashAccessors.kt");
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/lombok/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("configAccessors.kt")
|
||||
public void testConfigAccessors() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/configAccessors.kt");
|
||||
runTest("plugins/lombok/testData/box/configAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("configAccessorsOverride.kt")
|
||||
public void testConfigAccessorsOverride() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/configAccessorsOverride.kt");
|
||||
runTest("plugins/lombok/testData/box/configAccessorsOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("configCaseInsensitive.kt")
|
||||
public void testConfigCaseInsensitive() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/configCaseInsensitive.kt");
|
||||
runTest("plugins/lombok/testData/box/configCaseInsensitive.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("configSimple.kt")
|
||||
public void testConfigSimple() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/configSimple.kt");
|
||||
runTest("plugins/lombok/testData/box/configSimple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("data.kt")
|
||||
public void testData() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/data.kt");
|
||||
runTest("plugins/lombok/testData/box/data.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericsAccessors.kt")
|
||||
public void testGenericsAccessors() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/genericsAccessors.kt");
|
||||
runTest("plugins/lombok/testData/box/genericsAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericsConstructors.kt")
|
||||
public void testGenericsConstructors() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/genericsConstructors.kt");
|
||||
runTest("plugins/lombok/testData/box/genericsConstructors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericsConstructorsStatic.kt")
|
||||
public void testGenericsConstructorsStatic() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/genericsConstructorsStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("getters.kt")
|
||||
public void testGetters() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/getters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("gettersClassLevel.kt")
|
||||
public void testGettersClassLevel() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/gettersClassLevel.kt");
|
||||
runTest("plugins/lombok/testData/box/genericsConstructorsStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("gettersFluent.kt")
|
||||
public void testGettersFluent() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/gettersFluent.kt");
|
||||
runTest("plugins/lombok/testData/box/gettersFluent.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noArgsConstructor.kt")
|
||||
public void testNoArgsConstructor() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/noArgsConstructor.kt");
|
||||
runTest("plugins/lombok/testData/box/noArgsConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noArgsConstructorStatic.kt")
|
||||
public void testNoArgsConstructorStatic() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/noArgsConstructorStatic.kt");
|
||||
runTest("plugins/lombok/testData/box/noArgsConstructorStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullability.kt")
|
||||
public void testNullability() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/nullability.kt");
|
||||
runTest("plugins/lombok/testData/box/nullability.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyFromSuper.kt")
|
||||
public void testPropertyFromSuper() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/propertyFromSuper.kt");
|
||||
runTest("plugins/lombok/testData/box/propertyFromSuper.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("requiredArgsConstructor.kt")
|
||||
public void testRequiredArgsConstructor() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/requiredArgsConstructor.kt");
|
||||
runTest("plugins/lombok/testData/box/requiredArgsConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("requiredArgsConstructorStatic.kt")
|
||||
public void testRequiredArgsConstructorStatic() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/requiredArgsConstructorStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("setters.kt")
|
||||
public void testSetters() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/setters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("settersClassLevel.kt")
|
||||
public void testSettersClassLevel() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/settersClassLevel.kt");
|
||||
runTest("plugins/lombok/testData/box/requiredArgsConstructorStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("settersVariations.kt")
|
||||
public void testSettersVariations() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/settersVariations.kt");
|
||||
runTest("plugins/lombok/testData/box/settersVariations.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/simple.kt");
|
||||
runTest("plugins/lombok/testData/box/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("value.kt")
|
||||
public void testValue() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/value.kt");
|
||||
runTest("plugins/lombok/testData/box/value.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("with.kt")
|
||||
public void testWith() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/with.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("plugins/lombok/testData/compile/processErrors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ProcessErrors {
|
||||
@Test
|
||||
public void testAllFilesPresentInProcessErrors() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/lombok/testData/compile/processErrors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationTypes.kt")
|
||||
public void testAnnotationTypes() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/processErrors/annotationTypes.kt");
|
||||
}
|
||||
runTest("plugins/lombok/testData/box/with.kt");
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+68
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.lombok;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/lombok/testData/diagnostics")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DiagnosticTestForLombokGenerated extends AbstractDiagnosticTestForLombok {
|
||||
@Test
|
||||
@TestMetadata("accessorsStripPrefixCombined.kt")
|
||||
public void testAccessorsStripPrefixCombined() throws Exception {
|
||||
runTest("plugins/lombok/testData/diagnostics/accessorsStripPrefixCombined.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInDiagnostics() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/lombok/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationTypes.kt")
|
||||
public void testAnnotationTypes() throws Exception {
|
||||
runTest("plugins/lombok/testData/diagnostics/annotationTypes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("clashAccessors.kt")
|
||||
public void testClashAccessors() throws Exception {
|
||||
runTest("plugins/lombok/testData/diagnostics/clashAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("getters.kt")
|
||||
public void testGetters() throws Exception {
|
||||
runTest("plugins/lombok/testData/diagnostics/getters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("gettersClassLevel.kt")
|
||||
public void testGettersClassLevel() throws Exception {
|
||||
runTest("plugins/lombok/testData/diagnostics/gettersClassLevel.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("setters.kt")
|
||||
public void testSetters() throws Exception {
|
||||
runTest("plugins/lombok/testData/diagnostics/setters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("settersClassLevel.kt")
|
||||
public void testSettersClassLevel() throws Exception {
|
||||
runTest("plugins/lombok/testData/diagnostics/settersClassLevel.kt");
|
||||
}
|
||||
}
|
||||
Generated
+26
-78
@@ -17,201 +17,149 @@ import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/lombok/testData/compile")
|
||||
@TestMetadata("plugins/lombok/testData/box")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class IrBlackBoxCodegenTestForLombokGenerated extends AbstractIrBlackBoxCodegenTestForLombok {
|
||||
@Test
|
||||
@TestMetadata("accessorsStripPrefix.kt")
|
||||
public void testAccessorsStripPrefix() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/accessorsStripPrefix.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessorsStripPrefixCombined.kt")
|
||||
public void testAccessorsStripPrefixCombined() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/accessorsStripPrefixCombined.kt");
|
||||
runTest("plugins/lombok/testData/box/accessorsStripPrefix.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("accessorsStripPrefixConfig.kt")
|
||||
public void testAccessorsStripPrefixConfig() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/accessorsStripPrefixConfig.kt");
|
||||
runTest("plugins/lombok/testData/box/accessorsStripPrefixConfig.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("allArgsConstructor.kt")
|
||||
public void testAllArgsConstructor() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/allArgsConstructor.kt");
|
||||
runTest("plugins/lombok/testData/box/allArgsConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("allArgsConstructorStatic.kt")
|
||||
public void testAllArgsConstructorStatic() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/allArgsConstructorStatic.kt");
|
||||
runTest("plugins/lombok/testData/box/allArgsConstructorStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInCompile() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/lombok/testData/compile"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("clashAccessors.kt")
|
||||
public void testClashAccessors() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/clashAccessors.kt");
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/lombok/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("configAccessors.kt")
|
||||
public void testConfigAccessors() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/configAccessors.kt");
|
||||
runTest("plugins/lombok/testData/box/configAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("configAccessorsOverride.kt")
|
||||
public void testConfigAccessorsOverride() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/configAccessorsOverride.kt");
|
||||
runTest("plugins/lombok/testData/box/configAccessorsOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("configCaseInsensitive.kt")
|
||||
public void testConfigCaseInsensitive() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/configCaseInsensitive.kt");
|
||||
runTest("plugins/lombok/testData/box/configCaseInsensitive.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("configSimple.kt")
|
||||
public void testConfigSimple() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/configSimple.kt");
|
||||
runTest("plugins/lombok/testData/box/configSimple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("data.kt")
|
||||
public void testData() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/data.kt");
|
||||
runTest("plugins/lombok/testData/box/data.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericsAccessors.kt")
|
||||
public void testGenericsAccessors() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/genericsAccessors.kt");
|
||||
runTest("plugins/lombok/testData/box/genericsAccessors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericsConstructors.kt")
|
||||
public void testGenericsConstructors() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/genericsConstructors.kt");
|
||||
runTest("plugins/lombok/testData/box/genericsConstructors.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericsConstructorsStatic.kt")
|
||||
public void testGenericsConstructorsStatic() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/genericsConstructorsStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("getters.kt")
|
||||
public void testGetters() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/getters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("gettersClassLevel.kt")
|
||||
public void testGettersClassLevel() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/gettersClassLevel.kt");
|
||||
runTest("plugins/lombok/testData/box/genericsConstructorsStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("gettersFluent.kt")
|
||||
public void testGettersFluent() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/gettersFluent.kt");
|
||||
runTest("plugins/lombok/testData/box/gettersFluent.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noArgsConstructor.kt")
|
||||
public void testNoArgsConstructor() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/noArgsConstructor.kt");
|
||||
runTest("plugins/lombok/testData/box/noArgsConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("noArgsConstructorStatic.kt")
|
||||
public void testNoArgsConstructorStatic() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/noArgsConstructorStatic.kt");
|
||||
runTest("plugins/lombok/testData/box/noArgsConstructorStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullability.kt")
|
||||
public void testNullability() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/nullability.kt");
|
||||
runTest("plugins/lombok/testData/box/nullability.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("propertyFromSuper.kt")
|
||||
public void testPropertyFromSuper() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/propertyFromSuper.kt");
|
||||
runTest("plugins/lombok/testData/box/propertyFromSuper.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("requiredArgsConstructor.kt")
|
||||
public void testRequiredArgsConstructor() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/requiredArgsConstructor.kt");
|
||||
runTest("plugins/lombok/testData/box/requiredArgsConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("requiredArgsConstructorStatic.kt")
|
||||
public void testRequiredArgsConstructorStatic() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/requiredArgsConstructorStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("setters.kt")
|
||||
public void testSetters() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/setters.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("settersClassLevel.kt")
|
||||
public void testSettersClassLevel() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/settersClassLevel.kt");
|
||||
runTest("plugins/lombok/testData/box/requiredArgsConstructorStatic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("settersVariations.kt")
|
||||
public void testSettersVariations() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/settersVariations.kt");
|
||||
runTest("plugins/lombok/testData/box/settersVariations.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/simple.kt");
|
||||
runTest("plugins/lombok/testData/box/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("value.kt")
|
||||
public void testValue() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/value.kt");
|
||||
runTest("plugins/lombok/testData/box/value.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("with.kt")
|
||||
public void testWith() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/with.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("plugins/lombok/testData/compile/processErrors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class ProcessErrors {
|
||||
@Test
|
||||
public void testAllFilesPresentInProcessErrors() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/lombok/testData/compile/processErrors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotationTypes.kt")
|
||||
public void testAnnotationTypes() throws Exception {
|
||||
runTest("plugins/lombok/testData/compile/processErrors/annotationTypes.kt");
|
||||
}
|
||||
runTest("plugins/lombok/testData/box/with.kt");
|
||||
}
|
||||
}
|
||||
|
||||
+14
@@ -13,12 +13,15 @@ import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
|
||||
import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives
|
||||
import org.jetbrains.kotlin.test.model.TestFile
|
||||
import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.runners.AbstractDiagnosticTest
|
||||
import org.jetbrains.kotlin.test.runners.codegen.AbstractBlackBoxCodegenTest
|
||||
import org.jetbrains.kotlin.test.runners.codegen.AbstractIrBlackBoxCodegenTest
|
||||
import org.jetbrains.kotlin.test.services.*
|
||||
import org.jetbrains.kotlin.utils.PathUtil
|
||||
import java.io.File
|
||||
|
||||
// ---------------------------- box ----------------------------
|
||||
|
||||
open class AbstractBlackBoxCodegenTestForLombok : AbstractBlackBoxCodegenTest() {
|
||||
override fun configure(builder: TestConfigurationBuilder) {
|
||||
super.configure(builder)
|
||||
@@ -33,6 +36,17 @@ open class AbstractIrBlackBoxCodegenTestForLombok : AbstractIrBlackBoxCodegenTes
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------- diagnostics ----------------------------
|
||||
|
||||
open class AbstractDiagnosticTestForLombok : AbstractDiagnosticTest() {
|
||||
override fun configure(builder: TestConfigurationBuilder) {
|
||||
super.configure(builder)
|
||||
builder.enableLombok()
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------- configuration ----------------------------
|
||||
|
||||
fun TestConfigurationBuilder.enableLombok() {
|
||||
useConfigurators(::LombokEnvironmentConfigurator)
|
||||
useAdditionalSourceProviders(::LombokAdditionalSourceFileProvider)
|
||||
Reference in New Issue
Block a user