Added tests for 'open' modifier checks

This commit is contained in:
svtk
2011-09-29 14:20:57 +04:00
parent ea9e1bee85
commit 7ec15fd00a
24 changed files with 78 additions and 20 deletions
@@ -0,0 +1,2 @@
// "Remove 'final' modifier" "true"
<caret>trait A {}
@@ -0,0 +1,5 @@
// "Make 'i' open" "true"
open class A() {
open val i: Int = 1
<caret>open get(): Int = $i
}
@@ -0,0 +1,5 @@
// "Make 'get' not open" "true"
open class A() {
val i: Int = 1
<caret>get(): Int = $i
}
@@ -0,0 +1,4 @@
// "Make 'A' open" "true"
open class A() {
<caret>open fun foo() {}
}
@@ -0,0 +1,4 @@
// "Make 'foo' not open" "true"
class A() {
<caret>fun foo() {}
}
@@ -0,0 +1,2 @@
// "Remove 'final' modifier" "true"
<caret>final trait A {}
@@ -0,0 +1,5 @@
// "Make 'i' open" "true"
open class A() {
val i: Int = 1
<caret>open get(): Int = $i
}
@@ -0,0 +1,5 @@
// "Make 'get' not open" "true"
open class A() {
val i: Int = 1
<caret>open get(): Int = $i
}
@@ -0,0 +1,4 @@
// "Make 'A' open" "true"
class A() {
<caret>open fun foo() {}
}
@@ -0,0 +1,4 @@
// "Make 'foo' not open" "true"
class A() {
<caret>open fun foo() {}
}