Skip to content

Float/double tests lack NaN and special value coverage #11

@jonathanpeppers

Description

@jonathanpeppers

The float and double tests only generate finite random values:

rng => (float)(rng.NextDouble() * 2000 - 1000)
rng => rng.NextDouble() * 2000 - 1000

This means the test suite doesn't cover:

These are known edge cases for floating-point sorting. Tests should verify that NetworkSort.Sort produces the same ordering as Array.Sort for inputs containing these special values, particularly at sizes 27 and 28 where the unrolled path is used.

Found via Copilot code review on #8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions