For #21776 - Local 'var' is never modified and can be declared as 'val'

upstream-sync
Gabriel Luong 3 years ago committed by mergify[bot]
parent 5afe393b8f
commit da395d1038

@ -140,7 +140,7 @@ class HomeFragmentStateTest {
@Test @Test
fun `GIVEN a category is selected WHEN getFilteredStoriesCount is called for more stories than in this category THEN return only that`() { fun `GIVEN a category is selected WHEN getFilteredStoriesCount is called for more stories than in this category THEN return only that`() {
var result = getFilteredStoriesCount(listOf(otherStoriesCategory), 4) val result = getFilteredStoriesCount(listOf(otherStoriesCategory), 4)
assertEquals(1, result.keys.size) assertEquals(1, result.keys.size)
assertEquals(otherStoriesCategory.name, result.entries.first().key) assertEquals(otherStoriesCategory.name, result.entries.first().key)
assertEquals(3, result[otherStoriesCategory.name]) assertEquals(3, result[otherStoriesCategory.name])

@ -17,8 +17,8 @@ class ListTest {
val filePath1 = "filepath.txt" val filePath1 = "filepath.txt"
val filePath3 = "filepath3.txt" val filePath3 = "filepath3.txt"
var file1 = File(filePath1) val file1 = File(filePath1)
var file3 = File(filePath3) val file3 = File(filePath3)
// Create files // Create files
file1.createNewFile() file1.createNewFile()
@ -70,9 +70,9 @@ class ListTest {
val filePath2 = "filepath.txt" val filePath2 = "filepath.txt"
val filePath3 = "filepath3.txt" val filePath3 = "filepath3.txt"
var file1 = File(filePath1) val file1 = File(filePath1)
var file2 = File(filePath2) val file2 = File(filePath2)
var file3 = File(filePath3) val file3 = File(filePath3)
// Create files // Create files
file1.createNewFile() file1.createNewFile()

Loading…
Cancel
Save