[IDEA-TESTS] Specify language version in feature-dependent tests
Some quickfixes are relying on diagnostics, that won't be reported with new language features enabled. `MixedNamedArgumentsInTheirOwnPosition` `AllowBreakAndContinueInsideWhen`
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
// IS_APPLICABLE: false
|
// IS_APPLICABLE: false
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun foo(s: String, b: Boolean){}
|
fun foo(s: String, b: Boolean){}
|
||||||
|
|
||||||
fun bar() {
|
fun bar() {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = 42'" "true"
|
// "Add name to argument: 'b = 42'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
operator fun String.invoke(a: Int, b: Int) {}
|
operator fun String.invoke(a: Int, b: Int) {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = 42'" "true"
|
// "Add name to argument: 'b = 42'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
operator fun String.invoke(a: Int, b: Int) {}
|
operator fun String.invoke(a: Int, b: Int) {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
Vendored
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = "FOO"'" "true"
|
// "Add name to argument: 'b = "FOO"'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun f(a: Int, b: String) {}
|
fun f(a: Int, b: String) {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
Vendored
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = "FOO"'" "true"
|
// "Add name to argument: 'b = "FOO"'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun f(a: Int, b: String) {}
|
fun f(a: Int, b: String) {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = "FOO"'" "true"
|
// "Add name to argument: 'b = "FOO"'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
class A(a: Int, b: String) {}
|
class A(a: Int, b: String) {}
|
||||||
|
|
||||||
fun f() {
|
fun f() {
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = "FOO"'" "true"
|
// "Add name to argument: 'b = "FOO"'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
class A(a: Int, b: String) {}
|
class A(a: Int, b: String) {}
|
||||||
|
|
||||||
fun f() {
|
fun f() {
|
||||||
|
|||||||
Vendored
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument..." "true"
|
// "Add name to argument..." "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun f(a: Int, b: String = "b", c: String = "c") {}
|
fun f(a: Int, b: String = "b", c: String = "c") {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument..." "true"
|
// "Add name to argument..." "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun f(a: Int, b: String = "b", c: String = "c") {}
|
fun f(a: Int, b: String = "b", c: String = "c") {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
Vendored
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = B()'" "true"
|
// "Add name to argument: 'b = B()'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
open class A {}
|
open class A {}
|
||||||
open class B : A() {}
|
open class B : A() {}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = B()'" "true"
|
// "Add name to argument: 'b = B()'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
open class A {}
|
open class A {}
|
||||||
open class B : A() {}
|
open class B : A() {}
|
||||||
|
|
||||||
|
|||||||
idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsUsedNamed.kt
Vendored
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = "FOO"'" "true"
|
// "Add name to argument: 'b = "FOO"'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun f(a: String, b: String) {}
|
fun f(a: String, b: String) {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = "FOO"'" "true"
|
// "Add name to argument: 'b = "FOO"'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun f(a: String, b: String) {}
|
fun f(a: String, b: String) {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = "FOO"'" "true"
|
// "Add name to argument: 'b = "FOO"'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun f(a: String, x: Int, b: String) {}
|
fun f(a: String, x: Int, b: String) {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add name to argument: 'b = "FOO"'" "true"
|
// "Add name to argument: 'b = "FOO"'" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun f(a: String, x: Int, b: String) {}
|
fun f(a: String, x: Int, b: String) {}
|
||||||
|
|
||||||
fun g() {
|
fun g() {
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// "Create property 'foo' as constructor parameter" "true"
|
// "Create property 'foo' as constructor parameter" "true"
|
||||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
|
||||||
// ERROR: No value passed for parameter 'foo'
|
// ERROR: No value passed for parameter 'foo'
|
||||||
|
|
||||||
class A<T>(val n: T)
|
class A<T>(val n: T)
|
||||||
|
|||||||
Vendored
-1
@@ -1,5 +1,4 @@
|
|||||||
// "Create property 'foo' as constructor parameter" "true"
|
// "Create property 'foo' as constructor parameter" "true"
|
||||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
|
||||||
// ERROR: No value passed for parameter 'foo'
|
// ERROR: No value passed for parameter 'foo'
|
||||||
|
|
||||||
class A<T>(val n: T, val foo: A<Int>)
|
class A<T>(val n: T, val foo: A<Int>)
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// "Create property 'foo' as constructor parameter" "true"
|
// "Create property 'foo' as constructor parameter" "true"
|
||||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
|
||||||
// ERROR: No value passed for parameter 'foo'
|
// ERROR: No value passed for parameter 'foo'
|
||||||
|
|
||||||
class A<T>(val n: T)
|
class A<T>(val n: T)
|
||||||
|
|||||||
Vendored
-1
@@ -1,5 +1,4 @@
|
|||||||
// "Create property 'foo' as constructor parameter" "true"
|
// "Create property 'foo' as constructor parameter" "true"
|
||||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
|
||||||
// ERROR: No value passed for parameter 'foo'
|
// ERROR: No value passed for parameter 'foo'
|
||||||
|
|
||||||
class A<T>(val n: T, var foo: String)
|
class A<T>(val n: T, var foo: String)
|
||||||
|
|||||||
+2
@@ -1,4 +1,6 @@
|
|||||||
// "Add label to loop" "true"
|
// "Add label to loop" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun breakContinueInWhen(i: Int) {
|
fun breakContinueInWhen(i: Int) {
|
||||||
for (y in 0..10) {
|
for (y in 0..10) {
|
||||||
when(i) {
|
when(i) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
// "Add label to loop" "true"
|
// "Add label to loop" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun breakContinueInWhen(i: Int) {
|
fun breakContinueInWhen(i: Int) {
|
||||||
loop@ for (y in 0..10) {
|
loop@ for (y in 0..10) {
|
||||||
when(i) {
|
when(i) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// "Add '@loop' to break" "true"
|
// "Add '@loop' to break" "true"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun foo(chars: CharArray) {
|
fun foo(chars: CharArray) {
|
||||||
val length = chars.size
|
val length = chars.size
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// "Add '@loop' to break" "true"
|
// "Add '@loop' to break" "true"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun foo(chars: CharArray) {
|
fun foo(chars: CharArray) {
|
||||||
val length = chars.size
|
val length = chars.size
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
// "Add label to loop" "true"
|
// "Add label to loop" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun breakContinueInWhen(i: Int) {
|
fun breakContinueInWhen(i: Int) {
|
||||||
for (y in 0..10) {
|
for (y in 0..10) {
|
||||||
when(i) {
|
when(i) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
// "Add label to loop" "true"
|
// "Add label to loop" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun breakContinueInWhen(i: Int) {
|
fun breakContinueInWhen(i: Int) {
|
||||||
loop@ for (y in 0..10) {
|
loop@ for (y in 0..10) {
|
||||||
when(i) {
|
when(i) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// "Add '@loop' to continue" "true"
|
// "Add '@loop' to continue" "true"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun foo(chars: CharArray) {
|
fun foo(chars: CharArray) {
|
||||||
val length = chars.size
|
val length = chars.size
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// "Add '@loop' to continue" "true"
|
// "Add '@loop' to continue" "true"
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun foo(chars: CharArray) {
|
fun foo(chars: CharArray) {
|
||||||
val length = chars.size
|
val length = chars.size
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
// "Add label to loop" "true"
|
// "Add label to loop" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun breakContinueInWhen(i: Int) {
|
fun breakContinueInWhen(i: Int) {
|
||||||
loop@ for (x in 0..10) {
|
loop@ for (x in 0..10) {
|
||||||
for (y in 0..10) {
|
for (y in 0..10) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
// "Add label to loop" "true"
|
// "Add label to loop" "true"
|
||||||
|
// LANGUAGE_VERSION: 1.3
|
||||||
|
|
||||||
fun breakContinueInWhen(i: Int) {
|
fun breakContinueInWhen(i: Int) {
|
||||||
loop@ for (x in 0..10) {
|
loop@ for (x in 0..10) {
|
||||||
loop1@ for (y in 0..10) {
|
loop1@ for (y in 0..10) {
|
||||||
|
|||||||
Reference in New Issue
Block a user