You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: components/feature/awesomebar/src/test/java/mozilla/components/feature/awesomebar/AwesomeBarFeatureTest.kt
Copy file name to clipboardExpand all lines: components/feature/awesomebar/src/test/java/mozilla/components/feature/awesomebar/provider/BookmarksStorageSuggestionProviderTest.kt
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,9 @@ import java.util.UUID
20
20
21
21
@RunWith(RobolectricTestRunner::class)
22
22
classBookmarksStorageSuggestionProviderTest {
23
-
val bookmarks = testableBookmarksStorage()
23
+
24
+
privateval bookmarks = testableBookmarksStorage()
25
+
24
26
privateval newItem =BookmarkNode(
25
27
BookmarkNodeType.ITEM, "123", "456", null,
26
28
"Mozilla", "http://www.mozilla.org", null
@@ -119,8 +121,8 @@ class BookmarksStorageSuggestionProviderTest {
119
121
}
120
122
// Calculate maxScore so that we can invert our scoring.
121
123
// Lower Levenshtein distance should produce a higher score.
122
-
val maxScore =urlMatches.maxBy { it.score }?.score
123
-
if (maxScore ==null)return@synchronized listOf()
124
+
urlMatches.maxBy { it.score }?.score
125
+
?:return@synchronized listOf()
124
126
125
127
// TODO exclude non-matching results entirely? Score that implies complete mismatch.
Copy file name to clipboardExpand all lines: components/feature/awesomebar/src/test/java/mozilla/components/feature/awesomebar/provider/ClipboardSuggestionProviderTest.kt
Copy file name to clipboardExpand all lines: components/feature/awesomebar/src/test/java/mozilla/components/feature/awesomebar/provider/HistoryStorageSuggestionProviderTest.kt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ import org.junit.Test
18
18
importorg.mockito.Mockito.`when`
19
19
20
20
classHistoryStorageSuggestionProviderTest {
21
+
21
22
@Test
22
23
fun`Provider returns empty list when text is empty`() = runBlocking {
23
24
val provider =HistoryStorageSuggestionProvider(mock(), mock())
Copy file name to clipboardExpand all lines: components/feature/awesomebar/src/test/java/mozilla/components/feature/awesomebar/provider/SearchSuggestionProviderTest.kt
0 commit comments