Skip to content

Add unit tests for com.baidu.hugegraph.util.StringUtil - #485

Merged
javeme merged 1 commit into
apache:masterfrom
Diffblue-benchmarks:add-diffblue-tests
May 15, 2019
Merged

Add unit tests for com.baidu.hugegraph.util.StringUtil#485
javeme merged 1 commit into
apache:masterfrom
Diffblue-benchmarks:add-diffblue-tests

Conversation

@Braavos6

@Braavos6 Braavos6 commented Apr 26, 2019

Copy link
Copy Markdown
Contributor

I've analysed your codebase and noticed that com.baidu.hugegraph.util.StringUtil is not fully tested.
I've written some tests for the methods in this class with the help of Diffblue Cover.

Hopefully, these tests will help you detect any regressions caused by future code changes. If you would find it useful to have additional tests written for this repository, I would be more than happy to look at other classes that you consider important.

@codecov

codecov Bot commented Apr 26, 2019

Copy link
Copy Markdown

Codecov Report

Merging #485 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #485      +/-   ##
============================================
+ Coverage     68.99%   69.02%   +0.03%     
- Complexity     3280     3283       +3     
============================================
  Files           208      208              
  Lines         16193    16193              
  Branches       2334     2334              
============================================
+ Hits          11172    11178       +6     
+ Misses         3774     3765       -9     
- Partials       1247     1250       +3
Impacted Files Coverage Δ Complexity Δ
...a/com/baidu/hugegraph/backend/query/Condition.java 62.43% <0%> (-0.53%) 20% <0%> (ø)
...main/java/com/baidu/hugegraph/util/StringUtil.java 66.66% <0%> (+23.33%) 9% <0%> (+3%) ⬆️

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 bed8a6e...84f0ecd. Read the comment docs.

@javeme

javeme commented Apr 26, 2019

Copy link
Copy Markdown
Contributor

@Braavos96 Thank you very much for your code contribution. Yes it's very useful to improve the tests,
and look forward to your further contributions.

@javeme javeme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great! there are still some comments and please don't forget to sign CLA

Comment thread hugegraph-core/src/test/java/com/baidu/hugegraph/util/StringUtilTest.java Outdated
Comment thread hugegraph-core/src/test/java/com/baidu/hugegraph/util/StringUtilTest.java Outdated
Comment thread hugegraph-core/src/test/java/com/baidu/hugegraph/util/StringUtilTest.java Outdated
Comment thread hugegraph-core/src/test/java/com/baidu/hugegraph/util/StringUtilTest.java Outdated
Comment thread hugegraph-core/src/test/java/com/baidu/hugegraph/util/StringUtilTest.java Outdated
Comment thread hugegraph-core/src/test/java/com/baidu/hugegraph/util/StringUtilTest.java Outdated
Comment thread hugegraph-core/src/test/java/com/baidu/hugegraph/util/StringUtilTest.java Outdated
@Braavos6 Braavos6 closed this May 1, 2019
@Braavos6
Braavos6 force-pushed the add-diffblue-tests branch from ab49895 to cf80faf Compare May 1, 2019 09:29
@Braavos6 Braavos6 reopened this May 1, 2019
@Braavos6

Braavos6 commented May 1, 2019

Copy link
Copy Markdown
Contributor Author

Hi @javeme, I have amended the test cases to include your comments on it and also signed the CLA.
Apologies I accidentally closed it while pushing the changes :)

Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/UnitTestSuite.java Outdated
Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/UnitTestSuite.java Outdated
@javeme

javeme commented May 6, 2019

Copy link
Copy Markdown
Contributor

@Braavos96 Thank you very much, there are some minor comments to be addressed.

@Braavos6
Braavos6 force-pushed the add-diffblue-tests branch 2 times, most recently from 0368547 to b6217e1 Compare May 13, 2019 09:43

@javeme javeme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Still some comments, thanks very much

Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/UnitTestSuite.java Outdated
Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/UnitTestSuite.java Outdated
Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/StringUtilTest.java Outdated
zhoney
zhoney previously requested changes May 14, 2019
Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/StringUtilTest.java Outdated
@Braavos6
Braavos6 force-pushed the add-diffblue-tests branch from b6217e1 to a1232ff Compare May 14, 2019 07:53
Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/StringUtilTest.java Outdated
Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/UnitTestSuite.java Outdated
Comment thread hugegraph-test/src/main/java/com/baidu/hugegraph/unit/UnitTestSuite.java Outdated
These tests were written using Diffblue Cover.
@Braavos6
Braavos6 force-pushed the add-diffblue-tests branch from a1232ff to 84f0ecd Compare May 14, 2019 15:37
@javeme
javeme dismissed zhoney’s stale review May 15, 2019 06:08

exemption for first-time contributor

@javeme
javeme merged commit 6fbcb49 into apache:master May 15, 2019
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.

5 participants