File tree 5 files changed +10
-8
lines changed
5 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 7
7
in ` src/lib.rs ` .
8
8
- Write some simple tests in your module (using ` #[test] ` )
9
9
- Run ` cargo test ` to make sure it works
10
- - Run ` cargo test --features libm-test/musl-reference -tests ` to compare your
10
+ - Run ` cargo test --features libm-test/musl-bitwise -tests ` to compare your
11
11
implementation against musl's
12
12
- Send us a pull request! Make sure to run ` cargo fmt ` on your code before
13
13
sending the PR. Also include "closes #42 " in the PR description to close the
@@ -88,7 +88,7 @@ If you'd like to run tests with randomized inputs that get compared against musl
88
88
itself, you'll need to be on a Linux system and then you can execute:
89
89
90
90
```
91
- cargo test --features libm-test/musl-reference -tests
91
+ cargo test --features libm-test/musl-bitwise -tests
92
92
```
93
93
94
94
Note that you may need to pass ` --release ` to Cargo if there are errors related
Original file line number Diff line number Diff line change @@ -17,5 +17,5 @@ $cmd --features 'unstable'
17
17
$cmd --release --features ' unstable'
18
18
19
19
# also run the reference tests
20
- $cmd --features ' unstable libm-test/musl-reference -tests'
21
- $cmd --release --features ' unstable libm-test/musl-reference -tests'
20
+ $cmd --features ' unstable libm-test/musl-bitwise -tests'
21
+ $cmd --release --features ' unstable libm-test/musl-bitwise -tests'
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ default = []
9
9
10
10
# Generate tests which are random inputs and the outputs are calculated with
11
11
# musl libc.
12
- musl-reference -tests = [" rand" ]
12
+ musl-bitwise -tests = [" rand" ]
13
13
14
14
[dependencies ]
15
15
libm = { path = " ../.." }
Original file line number Diff line number Diff line change 1
1
fn main ( ) {
2
- #[ cfg( feature = "musl-reference -tests" ) ]
2
+ #[ cfg( feature = "musl-bitwise -tests" ) ]
3
3
musl_reference_tests:: generate ( ) ;
4
4
}
5
5
6
- #[ cfg( feature = "musl-reference -tests" ) ]
6
+ #[ cfg( feature = "musl-bitwise -tests" ) ]
7
7
mod musl_reference_tests {
8
8
use rand:: seq:: SliceRandom ;
9
9
use rand:: Rng ;
Original file line number Diff line number Diff line change
1
+ //! compare
2
+
1
3
// PowerPC tests are failing on LLVM 13: https://github.com/rust-lang/rust/issues/88520
2
4
#[ cfg( not( target_arch = "powerpc64" ) ) ]
3
- #[ cfg( all( test, feature = "musl-reference -tests" ) ) ]
5
+ #[ cfg( all( test, feature = "musl-bitwise -tests" ) ) ]
4
6
include ! ( concat!( env!( "OUT_DIR" ) , "/musl-tests.rs" ) ) ;
You can’t perform that action at this time.
0 commit comments