From 72e307e9cad029f547641f05193b5fdd432acae3 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Thu, 7 Nov 2019 16:23:43 +0100 Subject: [PATCH] Modified placeholder --- Usability/Overloading/Exercise 2/task-info.yaml | 6 +++--- Usability/Overloading/Exercise 2/test/Tests.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Usability/Overloading/Exercise 2/task-info.yaml b/Usability/Overloading/Exercise 2/task-info.yaml index 7a03973b..ffafe2f6 100644 --- a/Usability/Overloading/Exercise 2/task-info.yaml +++ b/Usability/Overloading/Exercise 2/task-info.yaml @@ -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 diff --git a/Usability/Overloading/Exercise 2/test/Tests.kt b/Usability/Overloading/Exercise 2/test/Tests.kt index 95c6908c..421001d5 100644 --- a/Usability/Overloading/Exercise 2/test/Tests.kt +++ b/Usability/Overloading/Exercise 2/test/Tests.kt @@ -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"))