sqlancer / sqlancer/sqlancer

Feat: Generate and check for NaN

Open
#1,139 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.8k
Forks
397
Avg merge
21h 41m
Merged PRs (30d)
3

Description

Description

The testDouble() method in TestRandomly was missing NaN as a possible generated value.

Expected Behavior

  • getDouble() should return all relevant edge cases, including NaN.
  • testDouble() should validate NaN along with other cases.
  • The test should complete successfully without infinite loops.

Fix

  • Update getDouble() to generate NaN.
  • Modify testDouble() to check for NaN.
  • Update caching of doubles.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the TestRandomly class and inspect the getDouble() and testDouble() methods, including how doubles are cached. Run the relevant existing tests first, then verify that NaN is generated and checked alongside other edge cases without causing an infinite loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.