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

[Bug]: Unit test failing #106

Closed
2 tasks done
rjzak opened this issue Feb 16, 2024 · 2 comments
Closed
2 tasks done

[Bug]: Unit test failing #106

rjzak opened this issue Feb 16, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@rjzak
Copy link
Member

rjzak commented Feb 16, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Current Behaviour

---- codec::case_183 stdout ----
[f9, fe, 0] == [f9, fe, 0]
[f9, fe, 0] == [f9, 7e, 0]
thread 'codec::case_183' panicked at ciborium/tests/codec.rs:296:9:
assertion `left == right` failed
  left: [249, 254, 0]
 right: [249, 126, 0]

Seems to be this line case(-core::f64::NAN, val!(-core::f64::NAN), "f9fe00", false, Float), // Not In RFC in this file

case(-core::f32::NAN, val!(-core::f32::NAN), "f9fe00", false, Float), // Not In RFC
case(-core::f64::NAN, val!(-core::f64::NAN), "f9fe00", false, Float), // Not In RFC

Expected Behaviour

Test should pass

Environment Information

Github CI

What's odd that it only seems to affect release tests on Stable, Beta, and Nightly releases of Rust. Debug tests on 1.70, Stable, Beta, Nightly pass.

Steps To Reproduce

  1. cargo +stable test --workspace --release
@rjzak rjzak added the bug Something isn't working label Feb 16, 2024
@rjzak rjzak added the help wanted Extra attention is needed label Feb 17, 2024
@rjzak
Copy link
Member Author

rjzak commented Feb 19, 2024

Fixed in #111

@rjzak rjzak closed this as completed Feb 19, 2024
@github-project-automation github-project-automation bot moved this from New to Done in Enarx Board Feb 19, 2024
@chrysn
Copy link

chrysn commented Jun 22, 2024

Reliably doing NaN payloads is a lot of manual work as long as Rust doesn't preserve them in conversion (or offers an API that converts float preserving/truncating NaN sign, signalling status and payload).

I did the full preservation rules (as described in the cde draft) in my diagnostic notation parser -- definitely no recommendation to do it precisely this way (lots of cleanup and simplifications required), just to show that it can be done, and takes fiddling with .as_bits().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: Done
Development

No branches or pull requests

2 participants