File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed
firebase-firestore/ktx/src
main/kotlin/com/google/firebase/firestore/ktx
test/kotlin/com/google/firebase/firestore/ktx Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -182,17 +182,13 @@ fun memoryCacheSettings(init: MemoryCacheSettings.Builder.() -> Unit): MemoryCac
182
182
return builder.build()
183
183
}
184
184
185
- fun memoryEagerGcSettings (
186
- init : MemoryEagerGcSettings .Builder .() -> Unit
187
- ): MemoryEagerGcSettings {
185
+ fun memoryEagerGcSettings (init : MemoryEagerGcSettings .Builder .() -> Unit ): MemoryEagerGcSettings {
188
186
val builder = MemoryEagerGcSettings .newBuilder()
189
187
builder.init ()
190
188
return builder.build()
191
189
}
192
190
193
- fun memoryLruGcSettings (
194
- init : MemoryLruGcSettings .Builder .() -> Unit
195
- ): MemoryLruGcSettings {
191
+ fun memoryLruGcSettings (init : MemoryLruGcSettings .Builder .() -> Unit ): MemoryLruGcSettings {
196
192
val builder = MemoryLruGcSettings .newBuilder()
197
193
builder.init ()
198
194
return builder.build()
Original file line number Diff line number Diff line change @@ -133,17 +133,20 @@ class FirestoreTests : BaseTestCase() {
133
133
val settings = firestoreSettings {
134
134
this .host = host
135
135
this .isSslEnabled = isSslEnabled
136
- this .setLocalCacheSettings(memoryCacheSettings { })
136
+ this .setLocalCacheSettings(memoryCacheSettings {})
137
137
}
138
138
139
139
assertThat(host).isEqualTo(settings.host)
140
140
assertThat(isSslEnabled).isEqualTo(settings.isSslEnabled)
141
141
assertThat(settings.isPersistenceEnabled).isFalse()
142
- assertThat(settings.cacheSettings).isEqualTo(memoryCacheSettings { setGcSettings(
143
- memoryEagerGcSettings { }) })
142
+ assertThat(settings.cacheSettings)
143
+ .isEqualTo(memoryCacheSettings { setGcSettings(memoryEagerGcSettings { }) })
144
144
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
+ }
147
150
148
151
assertThat(otherSettings.host).isEqualTo(FirebaseFirestoreSettings .DEFAULT_HOST )
149
152
assertThat(otherSettings.isPersistenceEnabled).isFalse()
You can’t perform that action at this time.
0 commit comments