mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-29 00:21:34 +00:00
Use minimum limit as initial table size (#196)
This commit is contained in:
committed by
Mackenzie Clark
parent
a6d72bdec9
commit
c9969f269c
@ -306,3 +306,21 @@ impl Clone for SharedMemory {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod memory_tests {
|
||||
|
||||
use super::{Memory, MemoryDescriptor, Pages};
|
||||
|
||||
#[test]
|
||||
fn test_initial_memory_size() {
|
||||
let unshared_memory = Memory::new(MemoryDescriptor {
|
||||
minimum: Pages(10),
|
||||
maximum: Some(Pages(20)),
|
||||
shared: false,
|
||||
})
|
||||
.unwrap();
|
||||
assert_eq!(unshared_memory.size(), Pages(10));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user