Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
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