Skip to content

Commit 809e0d6

Browse files
committed
riscv: add basic sie unit tests
Adds basic unit tests for the `sie` CSR.
1 parent d525c4c commit 809e0d6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

riscv/src/register/sie.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,17 @@ set_clear_csr!(
3636
set_clear_csr!(
3737
/// Supervisor External Interrupt Enable
3838
, set_sext, clear_sext, 1 << 9);
39+
40+
#[cfg(test)]
41+
mod tests {
42+
use super::*;
43+
44+
#[test]
45+
fn test_sie() {
46+
let mut sie = Sie::from_bits(0);
47+
48+
test_csr_field!(sie, ssoft);
49+
test_csr_field!(sie, stimer);
50+
test_csr_field!(sie, sext);
51+
}
52+
}

0 commit comments

Comments
 (0)