add Mechine::release_locations_keep_state test

This commit is contained in:
laizy
2019-06-08 22:18:41 +08:00
parent 8105c0c16f
commit 1780d57df1

View File

@ -419,3 +419,19 @@ impl Machine {
}
}
}
#[cfg(test)]
mod test {
use super::*;
use dynasmrt::x64::Assembler;
#[test]
fn test_release_locations_keep_state_nopanic() {
let mut mechine = Machine::new();
let mut assembler = Assembler::new().unwrap();
let locs = mechine.acquire_locations(&mut assembler, &[WpType::I32; 10], false);
mechine.release_locations_keep_state(&mut assembler, &locs);
}
}