From 39f02c4a441dad79f6e8bbb3199130a3f1d61c1a Mon Sep 17 00:00:00 2001 From: tdittr Date: Tue, 27 Apr 2021 11:59:44 +0200 Subject: [PATCH] Add `cargo test` to CI run and fix an error found by it Besides the normal usage of unit-tests this also ensures that example in doc-comments do at least compile. --- .github/workflows/check.yml | 4 ++++ rp2040-hal/src/rom_data.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3319f39..3441ac5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,3 +25,7 @@ jobs: with: command: clippy args: -- -Dwarnings + - uses: actions-rs/cargo@v1 + with: + command: test + args: --target x86_64-unknown-linux-gnu diff --git a/rp2040-hal/src/rom_data.rs b/rp2040-hal/src/rom_data.rs index e55ccb3..8b80148 100644 --- a/rp2040-hal/src/rom_data.rs +++ b/rp2040-hal/src/rom_data.rs @@ -266,7 +266,7 @@ float_funcs! { /// Convert a float to a signed 64-bit integer, rounding towards -Infinity, and clamping /// the result to lie within the range -0x8000000000000000 to 0x7FFFFFFFFFFFFFFF 0x6c float_to_int64(v: f32) -> i64; - /// Convert a float to a signed fixed point 64-bit integer representation where n + /// Convert a float to a signed fixed point 64-bit integer representation where n /// specifies the position of the binary point in the resulting fixed point representation - /// e.g. _float2fix(0.5f, 16) == 0x8000. This method rounds towards -Infinity, and /// clamps the resulting integer to lie within the range -0x8000000000000000 to