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

Improved testing of JSON IO, especially in de code that handles null objects" #2116

Merged
merged 9 commits into from
Jan 7, 2025

Conversation

jurgenvinju
Copy link
Member

@jurgenvinju jurgenvinju commented Jan 3, 2025

  • test specific null values for all types in the default null map
  • deal with top-level null values that are not in the null map
  • deal with nested null values that are not in the null map
    • as part of lists
    • as part of maps
    • as part of sets
    • as fields of a tuple
    • as positional fields of nodes
    • as positional fields of ADTs
    • as keyword field values
    • as part of source location unpacked elements
  • fix bugs that pop up

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 78.84615% with 11 lines in your changes missing coverage. Please review.

Project coverage is 49%. Comparing base (6c58baa) to head (7dbb8be).
Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
...pl/library/lang/json/internal/JsonValueReader.java 78% 6 Missing and 5 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2116   +/-   ##
=======================================
  Coverage       49%     49%           
- Complexity    6224    6240   +16     
=======================================
  Files          663     663           
  Lines        59181   59211   +30     
  Branches      8615    8627   +12     
=======================================
+ Hits         29458   29531   +73     
+ Misses       27497   27454   -43     
  Partials      2226    2226           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

… values in maps, etc, then they are ignored by the JSON reader from now on. Where values are expected but a null appears, such as in the positional fields of ADTs a proper ParseError is thrown
@jurgenvinju jurgenvinju marked this pull request as ready for review January 7, 2025 11:01
@jurgenvinju jurgenvinju merged commit 79b6b00 into main Jan 7, 2025
7 checks passed
@jurgenvinju jurgenvinju deleted the json-io-tests-for-null-handlers branch January 7, 2025 11:25
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.

1 participant