From f14889222a1026d8048a2ded3f70dbe3031c9dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedran=20Pri=C5=A1=C4=87an?= Date: Sun, 28 Jul 2019 13:46:41 +0200 Subject: [PATCH] handle compiler warnings in tests --- src/test/kotlin/io/reactivex/rxkotlin/BasicKotlinTests.kt | 2 +- src/test/kotlin/io/reactivex/rxkotlin/CompletableTest.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/kotlin/io/reactivex/rxkotlin/BasicKotlinTests.kt b/src/test/kotlin/io/reactivex/rxkotlin/BasicKotlinTests.kt index f80e299..b293da4 100644 --- a/src/test/kotlin/io/reactivex/rxkotlin/BasicKotlinTests.kt +++ b/src/test/kotlin/io/reactivex/rxkotlin/BasicKotlinTests.kt @@ -186,7 +186,7 @@ class BasicKotlinTests : KotlinTests() { @Test fun testTakeWhileWithIndex() { Observable.fromIterable(listOf(1, 2, 3)) .takeWhile { x -> x < 3 } - .zipWith(Observable.range(0, Integer.MAX_VALUE), BiFunction { x, i -> x }) + .zipWith(Observable.range(0, Integer.MAX_VALUE), BiFunction { x, _ -> x }) .subscribe(received()) verify(a, times(1)).received(1) verify(a, times(1)).received(2) diff --git a/src/test/kotlin/io/reactivex/rxkotlin/CompletableTest.kt b/src/test/kotlin/io/reactivex/rxkotlin/CompletableTest.kt index fa7c890..8bd5e52 100644 --- a/src/test/kotlin/io/reactivex/rxkotlin/CompletableTest.kt +++ b/src/test/kotlin/io/reactivex/rxkotlin/CompletableTest.kt @@ -39,13 +39,13 @@ class CompletableTest : KotlinTests() { } @Test(expected = NoSuchElementException::class) fun testCreateFromSingle() { - val c1 = Single.just("Hello World!").toCompletable() + val c1 = Single.just("Hello World!").ignoreElement() assertNotNull(c1) c1.toObservable().blockingFirst() } @Test fun testConcatAll() { - var list = emptyList() + val list = emptyList().toMutableList() (0 until 10) .map { v -> Completable.create { list += v } } .concatAll()