Fixed a quick fix for enum entry short super constructor syntax (situation with a preceding comment / annotation). Four extra tests. isAvailable().

This commit is contained in:
Mikhail Glukhikh
2015-05-18 15:41:08 +03:00
parent 62e9c31987
commit 6342b98592
10 changed files with 135 additions and 2 deletions
@@ -0,0 +1,11 @@
// "Change to short enum entry super constructor in the whole project" "true"
annotation class My
annotation class Your
annotation class His
enum class MyEnum(val i: Int) {
@My FIRST: MyEnum(1)<caret>,
@My @Your SECOND: MyEnum(2),
@Your @His THIRD: MyEnum(3)
}
@@ -0,0 +1,11 @@
// "Change to short enum entry super constructor in the whole project" "true"
annotation class My
annotation class Your
annotation class His
enum class MyEnum(val i: Int) {
@My FIRST(1),
@My @Your SECOND(2),
@Your @His THIRD(3)
}
@@ -0,0 +1,10 @@
// "Change to short enum entry super constructor in the whole project" "true"
enum class MyEnum(val i: Int) {
// The first
FIRST: MyEnum(1)<caret>,
// The second
SECOND: MyEnum(2),
// The third
THIRD: MyEnum(3)
}
@@ -0,0 +1,10 @@
// "Change to short enum entry super constructor in the whole project" "true"
enum class MyEnum(val i: Int) {
// The first
FIRST(1),
// The second
SECOND(2),
// The third
THIRD(3)
}
@@ -0,0 +1,16 @@
// "Change to short enum entry super constructor in the whole project" "true"
enum class MyEnum(val i: Int) {
/**
* The first
*/
FIRST: MyEnum(1),
/**
* The second
*/
SECOND: MyEnum(2)<caret>,
/**
* The third
*/
THIRD: MyEnum(3)
}
@@ -0,0 +1,16 @@
// "Change to short enum entry super constructor in the whole project" "true"
enum class MyEnum(val i: Int) {
/**
* The first
*/
FIRST(1),
/**
* The second
*/
SECOND(2),
/**
* The third
*/
THIRD(3)
}
@@ -0,0 +1,13 @@
// "Change to short enum entry super constructor in the whole project" "true"
enum class MyEnum(val i: Int) {
// The
// first
FIRST: MyEnum(1),
// The
// second
SECOND: MyEnum(2),
// The
// third
THIRD: MyEnum(3)<caret>
}
@@ -0,0 +1,13 @@
// "Change to short enum entry super constructor in the whole project" "true"
enum class MyEnum(val i: Int) {
// The
// first
FIRST(1),
// The
// second
SECOND(2),
// The
// third
THIRD(3)
}