From c3e0ac072b8c07aed046562af641f16c2aedee8d Mon Sep 17 00:00:00 2001 From: Igor Date: Thu, 20 May 2021 12:30:14 +0300 Subject: [PATCH] refactor(Programming Basics - Functions - Exercise 1): Function name consistency restored --- Programming Basics/Functions/Exercise 1/src/Task.kt | 4 ++-- Programming Basics/Functions/Exercise 1/test/Tests.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Programming Basics/Functions/Exercise 1/src/Task.kt b/Programming Basics/Functions/Exercise 1/src/Task.kt index e5ea3dfe..3c44a1a1 100644 --- a/Programming Basics/Functions/Exercise 1/src/Task.kt +++ b/Programming Basics/Functions/Exercise 1/src/Task.kt @@ -1,8 +1,8 @@ // Functions/Task1.kt package functionsExercise1 -fun getSquare(i: Int): Int = i * i +fun squareInt(i: Int): Int = i * i fun main() { - println(getSquare(2)) // 4 + println(squareInt(2)) // 4 } \ No newline at end of file diff --git a/Programming Basics/Functions/Exercise 1/test/Tests.kt b/Programming Basics/Functions/Exercise 1/test/Tests.kt index 0b67a1a3..35f55ac2 100644 --- a/Programming Basics/Functions/Exercise 1/test/Tests.kt +++ b/Programming Basics/Functions/Exercise 1/test/Tests.kt @@ -9,8 +9,8 @@ import util.TIMEOUT @FixMethodOrder(MethodSorters.NAME_ASCENDING) class TestFunctionsExercise1 { private fun testFunction(i: Int) { - Assert.assertEquals("getSquare($i) should return ${i * i}", - i * i, getSquare(i)) + Assert.assertEquals("squareInt($i) should return ${i * i}", + i * i, squareInt(i)) } @Test(timeout = TIMEOUT)