Skip to content

Commit f148892

Browse files
committed
handle compiler warnings in tests
1 parent b35000f commit f148892

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/test/kotlin/io/reactivex/rxkotlin/BasicKotlinTests.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class BasicKotlinTests : KotlinTests() {
186186
@Test fun testTakeWhileWithIndex() {
187187
Observable.fromIterable(listOf(1, 2, 3))
188188
.takeWhile { x -> x < 3 }
189-
.zipWith(Observable.range(0, Integer.MAX_VALUE), BiFunction<Int, Int, Int> { x, i -> x })
189+
.zipWith(Observable.range(0, Integer.MAX_VALUE), BiFunction<Int, Int, Int> { x, _ -> x })
190190
.subscribe(received())
191191
verify(a, times(1)).received(1)
192192
verify(a, times(1)).received(2)

src/test/kotlin/io/reactivex/rxkotlin/CompletableTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ class CompletableTest : KotlinTests() {
3939
}
4040

4141
@Test(expected = NoSuchElementException::class) fun testCreateFromSingle() {
42-
val c1 = Single.just("Hello World!").toCompletable()
42+
val c1 = Single.just("Hello World!").ignoreElement()
4343
assertNotNull(c1)
4444
c1.toObservable<String>().blockingFirst()
4545
}
4646

4747
@Test fun testConcatAll() {
48-
var list = emptyList<Int>()
48+
val list = emptyList<Int>().toMutableList()
4949
(0 until 10)
5050
.map { v -> Completable.create { list += v } }
5151
.concatAll()

0 commit comments

Comments
 (0)