dtolnay / ryu

Fast floating point to string conversion
Apache License 2.0
606 stars 27 forks source link

tests are failing on Big Endian #2

Closed ignatenkobrain closed 6 years ago

ignatenkobrain commented 6 years ago
     Running `/builddir/build/BUILD/ryu-0.2.3/target/release/deps/d2s_test-12606dc40828d6a3`
running 10 tests
test test_basic ... FAILED
test test_looks_like_pow5 ... FAILED
test test_lots_of_trailing_zeros ... FAILED
test test_min_and_max ... FAILED
test test_output_length ... FAILED
test test_random ... FAILED
test test_regression ... FAILED
test test_ryu ... FAILED
test test_switch_to_subnormal ... FAILED
test test_non_finite ... ok
failures:
---- test_basic stdout ----
thread 'test_basic' panicked at 'assertion failed: `(left == right)`
  left: `"6.3E-322"`,
 right: `"-0E0"`', tests/d2s_test.rs:77:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- test_looks_like_pow5 stdout ----
thread 'test_looks_like_pow5' panicked at 'assertion failed: `(left == right)`
  left: `"-6.034215271814797E-218"`,
 right: `"5.764607523034235E39"`', tests/d2s_test.rs:121:5
---- test_lots_of_trailing_zeros stdout ----
thread 'test_lots_of_trailing_zeros' panicked at 'assertion failed: `(left == right)`
  left: `"1.2173E-319"`,
 right: `"2.9802322387695312E-8"`', tests/d2s_test.rs:100:5
---- test_min_and_max stdout ----
thread 'test_min_and_max' panicked at 'assertion failed: `(left == right)`
  left: `"NaN"`,
 right: `"1.7976931348623157E308"`', tests/d2s_test.rs:93:5
---- test_output_length stdout ----
thread 'test_output_length' panicked at 'assertion failed: `(left == right)`
  left: `"3.03865E-319"`,
 right: `"1E0"`', tests/d2s_test.rs:130:5
---- test_random stdout ----
thread 'test_random' panicked at 'assertion failed: `(left == right)`
  left: `0.2690935254479129`,
 right: `-63396714752784815000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0`', tests/d2s_test.rs:60:9
---- test_regression stdout ----
thread 'test_regression' panicked at 'assertion failed: `(left == right)`
  left: `"-7.047125292031562E21"`,
 right: `"-2.109808898695963E16"`', tests/d2s_test.rs:105:5
---- test_ryu stdout ----
thread 'test_ryu' panicked at 'assertion failed: `(left == right)`
  left: `"4.66726145843124E-62"`,
 right: `"3E-1"`', tests/d2s_test.rs:42:5
---- test_switch_to_subnormal stdout ----
thread 'test_switch_to_subnormal' panicked at 'assertion failed: `(left == right)`
  left: `"2.0237E-320"`,
 right: `"2.2250738585072014E-308"`', tests/d2s_test.rs:87:5
failures:
    test_basic
    test_looks_like_pow5
    test_lots_of_trailing_zeros
    test_min_and_max
    test_output_length
    test_random
    test_regression
    test_ryu
    test_switch_to_subnormal
test result: FAILED. 1 passed; 9 failed; 0 ignored; 0 measured; 0 filtered out
     Running `/builddir/build/BUILD/ryu-0.2.3/target/release/deps/exhaustive-1ad870ce0506567f`
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
     Running `/builddir/build/BUILD/ryu-0.2.3/target/release/deps/f2s_test-7dbe7c35a67c1bf0`
running 12 tests
test test_boundary_round_even ... FAILED
test test_basic ... FAILED
test test_exact_value_round_even ... FAILED
test test_looks_like_pow5 ... FAILED
test test_lots_of_trailing_zeros ... FAILED
test test_min_and_max ... FAILED
test test_output_length ... FAILED
test test_random ... FAILED
test test_regression ... FAILED
test test_ryu ... FAILED
test test_switch_to_subnormal ... FAILED
test test_non_finite ... ok
failures:
---- test_boundary_round_even stdout ----
thread 'test_boundary_round_even' panicked at 'assertion failed: `(left == right)`
  left: `"1.5046464E-36"`,
 right: `"3.355445E7"`', tests/f2s_test.rs:103:5
---- test_basic stdout ----
thread 'test_basic' panicked at 'assertion failed: `(left == right)`
  left: `"1.8E-43"`,
 right: `"-0E0"`', tests/f2s_test.rs:78:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- test_exact_value_round_even stdout ----
thread 'test_exact_value_round_even' panicked at 'assertion failed: `(left == right)`
  left: `"-1.8758907E-36"`,
 right: `"3.0540412E5"`', tests/f2s_test.rs:113:5
---- test_looks_like_pow5 stdout ----
thread 'test_looks_like_pow5' panicked at 'assertion failed: `(left == right)`
  left: `"-4.2214493E34"`,
 right: `"6.7108864E17"`', tests/f2s_test.rs:165:5
---- test_lots_of_trailing_zeros stdout ----
thread 'test_lots_of_trailing_zeros' panicked at 'assertion failed: `(left == right)`
  left: `"4.5998E-41"`,
 right: `"2.4414062E-4"`', tests/f2s_test.rs:120:5
---- test_min_and_max stdout ----
thread 'test_min_and_max' panicked at 'assertion failed: `(left == right)`
  left: `"NaN"`,
 right: `"3.4028235E38"`', tests/f2s_test.rs:94:5
---- test_output_length stdout ----
thread 'test_output_length' panicked at 'assertion failed: `(left == right)`
  left: `"4.6006E-41"`,
 right: `"1E0"`', tests/f2s_test.rs:174:5
---- test_random stdout ----
thread 'test_random' panicked at 'assertion failed: `(left == right)`
  left: `0.114552975`,
 right: `-4.8410935`', tests/f2s_test.rs:61:9
---- test_regression stdout ----
thread 'test_regression' panicked at 'assertion failed: `(left == right)`
  left: `"4.6056E-41"`,
 right: `"4.7223665E21"`', tests/f2s_test.rs:128:5
---- test_ryu stdout ----
thread 'test_ryu' panicked at 'assertion failed: `(left == right)`
  left: `"-6.352689E-23"`,
 right: `"3E-1"`', tests/f2s_test.rs:42:5
---- test_switch_to_subnormal stdout ----
thread 'test_switch_to_subnormal' panicked at 'assertion failed: `(left == right)`
  left: `"4.5918E-41"`,
 right: `"1.1754944E-38"`', tests/f2s_test.rs:88:5
failures:
    test_basic
    test_boundary_round_even
    test_exact_value_round_even
    test_looks_like_pow5
    test_lots_of_trailing_zeros
    test_min_and_max
    test_output_length
    test_random
    test_regression
    test_ryu
    test_switch_to_subnormal
test result: FAILED. 1 passed; 11 failed; 0 ignored; 0 measured; 0 filtered out
   Doc-tests ryu
     Running `/usr/bin/rustdoc --test /builddir/build/BUILD/ryu-0.2.3/src/lib.rs --crate-name ryu -L dependency=/builddir/build/BUILD/ryu-0.2.3/target/release/deps -L dependency=/builddir/build/BUILD/ryu-0.2.3/target/release/deps --cfg integer128 --cfg must_use_return --extern num_cpus=/builddir/build/BUILD/ryu-0.2.3/target/release/deps/libnum_cpus-cd3922028ade8cfd.rlib --extern rand=/builddir/build/BUILD/ryu-0.2.3/target/release/deps/librand-24a718f95a671a12.rlib --extern ryu=/builddir/build/BUILD/ryu-0.2.3/target/release/deps/libryu-6c2059532bdeb863.rlib`
running 4 tests
test src/d2s.rs - d2s::d2s_buffered_n (line 523) ... FAILED
test src/buffer/mod.rs - buffer::Buffer (line 12) ... FAILED
test src/f2s.rs - f2s::f2s_buffered_n (line 463) ... FAILED
test src/lib.rs -  (line 22) ... FAILED
failures:
---- src/d2s.rs - d2s::d2s_buffered_n (line 523) stdout ----
thread 'src/d2s.rs - d2s::d2s_buffered_n (line 523)' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"1.0128752147767405E117"`,
 right: `"1.234E0"`', src/d2s.rs:10:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', librustdoc/test.rs:365:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- src/buffer/mod.rs - buffer::Buffer (line 12) stdout ----
thread 'src/buffer/mod.rs - buffer::Buffer (line 12)' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"1.0128752147767405e117"`,
 right: `"1.234"`', src/buffer/mod.rs:6:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', librustdoc/test.rs:365:17
---- src/f2s.rs - f2s::f2s_buffered_n (line 463) stdout ----
thread 'src/f2s.rs - f2s::f2s_buffered_n (line 463)' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"-7.26027E-6"`,
 right: `"1.234E0"`', src/f2s.rs:10:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', librustdoc/test.rs:365:17
---- src/lib.rs -  (line 22) stdout ----
thread 'src/lib.rs -  (line 22)' panicked at 'test executable failed:
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"1.0128752147767405e117"`,
 right: `"1.234"`', src/lib.rs:7:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
', librustdoc/test.rs:365:17
failures:
    src/buffer/mod.rs - buffer::Buffer (line 12)
    src/d2s.rs - d2s::d2s_buffered_n (line 523)
    src/f2s.rs - f2s::f2s_buffered_n (line 463)
    src/lib.rs -  (line 22)
dtolnay commented 6 years ago

Thanks! I released 0.2.4 with a fix.