java
java copied to clipboard
Add unit tests
Dear contributors, We are a group of five students at the royal institute of technology in Stockholm. Our task in one course is to increase branch coverage in an open source project. We have analysed the current code with lizard and added some unit tests which reach branches that was not reached with previous tests.
We hope that these test could come in handy in your future development.
Codecov Report
Merging #156 into master will increase coverage by
0.93%. The diff coverage is77.92%.
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
+ Coverage 68.01% 68.95% +0.93%
==========================================
Files 107 107
Lines 7285 7327 +42
Branches 1378 1379 +1
==========================================
+ Hits 4955 5052 +97
+ Misses 1879 1837 -42
+ Partials 451 438 -13
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/main/java/com/jsoniter/Codegen.java | 58.72% <100%> (+0.73%) |
:arrow_up: |
| src/main/java/com/jsoniter/spi/Config.java | 84.39% <100%> (+0.09%) |
:arrow_up: |
| src/main/java/com/jsoniter/spi/OmitValue.java | 90.9% <100%> (+3.69%) |
:arrow_up: |
| ...c/main/java/com/jsoniter/IterImplForStreaming.java | 76.74% <75.36%> (+6.57%) |
:arrow_up: |
| src/main/java/com/jsoniter/IterImpl.java | 69.4% <0%> (+2.96%) |
:arrow_up: |
| src/main/java/com/jsoniter/IterImplSkip.java | 76.19% <0%> (+4.76%) |
:arrow_up: |
| src/main/java/com/jsoniter/spi/Decoder.java | 91.66% <0%> (+8.33%) |
:arrow_up: |
| ... and 1 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update e21a29f...a8cb20c. Read the comment docs.
Codecov Report
Merging #156 into master will increase coverage by
0.91%. The diff coverage is77.92%.
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
+ Coverage 68.04% 68.95% +0.91%
==========================================
Files 107 107
Lines 7231 7327 +96
Branches 1367 1379 +12
==========================================
+ Hits 4920 5052 +132
+ Misses 1870 1837 -33
+ Partials 441 438 -3
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...c/main/java/com/jsoniter/IterImplForStreaming.java | 76.74% <75.36%> (+6.57%) |
:arrow_up: |
| src/main/java/com/jsoniter/Codegen.java | 58.72% <100.00%> (+0.73%) |
:arrow_up: |
| src/main/java/com/jsoniter/spi/Config.java | 84.39% <100.00%> (+0.27%) |
:arrow_up: |
| src/main/java/com/jsoniter/spi/OmitValue.java | 90.90% <100.00%> (+3.69%) |
:arrow_up: |
| src/main/java/com/jsoniter/JsonIteratorPool.java | 71.42% <0.00%> (-14.29%) |
:arrow_down: |
| ...c/main/java/com/jsoniter/ReflectionMapDecoder.java | 56.66% <0.00%> (-8.96%) |
:arrow_down: |
| .../main/java/com/jsoniter/output/CodegenImplMap.java | 95.31% <0.00%> (-2.94%) |
:arrow_down: |
| ...java/com/jsoniter/output/ReflectionMapEncoder.java | 71.42% <0.00%> (-2.94%) |
:arrow_down: |
| src/main/java/com/jsoniter/CodegenAccess.java | 67.53% <0.00%> (-1.81%) |
:arrow_down: |
| src/main/java/com/jsoniter/JsonIterator.java | 64.70% <0.00%> (-1.57%) |
:arrow_down: |
| ... and 14 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 72f70af...a8cb20c. Read the comment docs.