Bael 779 kotlin generics (#1671)

* Kotlin Generics code

* wrote rest of the tests

* sorting impl

* proper val name

* fix typo

* better assert
This commit is contained in:
Tomasz Lelek 2017-04-18 13:29:18 +02:00 committed by Grzegorz Piwowarek
parent 6c181db567
commit f204b6167d
1 changed files with 1 additions and 6 deletions

View File

@ -115,12 +115,7 @@ class GenericsTest {
val sorted = sort(listOfInts)
//then
assertEquals(sorted[0], 1)
assertEquals(sorted[1], 2)
assertEquals(sorted[2], 3)
assertEquals(sorted[3], 4)
assertEquals(sorted[4], 5)
assertEquals(sorted, listOf(1,2,3,4,5))
}
fun <T: Comparable<T>> sort(list: List<T>): List<T>{