Added more quickfixes; added tests

This commit is contained in:
svtk
2011-09-21 17:58:44 +04:00
parent e6c871aecc
commit 7f815176f6
96 changed files with 1357 additions and 147 deletions
@@ -0,0 +1,4 @@
// "Make 'foo' not abstract" "true"
class A() {
<caret>fun foo()
}
@@ -0,0 +1,4 @@
// "Remove function body" "true"
abstract class A() {
<caret>abstract fun foo()
}
@@ -0,0 +1,4 @@
// "Make 'A' abstract" "true"
abstract class A() {
<caret>abstract var i : Int
}
@@ -0,0 +1,4 @@
// "Make 'i' not abstract" "true"
class A() {
<caret>var i : Int
}
@@ -0,0 +1,2 @@
// "Make 'i' not abstract" "true"
class A(<caret>val i: Int) {}
@@ -0,0 +1,2 @@
// "Make 'i' not abstract" "true"
<caret>val i: Int = 1
@@ -0,0 +1,4 @@
// "Remove initializer from property" "true"
abstract class A {
abstract var i : Int<caret>
}
@@ -0,0 +1,4 @@
// "Remove initializer from property" "true"
abstract class A {
abstract var i : Int<caret>
}
@@ -0,0 +1,5 @@
// "Make 'i' not abstract" "true"
class B {
<caret>val i: Int
get() = $i
}
@@ -0,0 +1,5 @@
// "Remove getter and initializer from property" "true"
abstract class B {
abstract val i : <caret>Int
}
@@ -0,0 +1,4 @@
// "Make 'i' not abstract" "true"
class A {
<caret>var i = 0
}
@@ -0,0 +1,5 @@
// "Make 'j' not abstract" "true"
class B {
<caret>var j: Int
set(v: Int) {}
}
@@ -0,0 +1,4 @@
// "Make 'i' abstract" "true"
abstract class A() {
abstract var <caret>i : Int
}
@@ -0,0 +1,4 @@
// "Add function body" "true"
class A() {
fun <caret>foo() {}
}
@@ -0,0 +1,2 @@
// "Make 'abstract get' not abstract" "true"
val i : Int = 0; <caret>get
@@ -0,0 +1,2 @@
// "Make 'foo' not abstract" "true"
<caret>fun foo()
@@ -0,0 +1,4 @@
// "Add function body" "true"
namespace a {
fun <caret>foo() {}
}
@@ -0,0 +1,4 @@
// "Make 'foo' not abstract" "true"
trait A {
<caret>fun foo()
}
@@ -0,0 +1,4 @@
// "Make 'foo' abstract" "true"
abstract class B() {
abstract fun <caret>foo()
}
@@ -0,0 +1,4 @@
// "Make 'foo' not abstract" "true"
class A() {
<caret>abstract fun foo()
}
@@ -0,0 +1,4 @@
// "Remove function body" "true"
abstract class A() {
<caret>abstract fun foo() {}
}
@@ -0,0 +1,4 @@
// "Make 'A' abstract" "true"
class A() {
<caret>abstract var i : Int
}
@@ -0,0 +1,4 @@
// "Make 'i' not abstract" "true"
class A() {
<caret>abstract var i : Int
}
@@ -0,0 +1,2 @@
// "Make 'i' not abstract" "true"
class A(<caret>abstract val i: Int) {}
@@ -0,0 +1,2 @@
// "Make 'i' not abstract" "true"
<caret>abstract val i: Int = 1
@@ -0,0 +1,4 @@
// "Remove initializer from property" "true"
abstract class A {
abstract var i = 0<caret>
}
@@ -0,0 +1,4 @@
// "Remove initializer from property" "true"
abstract class A {
abstract var i : Int = 0<caret>
}
@@ -0,0 +1,5 @@
// "Make 'i' not abstract" "true"
class B {
<caret>abstract val i: Int
get() = $i
}
@@ -0,0 +1,5 @@
// "Remove getter and initializer from property" "true"
abstract class B {
abstract val i = <caret>0
get() = $i
}
@@ -0,0 +1,4 @@
// "Make 'i' not abstract" "true"
class A {
<caret>abstract var i = 0
}
@@ -0,0 +1,5 @@
// "Make 'j' not abstract" "true"
class B {
abstract<caret> var j: Int
set(v: Int) {}
}
@@ -0,0 +1,4 @@
// "Make 'foo' abstract" "false"
class B() {
final fun <caret>foo()
}
@@ -0,0 +1,4 @@
// "Make 'i' abstract" "true"
abstract class A() {
var <caret>i : Int
}
@@ -0,0 +1,4 @@
// "Add function body" "true"
class A() {
fun <caret>foo()
}
@@ -0,0 +1,2 @@
// "Make 'abstract get' not abstract" "true"
val i : Int = 0; <caret>abstract get
@@ -0,0 +1,2 @@
// "Make 'foo' not abstract" "true"
<caret>abstract fun foo()
@@ -0,0 +1,4 @@
// "Add function body" "true"
namespace a {
fun <caret>foo()
}
@@ -0,0 +1,4 @@
// "Make 'foo' not abstract" "true"
trait A {
<caret>abstract fun foo()
}
@@ -0,0 +1,4 @@
// "Make 'foo' abstract" "true"
abstract class B() {
open fun <caret>foo()
}