mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-29 16:41:33 +00:00
Use minimum limit as initial table size (#196)
This commit is contained in:
committed by
Mackenzie Clark
parent
a6d72bdec9
commit
c9969f269c
@ -148,3 +148,21 @@ impl fmt::Debug for Table {
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod table_tests {
|
||||
|
||||
use super::{ElementType, Table, TableDescriptor};
|
||||
|
||||
#[test]
|
||||
fn test_initial_table_size() {
|
||||
let table = Table::new(TableDescriptor {
|
||||
element: ElementType::Anyfunc,
|
||||
minimum: 10,
|
||||
maximum: Some(20),
|
||||
})
|
||||
.unwrap();
|
||||
assert_eq!(table.size(), 10);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user