Skip to content

Commit

Permalink
Assert everything before SPECIAL_START is not special
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 22, 2024
1 parent 1c379a0 commit dda65df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pulley/src/regs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ impl XReg {

#[test]
fn assert_special_start_is_right() {
for i in 0..XReg::SPECIAL_START {
assert!(!XReg::new(i).unwrap().is_special());
}
for i in XReg::SPECIAL_START.. {
match XReg::new(i) {
Some(r) => assert!(r.is_special()),
Expand Down

0 comments on commit dda65df

Please sign in to comment.