error message tailored for 64-bit
()
| 866 | #[cfg(feature = "component-model")] |
| 867 | #[cfg(target_pointer_width = "64")] // error message tailored for 64-bit |
| 868 | fn component_instance_size_limit() -> Result<()> { |
| 869 | let mut pool = crate::small_pool_config(); |
| 870 | pool.max_component_instance_size(1); |
| 871 | let mut config = Config::new(); |
| 872 | config.wasm_component_model(true); |
| 873 | config.allocation_strategy(pool); |
| 874 | let engine = Engine::new(&config)?; |
| 875 | |
| 876 | match wasmtime::component::Component::new(&engine, "(component)") { |
| 877 | Ok(_) => panic!("should have hit limit"), |
| 878 | Err(e) => { |
| 879 | e.assert_contains("instance allocation for this component requires 64 bytes"); |
| 880 | e.assert_contains("which exceeds the configured maximum of 1 bytes"); |
| 881 | e.assert_contains("`VMComponentContext` used 64 bytes"); |
| 882 | } |
| 883 | } |
| 884 | |
| 885 | Ok(()) |
| 886 | } |
| 887 | |
| 888 | #[test] |
| 889 | #[cfg_attr(miri, ignore)] |
nothing calls this directly
no test coverage detected