Skip to content

test: add unit tests for special numeric value encoding (NaN, Infinity)#67

Merged
felipestanzani merged 6 commits into
toon-format:mainfrom
akash4chandran:test/special-numeric-values
Dec 3, 2025
Merged

test: add unit tests for special numeric value encoding (NaN, Infinity)#67
felipestanzani merged 6 commits into
toon-format:mainfrom
akash4chandran:test/special-numeric-values

Conversation

@akash4chandran

Copy link
Copy Markdown
Contributor

This PR adds unit tests (tagged with @Unit) and @DisplayName annotations
to verify how JToon encodes special numeric values:

  • Double.NaN
  • Double.POSITIVE_INFINITY
  • Double.NEGATIVE_INFINITY

According to the README, these non-finite numbers should map to null
when encoded. These tests ensure that behavior is covered and validated.

This improves test coverage and helps ensure consistent behavior across
different numeric edge cases. The tests follow the project's tagging
requirements and naming conventions.

@akash4chandran
akash4chandran requested a review from a team as a code owner December 2, 2025 12:46

@jenspapenhagen jenspapenhagen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you move this tests to JToonTest.java

They are very useful, but do not need an own class.

@felipestanzani
felipestanzani merged commit f29de38 into toon-format:main Dec 3, 2025
1 check passed
@github-actions

github-actions Bot commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 96.59% 🍏

There is no coverage information present for the Files changed

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