Fixed tests after adding error checking for intention tests.
This commit is contained in:
+2
@@ -1,4 +1,6 @@
|
||||
// SHOULD_FAIL_WITH: duplicate.or.missing.arguments
|
||||
// ERROR: An argument is already passed for this parameter
|
||||
// ERROR: No value passed for parameter b
|
||||
fun test() {
|
||||
class Test{
|
||||
fun get(a: Int, b: Int) : Int = 0
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// SHOULD_FAIL_WITH: invalid.arguments
|
||||
// ERROR: Cannot find a parameter with this name: c
|
||||
fun test() {
|
||||
class Test{
|
||||
fun get(a: Int=1, b: Int=2) : Int = 0
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// SHOULD_FAIL_WITH: duplicate.or.missing.arguments
|
||||
// ERROR: No value passed for parameter b
|
||||
fun test() {
|
||||
class Test{
|
||||
fun get(a: Int, b: Int) : Int = 0
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
fun test() {
|
||||
class Test{
|
||||
fun get(a: Int, b: Int, c: Int = 1, d: Int = 1 fn: (i: Int) -> Int) : Int = 0
|
||||
fun get(a: Int, b: Int, c: Int = 1, d: Int = 1, fn: (i: Int) -> Int) : Int = 0
|
||||
}
|
||||
val test = Test()
|
||||
test.g<caret>et(1, c=3, b=2) { i ->
|
||||
test.g<caret>et(a=1, c=3, b=2, d=4) { i ->
|
||||
i
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
fun test() {
|
||||
class Test{
|
||||
fun get(a: Int, b: Int, c: Int = 1, d: Int = 1 fn: (i: Int) -> Int) : Int = 0
|
||||
fun get(a: Int, b: Int, c: Int = 1, d: Int = 1, fn: (i: Int) -> Int) : Int = 0
|
||||
}
|
||||
val test = Test()
|
||||
test[1, 2, 3, { i ->
|
||||
test[1, 2, 3, 4, { i ->
|
||||
i
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
// ERROR: Unresolved reference: got
|
||||
fun test() {
|
||||
class Test{
|
||||
fun get(i: Int) : Int = 0
|
||||
|
||||
Reference in New Issue
Block a user