File tree Expand file tree Collapse file tree 4 files changed +50
-0
lines changed
tests/run-make/libtest-padding Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ # ignore-cross-compile because we run the compiled code
2+ # needs-unwind because #[bench] and -Cpanic=abort requires -Zpanic-abort-tests
3+ include ../tools.mk
4+
5+ NORMALIZE =sed 's%[0-9,]\+ ns/iter (+/- [0-9,]\+)%?? ns/iter (+/- ??)%' | sed 's%finished in [0-9\.]\+%finished in ??%'
6+
7+ all :
8+ $(RUSTC ) --test tests.rs
9+
10+ $(call RUN,tests) --test-threads=1 | $(NORMALIZE) > "$(TMPDIR)"/test.stdout
11+ $(RUSTC_TEST_OP) "$(TMPDIR)"/test.stdout test.stdout
12+
13+ $(call RUN,tests) --test-threads=1 --bench | $(NORMALIZE) > "$(TMPDIR)"/bench.stdout
14+ $(RUSTC_TEST_OP) "$(TMPDIR)"/bench.stdout bench.stdout
Original file line number Diff line number Diff line change 1+
2+ running 4 tests
3+ test short_test_name ... ignored
4+ test this_is_a_really_long_test_name ... ignored
5+ test short_bench_name ... bench: ?? ns/iter (+/- ??)
6+ test this_is_a_really_long_bench_name ... bench: ?? ns/iter (+/- ??)
7+
8+ test result: ok. 0 passed; 0 failed; 2 ignored; 2 measured; 0 filtered out; finished in ??s
9+
Original file line number Diff line number Diff line change 1+
2+ running 4 tests
3+ test short_bench_name ... ok
4+ test short_test_name ... ok
5+ test this_is_a_really_long_bench_name ... ok
6+ test this_is_a_really_long_test_name ... ok
7+
8+ test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in ??s
9+
Original file line number Diff line number Diff line change 1+ #![ feature( test) ]
2+ extern crate test;
3+
4+ #[ test]
5+ fn short_test_name ( ) { }
6+
7+ #[ test]
8+ fn this_is_a_really_long_test_name ( ) { }
9+
10+ #[ bench]
11+ fn short_bench_name ( b : & mut test:: Bencher ) {
12+ b. iter ( || 1 ) ;
13+ }
14+
15+ #[ bench]
16+ fn this_is_a_really_long_bench_name ( b : & mut test:: Bencher ) {
17+ b. iter ( || 1 ) ;
18+ }
You can’t perform that action at this time.
0 commit comments