Skip to content

Commit

Permalink
Test the documentation examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
orium committed Sep 14, 2023
1 parent 4a71e47 commit c3fe88f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ assert_installed "cargo-fmt"
trap on_failure ERR

echo 'Building:'
cargo check --no-default-features --features fatal-warnings --all-targets
cargo build --features fatal-warnings --all-targets
echo 'Testing:'
cargo test --features fatal-warnings
cargo test --features fatal-warnings --all-targets
# Weirdly, the `cargo test ... --all-targets ...` above does not run the tests in the documentation, so we run the
# doc tests like this.
# See https://github.com/rust-lang/cargo/issues/6669.
echo 'Testing doc:'
cargo test --features fatal-warnings --doc
echo 'Checking the benchmarks:'
cargo bench --features fatal-warnings -- --test
echo 'Checking documentation:'
Expand Down

0 comments on commit c3fe88f

Please sign in to comment.