()
| 5 | |
| 6 | #[test] |
| 7 | fn table_new() -> Result<()> { |
| 8 | let mut config = Config::new(); |
| 9 | config.enable_compiler(false); |
| 10 | config.concurrency_support(false); |
| 11 | let engine = Engine::new(&config)?; |
| 12 | |
| 13 | OomTest::new() |
| 14 | // `IndexMap::reserve` will try to allocate double space, but if that |
| 15 | // fails, will attempt to allocate the minimal space necessary. |
| 16 | .allow_alloc_after_oom(true) |
| 17 | .test(|| { |
| 18 | let mut store = Store::try_new(&engine, ())?; |
| 19 | let ty = TableType::new(RefType::FUNCREF, 1, None); |
| 20 | let _table = wasmtime::Table::new(&mut store, ty, Ref::Func(None))?; |
| 21 | Ok(()) |
| 22 | }) |
| 23 | } |
| 24 | |
| 25 | #[tokio::test] |
| 26 | async fn table_new_async() -> Result<()> { |
nothing calls this directly
no test coverage detected