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

fix precedence issue in uniqnum.t #134

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Conversation

mauke
Copy link
Contributor

@mauke mauke commented Aug 13, 2024

The test !$nanish != $NaN doesn't make much sense: It checks whether a boolean (effectively 0 or 1) is not equal to $NaN, which is always true. (Also, we know $nanish != 0 from the preceding test, so !$nanish could be hardcoded as 0 here.)

Instead test whether $NaN correctly round-trips through strings, i.e. whether $nanish behaves like a proper NaN again (being non-equal to both the original $NaN and itself).

The test `!$nanish != $NaN` doesn't make much sense: It checks whether a boolean (effectively 0 or 1) is not equal to `$NaN`, which is always true. (Also, we know `$nanish != 0` from the preceding test, so `!$nanish` could be hardcoded as 0 here.)

Instead test whether `$NaN` correctly round-trips through strings, i.e. whether `$nanish` behaves like a proper NaN again (being non-equal to both the original `$NaN` and itself).
@leonerd
Copy link
Contributor

leonerd commented Aug 13, 2024

The Perl 5.6 CI machine got upset, but it looks like a platform setup sort of upset and not related to this change. I'll ignore that one.

@leonerd leonerd merged commit 37caeda into Dual-Life:master Aug 13, 2024
19 of 20 checks passed
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.

2 participants