Skip to content

Commit 7a9b5e6

Browse files
committed
ktfmt
1 parent 1b297d6 commit 7a9b5e6

File tree

2 files changed

+10
-11
lines changed
  • firebase-firestore/ktx/src

2 files changed

+10
-11
lines changed

firebase-firestore/ktx/src/main/kotlin/com/google/firebase/firestore/ktx/Firestore.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,13 @@ fun memoryCacheSettings(init: MemoryCacheSettings.Builder.() -> Unit): MemoryCac
182182
return builder.build()
183183
}
184184

185-
fun memoryEagerGcSettings(
186-
init: MemoryEagerGcSettings.Builder.() -> Unit
187-
): MemoryEagerGcSettings {
185+
fun memoryEagerGcSettings(init: MemoryEagerGcSettings.Builder.() -> Unit): MemoryEagerGcSettings {
188186
val builder = MemoryEagerGcSettings.newBuilder()
189187
builder.init()
190188
return builder.build()
191189
}
192190

193-
fun memoryLruGcSettings(
194-
init: MemoryLruGcSettings.Builder.() -> Unit
195-
): MemoryLruGcSettings {
191+
fun memoryLruGcSettings(init: MemoryLruGcSettings.Builder.() -> Unit): MemoryLruGcSettings {
196192
val builder = MemoryLruGcSettings.newBuilder()
197193
builder.init()
198194
return builder.build()

firebase-firestore/ktx/src/test/kotlin/com/google/firebase/firestore/ktx/FirestoreTests.kt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,20 @@ class FirestoreTests : BaseTestCase() {
133133
val settings = firestoreSettings {
134134
this.host = host
135135
this.isSslEnabled = isSslEnabled
136-
this.setLocalCacheSettings(memoryCacheSettings { })
136+
this.setLocalCacheSettings(memoryCacheSettings {})
137137
}
138138

139139
assertThat(host).isEqualTo(settings.host)
140140
assertThat(isSslEnabled).isEqualTo(settings.isSslEnabled)
141141
assertThat(settings.isPersistenceEnabled).isFalse()
142-
assertThat(settings.cacheSettings).isEqualTo(memoryCacheSettings { setGcSettings(
143-
memoryEagerGcSettings { }) })
142+
assertThat(settings.cacheSettings)
143+
.isEqualTo(memoryCacheSettings { setGcSettings(memoryEagerGcSettings {}) })
144144

145-
val otherSettings = firestoreSettings { this.setLocalCacheSettings(memoryCacheSettings {setGcSettings(
146-
memoryLruGcSettings { setSizeBytes(1_000) })}) }
145+
val otherSettings = firestoreSettings {
146+
this.setLocalCacheSettings(
147+
memoryCacheSettings { setGcSettings(memoryLruGcSettings { setSizeBytes(1_000) }) }
148+
)
149+
}
147150

148151
assertThat(otherSettings.host).isEqualTo(FirebaseFirestoreSettings.DEFAULT_HOST)
149152
assertThat(otherSettings.isPersistenceEnabled).isFalse()

0 commit comments

Comments
 (0)