Refactor tests to use proptest (#6)
* generator: take an &mut GuestMemory rather than pass the owned GuestMemory in, just give exclusive access to it. Makes testing easier. * tests: start transforming tests to check abi-level generated code as well * finish lowering of test funcs * tests: rename variables to more sensible names * proptesting: reliably finds that we dont allow stuff to be right against end of memory! * memory: fix off-by-one calc in GuestMemory::contains(&self, Region) ty proptest! also, refactored the Region::overlaps to be the same code but easier to read. * generator: better location information in GuestError * testing: proptest generates memory areas, tests everything
This commit is contained in:
@@ -8,6 +8,9 @@ edition = "2018"
|
||||
generate = { path = "crates/generate" }
|
||||
memory = { path = "crates/memory" }
|
||||
|
||||
[dev-dependencies]
|
||||
proptest = "0.9"
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
"crates/generate",
|
||||
|
||||
Reference in New Issue
Block a user