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

Use JUnit's assert format for assert messages to enable better suppor… #6262

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Oct 26, 2018

This changes the message format of "assert" to match that of JUnit. This way IDEs like IntelliJ IDEA are able to parse it and offer functionality like "compare values".

@akarnokd
Copy link
Member

I thought IntelliJ already recognized RxJava's Expected/Actual after this: #5258.

@vanniktech
Copy link
Collaborator

I thought so too.

@codecov
Copy link

codecov bot commented Oct 26, 2018

Codecov Report

Merging #6262 into 2.x will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6262      +/-   ##
============================================
+ Coverage     98.23%   98.27%   +0.03%     
  Complexity     6203     6203              
============================================
  Files           667      667              
  Lines         44889    44889              
  Branches       6216     6216              
============================================
+ Hits          44097    44113      +16     
+ Misses          251      247       -4     
+ Partials        541      529      -12
Impacted Files Coverage Δ Complexity Δ
.../java/io/reactivex/observers/BaseTestConsumer.java 100% <100%> (ø) 116 <0> (ø) ⬇️
.../operators/flowable/FlowableBlockingSubscribe.java 93.02% <0%> (-4.66%) 10% <0%> (-1%)
...tivex/internal/observers/FutureSingleObserver.java 94.33% <0%> (-3.78%) 24% <0%> (-1%)
...ava/io/reactivex/processors/BehaviorProcessor.java 96.86% <0%> (-2.25%) 60% <0%> (ø)
...activex/internal/schedulers/ScheduledRunnable.java 98.07% <0%> (-1.93%) 29% <0%> (-1%)
...internal/operators/observable/ObservableCache.java 93.7% <0%> (-1.58%) 9% <0%> (ø)
...java/io/reactivex/processors/UnicastProcessor.java 98.8% <0%> (-1.2%) 67% <0%> (-1%)
.../operators/mixed/FlowableSwitchMapCompletable.java 98.94% <0%> (-1.06%) 2% <0%> (ø)
...ernal/operators/flowable/FlowableFlatMapMaybe.java 90.82% <0%> (-0.97%) 2% <0%> (ø)
...ernal/operators/flowable/FlowableTimeoutTimed.java 98.37% <0%> (-0.82%) 3% <0%> (ø)
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9181cbc...6e1165d. Read the comment docs.

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Oct 26, 2018

Unfortunately #5258 didn't made it into 2.x as it seems

Copy link
Collaborator

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

That explains it

@akarnokd
Copy link
Member

Looks like it was never extended: https://github.com/JetBrains/intellij-community/blob/99614a63425774df58eea3ac92e2b20af1633663/plugins/junit_rt/src/com/intellij/junit4/ExpectedPatterns.java#L34

You don't need <> as this pattern matches expected: and but was: so you only need to replace Actual: .

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Oct 26, 2018

Thanks - will remove the (somewhat awkward <>) ... just added it to match the JUnit style but it's really not needed

@akarnokd akarnokd merged commit 1406637 into ReactiveX:2.x Oct 26, 2018
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.

3 participants