|
6 | 6 | `src/math/mod.rs` accordingly. Also, uncomment the corresponding trait method
|
7 | 7 | in `src/lib.rs`.
|
8 | 8 | - Write some simple tests in your module (using `#[test]`)
|
9 |
| -- Run `cargo test` to make sure it works |
10 |
| -- Run `cargo test --features libm-test/test-musl-serialized` to compare your |
11 |
| - implementation against musl's |
| 9 | +- Run `cargo test` to make sure it works. Full tests are only run when enabling |
| 10 | + features, see [Testing](#testing) below. |
12 | 11 | - Send us a pull request! Make sure to run `cargo fmt` on your code before
|
13 | 12 | sending the PR. Also include "closes #42" in the PR description to close the
|
14 | 13 | corresponding issue.
|
@@ -66,12 +65,17 @@ Normal tests can be executed with:
|
66 | 65 | cargo test
|
67 | 66 | ```
|
68 | 67 |
|
69 |
| -If you'd like to run tests with randomized inputs that get compared against musl |
70 |
| -itself, you'll need to be on a Linux system and then you can execute: |
| 68 | +If you'd like to run tests with randomized inputs that get compared against |
| 69 | +infinite-precision results, run: |
71 | 70 |
|
72 | 71 | ```sh
|
73 |
| -cargo test --features libm-test/test-musl-serialized |
| 72 | +cargo test --features libm-test/test-multiprecision,libm-test/build-musl --release |
74 | 73 | ```
|
75 | 74 |
|
76 |
| -Note that you may need to pass `--release` to Cargo if there are errors related |
77 |
| -to integer overflow. |
| 75 | +The multiprecision tests use the [`rug`] crate for bindings to MPFR. MPFR can |
| 76 | +be difficult to build on non-Unix systems, refer to [`gmp_mpfr_sys`] for help. |
| 77 | + |
| 78 | +`build-musl` does not build with MSVC, Wasm, or Thumb. |
| 79 | + |
| 80 | +[`rug`]: https://docs.rs/rug/latest/rug/ |
| 81 | +[`gmp_mpfr_sys`]: https://docs.rs/gmp-mpfr-sys/1.6.4/gmp_mpfr_sys/ |
0 commit comments