()
| 372 | |
| 373 | #[tokio::test] |
| 374 | async fn nested_components() -> Result<()> { |
| 375 | wizen_and_run_wat( |
| 376 | 42, |
| 377 | r#"(component |
| 378 | (component $a) |
| 379 | (instance (instantiate $a)) |
| 380 | (instance (export "hi") (instantiate $a)) |
| 381 | |
| 382 | (component $b |
| 383 | (type $t string) |
| 384 | (import "x" (type (eq $t))) |
| 385 | (component $a) |
| 386 | (instance (instantiate $a)) |
| 387 | (instance (export "hi") (instantiate $a)) |
| 388 | ) |
| 389 | (type $x string) |
| 390 | (instance (instantiate $b |
| 391 | (with "x" (type $x)) |
| 392 | )) |
| 393 | (instance (export "hi2") (instantiate $b |
| 394 | (with "x" (type $x)) |
| 395 | )) |
| 396 | |
| 397 | (core module $m |
| 398 | (func (export "init")) |
| 399 | (func (export "run") (param i32) (result i32) i32.const 42) |
| 400 | ) |
| 401 | (core instance $i (instantiate $m)) |
| 402 | (func (export "run") (param "arg" s32) (result s32) (canon lift (core func $i "run"))) |
| 403 | (func (export "wizer-initialize") (canon lift (core func $i "init"))) |
| 404 | )"#, |
| 405 | ) |
| 406 | .await?; |
| 407 | |
| 408 | Ok(()) |
| 409 | } |
| 410 | |
| 411 | #[tokio::test] |
| 412 | async fn multiple_modules() -> Result<()> { |
nothing calls this directly
no test coverage detected