Skip to content

2.x: Use predicates in BaseTestConsumer assertError(Class/Throwable) to remove duplicate code, tests tweaks to remove few IDE warnings#4627

Merged
akarnokd merged 2 commits intoReactiveX:2.xfrom
jraska:2.x
Sep 28, 2016

Conversation

@jraska
Copy link
Contributor

@jraska jraska commented Sep 28, 2016

Messages and error checking was duplicates between all three assertError overloads.

@akarnokd akarnokd added this to the 2.0 RC4 milestone Sep 28, 2016
@codecov-io
Copy link

codecov-io commented Sep 28, 2016

Current coverage is 78.07% (diff: 100%)

Merging #4627 into 2.x will decrease coverage by 0.10%

@@                2.x      #4627   diff @@
==========================================
  Files           557        557          
  Lines         36298      36278    -20   
  Methods           0          0          
  Messages          0          0          
  Branches       5571       5563     -8   
==========================================
- Hits          28378      28323    -55   
- Misses         5906       5934    +28   
- Partials       2014       2021     +7   

Powered by Codecov. Last update 1c82063...c47f00c

@akarnokd akarnokd merged commit a28b558 into ReactiveX:2.x Sep 28, 2016
throw fail("Error not present");
}
return (U)this;
return (U)assertError((Predicate)Functions.isInstanceOf(errorClass));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this change I can't run ./gradlew test locally any longer:

error: incompatible types: BaseTestConsumer cannot be converted to U
return assertError((Predicate)Functions.isInstanceOf(errorClass));

@akarnokd
Copy link
Member

Super odd. Travis's Java 7 compiled it fine but 8u102' javac fails to compile it even though -source 1.6 is set. Eclipse complains about (U). I've restored (U) in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants