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

Support for interfaces #16

Merged
merged 4 commits into from
Jul 19, 2020
Merged

Support for interfaces #16

merged 4 commits into from
Jul 19, 2020

Conversation

antkorwin
Copy link
Owner

fix for #15

@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2020

Codecov Report

Merging #16 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #16      +/-   ##
============================================
+ Coverage     92.10%   92.15%   +0.05%     
- Complexity       52       53       +1     
============================================
  Files             6        6              
  Lines           152      153       +1     
  Branches         16       17       +1     
============================================
+ Hits            140      141       +1     
  Misses            7        7              
  Partials          5        5              
Impacted Files Coverage Δ Complexity Δ
...ntkorwin/betterstrings/BetterStringsProcessor.java 100.00% <100.00%> (ø) 11.00 <0.00> (+1.00)

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 71ab287...bfbdac0. Read the comment docs.

@@ -83,6 +83,19 @@ void createNewClassInExpression() {
assertThat(result).isEqualTo("password = 1234");
}

@Test
void interpolationInFields() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, if it comes to this entire test suite... to make sure all stuff works both for -AcallToStringExplicitlyInInterpolations and without while avoiding test code duplication, you could use https://github.com/junit-team/junit4/wiki/Parameterized-tests (although most likely Maven setup for JUnit would need to be adjusted first - hence I haven't done it myself on PR #14)

Copy link
Owner Author

Choose a reason for hiding this comment

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

I thought about parameterized tests, but It may increase the complexity of the tests code base. Each test case will require one additional argument with another compiler flags and will require to use annotation with the source of all parameters.

There is another approach - we can run all tests with this flag by the use of another build script. The same code base of tests, but different build script commands. One job without compiler argument and the second turned it on. But in this case, if we need to test behavior which specifical for one compiler flag then we need to exclude manually this test from build job.

I want to try and compare these approaches.

@sonarcloud
Copy link

sonarcloud bot commented Jul 19, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more here

@antkorwin antkorwin merged commit 217be64 into master Jul 19, 2020
@antkorwin antkorwin deleted the support-for-interfaces branch July 19, 2020 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants