Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/misc/component-async-tests/tests/scenario/error_context.rs
1693 views
1
use anyhow::Result;
2
3
use super::util::test_run;
4
5
#[tokio::test]
6
pub async fn async_error_context() -> Result<()> {
7
test_run(&[test_programs_artifacts::ASYNC_ERROR_CONTEXT_COMPONENT]).await
8
}
9
10
// No-op function; we only test this by composing it in `async_error_context_caller`
11
#[allow(
12
dead_code,
13
reason = "here only to make the `assert_test_exists` macro happy"
14
)]
15
pub fn async_error_context_callee() {}
16
17
#[tokio::test]
18
pub async fn async_error_context_caller() -> Result<()> {
19
test_run(&[
20
test_programs_artifacts::ASYNC_ERROR_CONTEXT_CALLER_COMPONENT,
21
test_programs_artifacts::ASYNC_ERROR_CONTEXT_CALLEE_COMPONENT,
22
])
23
.await
24
}
25
26