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

Improve parse_ubjson_fuzzer #2182

Merged
merged 1 commit into from
Jun 12, 2020
Merged

Improve parse_ubjson_fuzzer #2182

merged 1 commit into from
Jun 12, 2020

Conversation

tanuj208
Copy link
Contributor

I noticed that in parse_ubjson_fuzzer, the method json::to_ubjson() was called with default values to the arguments use_size and use_type. I went through the coverage data and found out that there were many lines of code that could be covered if provided other combinations of values to them.

So, I added code with changing the values to these arguments and compared the resulting vectors. By doing this coverage went up by
Line coverage = ~240 lines
Functional coverage = 18 functions
Region coverage = ~90 regions

Coverage report

Let me know if there is an incorrect use of the API.

@tanuj208 tanuj208 requested a review from nlohmann as a code owner June 10, 2020 16:17
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c3c5c03 on tanuj208:develop into 27f5a6e on nlohmann:develop.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@nlohmann nlohmann self-assigned this Jun 10, 2020
@nlohmann
Copy link
Owner

Thanks, the changes look good. I'll merge once the CI runs through.

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