@@ -7,7 +7,7 @@ import kotlin.test.assertTrue
7
7
class ListOfListsUnitTest {
8
8
9
9
@Test
10
- fun `test creating a list of lists using listOf()` () {
10
+ fun `Creates an immutable list of immutable lists using listOf()` () {
11
11
val listOfLists = listOf (listOf (1 , 2 , 3 ), listOf (4 , 5 , 6 ), listOf (7 , 8 , 9 ))
12
12
13
13
assertEquals(3 , listOfLists.size)
@@ -17,7 +17,7 @@ class ListOfListsUnitTest {
17
17
}
18
18
19
19
@Test
20
- fun `test creating a list of lists using List constructor` () {
20
+ fun `Creates an immutable list of mutable lists using List constructor` () {
21
21
val listOfLists = List (3 ) { MutableList <Int >(3 ) {0 } }
22
22
23
23
assertEquals(3 , listOfLists.size)
@@ -27,7 +27,7 @@ class ListOfListsUnitTest {
27
27
}
28
28
29
29
@Test
30
- fun `test creating a list of lists using map method` () {
30
+ fun `Creates an immutable list of immutable lists using map method` () {
31
31
val listOfLists = (0 .. 2 ).map { _ -> (0 .. 2 ).map { 0 } }
32
32
33
33
assertEquals(3 , listOfLists.size)
@@ -37,17 +37,10 @@ class ListOfListsUnitTest {
37
37
}
38
38
39
39
@Test
40
- fun `test creating a list of mutablelists using map method` () {
40
+ fun `Creates an immutable list of mutable lists using map method` () {
41
41
val listOfMutableLists = (0 .. 2 ).map { mutableListOf<Int >() }
42
42
43
43
assertEquals(3 , listOfMutableLists.size)
44
44
assertTrue(listOfMutableLists.all { it.isEmpty() })
45
45
}
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
- }
53
46
}
0 commit comments