Skip to content

Commit

Permalink
Observable.from: refactor varargs to overloads
Browse files Browse the repository at this point in the history
ReactiveX/RxJava#359 Varargs cause compiler warnings
  • Loading branch information
benjchristensen committed Sep 9, 2013
1 parent 1ab02b4 commit ed01772
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/scala/rx/lang/scala/RxImplicitsTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class UnitTestSuite extends JUnitSuite {
}

@Test def testSingleOrDefault {
assertEquals(0, Observable.from[Int]().toBlockingObservable.singleOrDefault(0))
assertEquals(0, Observable.empty[Int]().toBlockingObservable.singleOrDefault(0))
assertEquals(1, Observable.from(1).toBlockingObservable.singleOrDefault(0))
try {
Observable.from(1, 2, 3).toBlockingObservable.singleOrDefault(0)
Expand Down Expand Up @@ -232,13 +232,13 @@ class UnitTestSuite extends JUnitSuite {
@Test def testLastOrDefault {
val observable = Observable.from(1, 2, 3, 4)
assertEquals(4, observable.toBlockingObservable.lastOrDefault(5))
assertEquals(5, Observable.from[Int]().toBlockingObservable.lastOrDefault(5))
assertEquals(5, Observable.empty[Int]().toBlockingObservable.lastOrDefault(5))
}

@Test def testLastOrDefaultPredicate {
val observable = Observable.from(1, 2, 3, 4)
assertEquals(3, observable.toBlockingObservable.lastOrDefault(5, isOdd))
assertEquals(5, Observable.from[Int]().toBlockingObservable.lastOrDefault(5, isOdd))
assertEquals(5, Observable.empty[Int]().toBlockingObservable.lastOrDefault(5, isOdd))
}

@Test def testMap {
Expand Down

0 comments on commit ed01772

Please sign in to comment.