1
1
Fork 0

Modified placeholder

This commit is contained in:
Svetlana Isakova 2019-11-07 16:23:43 +01:00
parent c0c1c2ccaa
commit 72e307e9ca
2 changed files with 4 additions and 4 deletions

View File

@ -3,8 +3,8 @@ files:
- name: src/Task.kt
visible: true
placeholders:
- offset: 30
length: 101
placeholder_text: // class Dog
- offset: 44
length: 85
placeholder_text: // bark function
- name: test/Tests.kt
visible: false

View File

@ -14,7 +14,7 @@ class TestOverloadingExercise2 {
private fun testDog(test: (dog: Any?, barkFunc: KFunction<*>) -> Unit) {
val dogClass = loadClass("overloadingExercise2", "Dog")
val barkFunctions = dogClass.memberFunctions.filter { it.name == "bark" }
Assert.assertEquals("Expected only one 'bark' function in the class 'Dog'",
Assert.assertEquals("Expected one 'bark' function in the class 'Dog'",
1, barkFunctions.size)
val barkFunc = barkFunctions.single()
checkParametersOfMemberFunction(barkFunc, listOf("n" to "kotlin.Int", "say" to "kotlin.String"))