Skip to content

Commit 694e9db

Browse files
code cleanup
1 parent 234d1b6 commit 694e9db

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

core-kotlin-modules/core-kotlin-collections-list-2/src/test/kotlin/listOfLists/ListOfListsUnitTest.kt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import kotlin.test.assertTrue
77
class ListOfListsUnitTest {
88

99
@Test
10-
fun `test creating a list of lists using listOf()`() {
10+
fun `Creates an immutable list of immutable lists using listOf()`() {
1111
val listOfLists = listOf(listOf(1, 2, 3), listOf(4, 5, 6), listOf(7, 8, 9))
1212

1313
assertEquals(3, listOfLists.size)
@@ -17,7 +17,7 @@ class ListOfListsUnitTest {
1717
}
1818

1919
@Test
20-
fun `test creating a list of lists using List constructor`() {
20+
fun `Creates an immutable list of mutable lists using List constructor`() {
2121
val listOfLists = List(3) { MutableList<Int>(3) {0} }
2222

2323
assertEquals(3, listOfLists.size)
@@ -27,7 +27,7 @@ class ListOfListsUnitTest {
2727
}
2828

2929
@Test
30-
fun `test creating a list of lists using map method`() {
30+
fun `Creates an immutable list of immutable lists using map method`() {
3131
val listOfLists = (0..2).map { _ -> (0..2).map { 0 } }
3232

3333
assertEquals(3, listOfLists.size)
@@ -37,17 +37,10 @@ class ListOfListsUnitTest {
3737
}
3838

3939
@Test
40-
fun `test creating a list of mutablelists using map method`() {
40+
fun `Creates an immutable list of mutable lists using map method`() {
4141
val listOfMutableLists = (0..2).map { mutableListOf<Int>() }
4242

4343
assertEquals(3, listOfMutableLists.size)
4444
assertTrue(listOfMutableLists.all { it.isEmpty() })
4545
}
46-
47-
@Test
48-
fun `test creating a list of lists using Array() and fill()`() {
49-
val listOfLists = Array(3) { Array(5) { 0 } }
50-
assertEquals(3, listOfLists.size)
51-
assertTrue(listOfLists.all { it.all { it == 0 } })
52-
}
5346
}

0 commit comments

Comments
 (0)